开发者

PHP Markdown Extra and Definition Lists

I'm currently generating a definition list with PHP Markdown Extra with the following syntax:

Term
:   Description
:   Description Two

My Other Term
:开发者_如何学C   Description

which generates the following HTML:

<dl>
    <dt>Term</dt>
    <dd>Description</dd>
    <dd>Description Two</dd>
    <dt>My Other Term</dt>
    <dd>Description</dd>
</dl>

Does anyone know how I can get Markdown to create separate definition lists for each definition term and descriptions to create markup like this?

<dl>
    <dt>Term</dt>
    <dd>Description</dd>
    <dd>Description Two</dd>
</dl>
<dl>
    <dt>My Other Term</dt>
    <dd>Description</dd>
</dl>


I don't think it is currently possible. Try to insert some dummy element between the two DL so it doesn't treat them as one.


you can do so by remembering to the support of embedded html ;-) Just do this:

Term
:   Description
:   Description Two
</dl><dl>
My Other Term
:   Description

And you'll get this:

<dl>
   <dt>Term</dt>
   <dd>Description</dd>
   <dd>Description Two</dd>
</dl><dl> <<< this is your code
   <dt>My Other Term</dt>
   <dd>Description</dd>
</dl>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜