Definition lists in kramdown

无人久伴 提交于 2021-02-08 05:12:41

问题


How do I generate the following HTML markup using kramdown?

<ol>
<li> <dt> Term </dt> 
<dd class="meta">  Definition of the term </dd> 
</li>
</ol>

where the meta is some appropriate styling (class) defined in my css.

I already tried:

1. Term 
: Definition of the term {: .meta}

but that does not work.

Any help would be appreciated.


回答1:


You're probably getting the following error:

Warning: Found span IAL after text - ignoring it

If you therefore put the IAL before the text, it parses fine.

1. Term
: {: .meta} Definition of the term

yields

<ol>
  <li>
    <dl>
      <dt>Term</dt>
      <dd class="meta">Definition of the term</dd>
    </dl>
  </li>
</ol>


来源:https://stackoverflow.com/questions/30146425/definition-lists-in-kramdown

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!