我有以下代碼添加液體代碼塊之後復位編號列表:化身Kramdown代碼 - 號碼重
...
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即detail the markdown ordered list reset problem但他們都沒有討論液體標籤。我發現另一個帖子here討論這個問題無濟於事。
這裏是HTML輸出,以防萬一它是必要的。該<ol>
標籤顯然是被由液體標籤發動機產生一個<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>
我想成爲能夠將液體標記放置在有序列表中,而不會打破<ol>
HTML元素並重置編號。有沒有辦法做到這一點?
你倒黴了。 https://github.com/jekyll/jekyll/issues/588 – approxiblue
一些不完美的解決方法:http://stackoverflow.com/questions/17995467/how-can-i-put-a-liquid-tag-highlight-in- an-ordered-list – approxiblue
您在號碼前後留有空格嗎? –