kjdev / hoextdown

Hoextdown is an extension to Hoedown
MIT License
23 stars 15 forks source link

Special attributes are not honored for loose lists #26

Open MarkLodato opened 8 years ago

MarkLodato commented 8 years ago

The {...} attribute does not work for multi-line items in loose lists. Example:

$ ./hoedown --version
Built with Hoedown v3.0.7.2.
$ ./hoedown --special-attribute <<EOF
* a

* b      
  c {#id}
EOF
<ul>
<li><p>a</p></li>
<li><p>b
c {#id}</p></li>
</ul>

Interestingly, it does work for multi-line items (even multi-paragraph items) in compact lists and for single-line items in loose lists.

$ ./hoedown --special-attribute <<EOF
* a
* b
  c {#id}
EOF
<ul>
<li>a</li>
<li id="id">b
c</li>
</ul>
$ ./hoedown --special-attribute <<EOF
* a      

* b {#id}  
EOF
<ul>
<li><p>a</p></li>
<li id="id"><p>b</p></li>
</ul>
$ ./hoedown --special-attribute <<EOF
* a {#id}

  b      
EOF
<ul>
<li id="id"><p>a</p>

<p>b</p></li>
</ul>