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

Header tags off-by-one error, and class-prefix issues #213

Open
JohnPostlethwait opened this issue Jan 5, 2017 · 0 comments
Open

Header tags off-by-one error, and class-prefix issues #213

JohnPostlethwait opened this issue Jan 5, 2017 · 0 comments

Comments

@JohnPostlethwait
Copy link

JohnPostlethwait commented Jan 5, 2017

Ruby version: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
Gem version: 2.5.1

Make a .lsg file with:

# This should be a H1
## This should be a H2
### This should be a H3
#### This should be a H4
##### This should be a H5
###### This should be a H6

Compile it via the command line.

The outputted HTML is this:

<h2 class="lsg-headline" id="this-should-be-a-h1"><a class="lsg-anchor" href="#this-should-be-a-h1"></a>This should be a H1</h2>
<h3 class="lsg-sub-headline" id="this-should-be-a-h2"><a class="lsg-anchor" href="#this-should-be-a-h2"></a>This should be a H2</h3>
<h4 class="lsg-sub-sub-headline" id="this-should-be-a-h3"><a class="lsg-anchor" href="#this-should-be-a-h3"></a>This should be a H3</h4>
<h5 class="lsg-" id="this-should-be-a-h4"><a class="lsg-anchor" href="#this-should-be-a-h4"></a>This should be a H4</h5>
<h6 class="lsg-" id="this-should-be-a-h5"><a class="lsg-anchor" href="#this-should-be-a-h5"></a>This should be a H5</h6>
<h7 class="lsg-" id="this-should-be-a-h6"><a class="lsg-anchor" href="#this-should-be-a-h6"></a>This should be a H6</h7>

As you can see, the class names are identical for H3's through H6's (which are off-by-one and render as H(n+1)).

All Header levels should get unique lsg- selectors, and the Markdown should not render as Hn+1.

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

No branches or pull requests

1 participant