mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-19 01:22:23 -06:00
Moved tests from index-test.md to linenos-test.md
This should revert the changes made to index-test.md
This commit is contained in:
parent
74845b4a0e
commit
fdaf5a276b
@ -33,44 +33,12 @@ var fun = function lang(l) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
# Ruby code with syntax highlighting in fences
|
# Ruby code with syntax highlighting
|
||||||
GitHubPages::Dependencies.gems.each do |gem, version|
|
GitHubPages::Dependencies.gems.each do |gem, version|
|
||||||
s.add_dependency(gem, "= #{version}")
|
s.add_dependency(gem, "= #{version}")
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
{% highlight ruby %}
|
|
||||||
# Ruby code with syntax highlighting using Liquid
|
|
||||||
GitHubPages::Dependencies.gems.each do |gem, version|
|
|
||||||
s.add_dependency(gem, "= #{version}")
|
|
||||||
end
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
{% capture fix_linenos_code %}{% highlight ruby linenos %}
|
|
||||||
# Ruby code with syntax highlighting and fixed line numbers using Liquid
|
|
||||||
GitHubPages::Dependencies.gems.each do |gem, version|
|
|
||||||
s.add_dependency(gem, "= #{version}")
|
|
||||||
end
|
|
||||||
{% endhighlight %}{% endcapture %}{% include fix_linenos.html %}{{ fix_linenos_code }}
|
|
||||||
|
|
||||||
{% comment %}
|
|
||||||
|
|
||||||
The code example below requires the following setting in `_config.yml`:
|
|
||||||
```yaml
|
|
||||||
compress_html:
|
|
||||||
ignore:
|
|
||||||
envs: all
|
|
||||||
```
|
|
||||||
|
|
||||||
{% highlight ruby linenos %}
|
|
||||||
# Ruby code with syntax highlighting and unfixed line numbers using Liquid
|
|
||||||
GitHubPages::Dependencies.gems.each do |gem, version|
|
|
||||||
s.add_dependency(gem, "= #{version}")
|
|
||||||
end
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
{% endcomment %}
|
|
||||||
|
|
||||||
#### [](#header-4)Header 4
|
#### [](#header-4)Header 4
|
||||||
|
|
||||||
* This is an unordered list following a header.
|
* This is an unordered list following a header.
|
||||||
|
56
docs/linenos-test.md
Normal file
56
docs/linenos-test.md
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: Markdown line number test
|
||||||
|
nav_order: 999
|
||||||
|
---
|
||||||
|
|
||||||
|
```
|
||||||
|
Some unknown code in fences
|
||||||
|
```
|
||||||
|
|
||||||
|
Some of the code examples below require the following setting in `_config.yml`:
|
||||||
|
```yaml
|
||||||
|
compress_html:
|
||||||
|
ignore:
|
||||||
|
envs: all
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
// Javascript code with syntax highlighting in fences
|
||||||
|
var fun = function lang(l) {
|
||||||
|
dateformat.i18n = require('./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
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
|
{% capture code %}
|
||||||
|
{% highlight ruby linenos %}
|
||||||
|
# Ruby code with syntax highlighting and fixed line numbers using Liquid
|
||||||
|
GitHubPages::Dependencies.gems.each do |gem, version|
|
||||||
|
s.add_dependency(gem, "= #{version}")
|
||||||
|
end
|
||||||
|
{% endhighlight %}
|
||||||
|
{% endcapture %}
|
||||||
|
{% include fix_linenos.html code=code %}
|
||||||
|
{% assign code = nil %}
|
||||||
|
|
||||||
|
{% highlight ruby linenos %}
|
||||||
|
# Ruby code with syntax highlighting and unfixed line numbers using Liquid
|
||||||
|
GitHubPages::Dependencies.gems.each do |gem, version|
|
||||||
|
s.add_dependency(gem, "= #{version}")
|
||||||
|
end
|
||||||
|
{% endhighlight %}
|
Loading…
x
Reference in New Issue
Block a user