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

Render H1 elements added via autoHeader as anchors #516

Closed
jhildenbiddle opened this issue Jun 6, 2018 · 0 comments · Fixed by #811
Closed

Render H1 elements added via autoHeader as anchors #516

jhildenbiddle opened this issue Jun 6, 2018 · 0 comments · Fixed by #811
Labels
bug confirmed as a bug

Comments

@jhildenbiddle
Copy link
Member

When the autoHeader option is set to true, the following HTML is generated:

<h1>Title</h1>

But when an h1 tag is found in markdown, it is converted to the following HTML:

<h1 id="title">
  <a href="#/?id=title" data-id="title" class="anchor">
    <span>Title</span>
  </a>
</h1>

This inconsistency creates a few issues:

  1. These elements behave differently, but they shouldn't.
  2. These elements may not look the same if theme authors are using the additional attributes and/or HTML tags from the second example as hooks for styling
  3. These elements cannot be processed the same way by plugins

Summary: Render elements added via the autoHeader the same as header elements found in markdown.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed as a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants