Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Open WIN Community
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-science
community
Open WIN Community
Commits
c587c0b2
Unverified
Commit
c587c0b2
authored
4 years ago
by
Patrick Marsceill
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix heading hierarchy
parent
e4246b35
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/ui-components/line-nos.md
+5
-5
5 additions, 5 deletions
docs/ui-components/line-nos.md
with
5 additions
and
5 deletions
docs/ui-components/line-nos.md
+
5
−
5
View file @
c587c0b2
...
...
@@ -6,7 +6,7 @@ grand_parent: UI Components
permalink
:
/docs/ui-components/code/line-numbers/
---
# Co
nfiguration option
s
# Co
de snippets with line number
s
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
...
...
@@ -40,14 +40,14 @@ Some code
{% endhighlight %}{% endraw %}
{% endhighlight %}
# Workarounds
#
# Workarounds
To use HTML compression together with line numbers, all highlighted code
needs to be wrapped using one of the following workarounds.
(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).
## Code fences
##
#
Code fences
{% highlight default %}
{% raw %}{% capture some_var %}
...
...
@@ -59,7 +59,7 @@ Some code
{% include fix_linenos.html code=some_var %}{% endraw %}
{% endhighlight %}
## Liquid highlighting
##
#
Liquid highlighting
{% highlight default %}
{% raw %}{% capture some_var %}
...
...
@@ -74,7 +74,7 @@ _Credit:_ The original version of the above workaround was suggested by
Dmitry Hrabrov at
<https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901>
.
# Examples
#
# Examples
```
Some unknown code in fences
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment