Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid nested ul #34

Merged
merged 10 commits into from
Oct 8, 2017
Merged

Fix invalid nested ul #34

merged 10 commits into from
Oct 8, 2017

Conversation

toshimaru
Copy link
Owner

@toshimaru toshimaru commented Oct 5, 2017

Issue #25

Changes

  • Add last_ul_used arguments to fix invalid nested <ul> tag
  • Add more complex toc test
  • Add kramdown list parser test for reference

Parser logic overview

<h6>h6</h6>
<h5>h5</h5>
<h4>h4</h4>
<h3>h3</h3>
<h2>h2</h2>
<h1>h1</h1>

This headings generate following TOC.

<ul class="section-nav">
<li class="toc-entry toc-h6"><a href="#h6">h6</a></li>
<li class="toc-entry toc-h5"><a href="#h5">h5</a></li>
<li class="toc-entry toc-h4"><a href="#h4">h4</a></li>
<li class="toc-entry toc-h3"><a href="#h3">h3</a></li>
<li class="toc-entry toc-h2"><a href="#h2">h2</a></li>
<li class="toc-entry toc-h1"><a href="#h1">h1</a></li>
</ul>

<h1>h1</h1>
<h3>h3</h3>
<h2>h2</h2>
<h4>h4</h4>
<h5>h5</h5>

This headings generate following TOC.

<ul class="section-nav">
<li class="toc-entry toc-h1">
<a href="#h1">h1</a>
<ul>
<li class="toc-entry toc-h3"><a href="#h3">h3</a></li>
<li class="toc-entry toc-h2">
<a href="#h2">h2</a>
<ul>
<li class="toc-entry toc-h4">
<a href="#h4">h4</a>
<ul>
<li class="toc-entry toc-h5"><a href="#h5">h5</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>

@toshimaru toshimaru changed the title [WIP] Fix invalid ul nested list Fix invalid ul nested list Oct 8, 2017
@toshimaru toshimaru changed the title Fix invalid ul nested list Fix invalid nested ul Oct 8, 2017
@toshimaru toshimaru merged commit ac86639 into master Oct 8, 2017
@toshimaru toshimaru deleted the fix/invalid-html branch October 8, 2017 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant