Fix heading hierarchy

This commit is contained in:
Patrick Marsceill 2020-09-14 12:46:26 -04:00 committed by GitHub
parent e4246b35b0
commit c587c0b217
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ grand_parent: UI Components
permalink: /docs/ui-components/code/line-numbers/ permalink: /docs/ui-components/code/line-numbers/
--- ---
# Configuration options # Code snippets with line numbers
The default settings for HTML compression are incompatible with the HTML The default settings for HTML compression are incompatible with the HTML
produced by Jekyll (4.1.1 or earlier) for line numbers from highlighted code produced by Jekyll (4.1.1 or earlier) for line numbers from highlighted code
@ -40,14 +40,14 @@ Some code
{% endhighlight %}{% endraw %} {% endhighlight %}{% endraw %}
{% endhighlight %} {% endhighlight %}
# Workarounds ## Workarounds
To use HTML compression together with line numbers, all highlighted code To use HTML compression together with line numbers, all highlighted code
needs to be wrapped using one of the following workarounds. needs to be wrapped using one of the following workarounds.
(The variable name `some_var` can be changed to avoid clashes; it can also (The variable name `some_var` can be changed to avoid clashes; it can also
be replaced by `code` -- but note that `code=code` cannot be removed). be replaced by `code` -- but note that `code=code` cannot be removed).
## Code fences ### Code fences
{% highlight default %} {% highlight default %}
{% raw %}{% capture some_var %} {% raw %}{% capture some_var %}
@ -59,7 +59,7 @@ Some code
{% include fix_linenos.html code=some_var %}{% endraw %} {% include fix_linenos.html code=some_var %}{% endraw %}
{% endhighlight %} {% endhighlight %}
## Liquid highlighting ### Liquid highlighting
{% highlight default %} {% highlight default %}
{% raw %}{% capture some_var %} {% raw %}{% capture some_var %}
@ -74,7 +74,7 @@ _Credit:_ The original version of the above workaround was suggested by
Dmitry Hrabrov at Dmitry Hrabrov at
<https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901>. <https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901>.
# Examples ## Examples
``` ```
Some unknown code in fences Some unknown code in fences