-
Notifications
You must be signed in to change notification settings - Fork 879
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
heading inside anchor renders to invalid markdown #409
Comments
da1z
changed the title
hading inside anchor renders to invalid markdown
heading inside anchor renders to invalid markdown
May 4, 2022
I have the same problem, but with divs instead of headlines. |
My solution to this (and since I'm preprocessing the html anyway because of #415): document.querySelectorAll('a > div > img, a > h1 > img, a > h2 > img, a > h3 > img').forEach(img => {
const blockElem = img.parentNode;
blockElem.replaceWith(...Array.from(blockElem.childNodes));
}); This assumes you are using something like jsdom or domino to preprocess the html. |
Same problem but with paragraph inside anchors. |
Ndpnt
added a commit
to OpenTermsArchive/turndown
that referenced
this issue
Aug 31, 2022
Ndpnt
added a commit
to OpenTermsArchive/turndown
that referenced
this issue
Aug 31, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this being converted to markdown as
which is not really valid. Is there workaround to make it converting to something like?
### [**MyHeading**](some url)
The text was updated successfully, but these errors were encountered: