-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Ensure autoHeader dom result is similar to parsed H1 #811
Ensure autoHeader dom result is similar to parsed H1 #811
Conversation
dom.before(main, h1) | ||
const h1 = this.compiler.header(activeEl.innerText, 1) | ||
const wrapper = dom.create('div', h1) | ||
dom.before(main, wrapper.children[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because h1
is returned as a String
, I use this trick to convert it into a DOM node
Please run these commands to trigger netlify deployment for this Pull Request: git commit --amend --no-edit
git push --force |
Done. ✔️ |
@jhildenbiddle what do you think? |
Is there a preview for this PR? I don't see a link... |
Oh, it seems that it’s visible just to me. I will try to find out how to make them public. And will also add you as a team member in netlify. |
I don’t think it’s bad to expose the renderer. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Any update on this PR? |
Please rebase. |
@anikethsaha Rebased and updated your requested change ✌️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 🎉
Sorry for the delay
fix #516
Please makes sure these boxes are checked before submitting your PR, thank you!
master
branch.lib
directory.In reference to #516
Ensure the
h1
dom element created by theautoHeader
feature is similar to theħ1
parsed from a markdown file.Please review this code carefully as I don't know if exposing the
renderer
is a good idea.