我有以下代码,在添加 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 detail the markdown ordered list reset problem,但没有人讨论 liquid 标记。我发现另一篇帖子here讨论这个问题无济于事。
以下是HTML输出,以备必要时使用。 <ol>
标记显然被液体标记引擎生成的<div>
元素打破了......而且我不知道如何在{{{{}}块中嵌入pre
块阻止......
<ol>
我希望能够将 liquid 标记放在有序列表中,而不会破坏<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>
HTML元素并重置编号。有没有办法做到这一点?
答案 0 :(得分:4)
对于有此问题的人,在下一个号码前面添加额外信息对我有帮助。
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
答案 1 :(得分:0)
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,则应该开始!)”行,列表编号将继续。