有序列表中的 Jekyll Kramdown 代码 - 数字重置
Jekyll Kramdown code in ordered list - number reset
我有以下代码在添加 liquid 代码块后重置编号列表:
...
6. Install the Ruby Google API client with `gem install google-api-client`, or if you prefer in a Gemfile:
{% highlight ruby lineanchors %}
source 'https://rubygems.org'
gem 'google-api-client', '~> 0.9.1'
{% endhighlight %}
(If you've never used [Bundler](http://bundler.io) before, you should start!)
7. Let's get a quick script set up to post a Google Calendar event to...
问题是以下内容呈现为:
排序列表重置了,这明显是个问题。我看过 many posts that detail the markdown ordered list reset problem but none of them discuss liquid tags. I found another post here 讨论这个问题但无济于事。
这里是 HTML 输出以备不时之需。 <ol>
标签显然被 liquid 标签引擎生成的 <div>
元素破坏了...而且我不知道如何将 pre
块嵌入 <ol>
块...
<ol>
...
<li>Install the Ruby Google API client with <code>gem install google-api-client</code>, or if you prefer in a Gemfile:</li>
</ol>
<div class="highlight"><pre><code class="language-ruby" data-lang="ruby"><a name="True-1"></a><span class="n">source</span> <span class="s1">'https://rubygems.org'</span>
<a name="True-2"></a><span class="n">gem</span> <span class="s1">'google-api-client'</span><span class="p">,</span> <span class="s1">'~> 0.9.1'</span></code></pre></div>
<p>(If you’ve never used <a href="http://bundler.io">Bundler</a> before, you should start!)</p>
<ol>
<li>Let’s get a quick script set up to post a Google Calendar event to</li>
<li>Let’s get a quick script set up to post a Google Calendar event to</li>
</ol>
我希望能够将 liquid 标签放入有序列表中,而不会破坏 <ol>
HTML 元素并重置编号。有办法吗?
对于遇到此问题的人,在下一个数字前添加额外信息对我有所帮助。
6. Install the Ruby Google API client with `gem install google-api-client`, or if you prefer in a Gemfile:
{% highlight ruby lineanchors %}
source 'https://rubygems.org'
gem 'google-api-client', '~> 0.9.1'
{% endhighlight %}
(If you've never used [Bundler](http://bundler.io) before, you should start!)
{:start="7"}
7. Let's get a quick
6. Install the Ruby Google API client with `gem install google-api-client`, or if you prefer in a Gemfile:
{% highlight ruby lineanchors %}
source 'https://rubygems.org'
gem 'google-api-client', '~> 0.9.1'
{% endhighlight %}
(If you've never used [Bundler](http://bundler.io) before, you should start!)
7. Let's get a quick
正如@Joshua Meyers 在评论中所建议的那样,问题出在最后一行。
如果您缩进行“(如果您以前从未使用过 Bundler,您应该开始!)”,列表编号将继续。
我有以下代码在添加 liquid 代码块后重置编号列表:
...
6. Install the Ruby Google API client with `gem install google-api-client`, or if you prefer in a Gemfile:
{% highlight ruby lineanchors %}
source 'https://rubygems.org'
gem 'google-api-client', '~> 0.9.1'
{% endhighlight %}
(If you've never used [Bundler](http://bundler.io) before, you should start!)
7. Let's get a quick script set up to post a Google Calendar event to...
问题是以下内容呈现为:
排序列表重置了,这明显是个问题。我看过 many posts that detail the markdown ordered list reset problem but none of them discuss liquid tags. I found another post here 讨论这个问题但无济于事。
这里是 HTML 输出以备不时之需。 <ol>
标签显然被 liquid 标签引擎生成的 <div>
元素破坏了...而且我不知道如何将 pre
块嵌入 <ol>
块...
<ol>
...
<li>Install the Ruby Google API client with <code>gem install google-api-client</code>, or if you prefer in a Gemfile:</li>
</ol>
<div class="highlight"><pre><code class="language-ruby" data-lang="ruby"><a name="True-1"></a><span class="n">source</span> <span class="s1">'https://rubygems.org'</span>
<a name="True-2"></a><span class="n">gem</span> <span class="s1">'google-api-client'</span><span class="p">,</span> <span class="s1">'~> 0.9.1'</span></code></pre></div>
<p>(If you’ve never used <a href="http://bundler.io">Bundler</a> before, you should start!)</p>
<ol>
<li>Let’s get a quick script set up to post a Google Calendar event to</li>
<li>Let’s get a quick script set up to post a Google Calendar event to</li>
</ol>
我希望能够将 liquid 标签放入有序列表中,而不会破坏 <ol>
HTML 元素并重置编号。有办法吗?
对于遇到此问题的人,在下一个数字前添加额外信息对我有所帮助。
6. Install the Ruby Google API client with `gem install google-api-client`, or if you prefer in a Gemfile:
{% highlight ruby lineanchors %}
source 'https://rubygems.org'
gem 'google-api-client', '~> 0.9.1'
{% endhighlight %}
(If you've never used [Bundler](http://bundler.io) before, you should start!)
{:start="7"}
7. Let's get a quick
6. Install the Ruby Google API client with `gem install google-api-client`, or if you prefer in a Gemfile:
{% highlight ruby lineanchors %}
source 'https://rubygems.org'
gem 'google-api-client', '~> 0.9.1'
{% endhighlight %}
(If you've never used [Bundler](http://bundler.io) before, you should start!)
7. Let's get a quick
正如@Joshua Meyers 在评论中所建议的那样,问题出在最后一行。 如果您缩进行“(如果您以前从未使用过 Bundler,您应该开始!)”,列表编号将继续。