Skip to content
Snippets Groups Projects
Unverified Commit 1b0a313c authored by Patrick Marsceill's avatar Patrick Marsceill Committed by GitHub
Browse files

Make examples more clear

parent c587c0b2
No related branches found
No related tags found
No related merge requests found
......@@ -76,10 +76,10 @@ Dmitry Hrabrov at
## Examples
```
Some unknown code in fences
```
✅ Using code fences + workaround:
{% highlight default %}
{% raw %}{% capture code_fence %}
```js
// Javascript code with syntax highlighting in fences
var fun = function lang(l) {
......@@ -87,21 +87,13 @@ var fun = function lang(l) {
return true;
}
```
```ruby
# Ruby code with syntax highlighting in fences
GitHubPages::Dependencies.gems.each do |gem, version|
s.add_dependency(gem, "= #{version}")
end
```
{% highlight ruby %}
# Ruby code with syntax highlighting using Liquid
GitHubPages::Dependencies.gems.each do |gem, version|
s.add_dependency(gem, "= #{version}")
end
{% endcapture %}
{% assign code_fence = code_fence | markdownify %}
{% include fix_linenos.html code=code_fence %}{% endraw %}
{% endhighlight %}
✅ Using liquid highlighting + workaround:
{% capture code %}
{% highlight ruby linenos %}
# Ruby code with syntax highlighting and fixed line numbers using Liquid
......@@ -113,8 +105,8 @@ end
{% include fix_linenos.html code=code %}
{% assign code = nil %}
With the default configuration options, the following example illustrates
the incorrect formatting arising from the incompatibility of HTML compression
With the default configuration options, the following example illustrates
the **incorrect** formatting arising from the incompatibility of HTML compression
and the non-conforming HTML produced by Jekyll for line numbers:
{% highlight ruby linenos %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment