fletcher / MultiMarkdown-5

Reference implementation of MultiMarkdown; replaces MultiMarkdown v4 (deprecated -- see MMD-6 instead)
https://github.com/fletcher/MultiMarkdown-6
Other
293 stars 46 forks source link

TOC doesn't generate cross-reference link when headline with label is in HTML block #53

Closed cmaas closed 7 years ago

cmaas commented 7 years ago

If a headline is given a cross-reference label and it is within an HTML block and process-html is enabled, the TOC doesn't have a valid link.

Example:

# Test

{{TOC}}

<div class="tip">

## In HTML [in-html]

</div>

Generates:

<h1 id="test">Test</h1><div class="TOC">

<ul>
<li><a href="#test">Test</a>

<ul>
<li>[In HTML][in-html]</li>
</ul></li>
</ul>
</div>
<div class="tip">

<h2 id="in-html">In HTML</h2>
</div>

Expected output: Link in TOC pointing to anchor named in-html.

fletcher commented 7 years ago

See this page for more info.

In this case, HTML is handled very differently in MMD 6 -- it uses an approach somewhat like that used by CommonMark. Your particular example is resolved with the new approach, but a few other things will behave differently.