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 wikilinks before rendering docs with GFM #10

Closed
wants to merge 1 commit into from

Conversation

tijptjik
Copy link

Fixes #8

@gordonbrander
Copy link
Owner

gordonbrander commented Jun 10, 2021

Tested locally. Unfortunately, this breaks transclusion. The reason is that Markdown runs first, so it wraps wikilinks in a <p> tag. This is Markdown behaving as expected. We should run any to-HTML transformations BEFORE running markdown, since Markdown is supposed to leave HTML alone. The issue is that the GFM library has a bug where it does not leave HTML alone.

Will investigate another fix.

@tijptjik
Copy link
Author

tijptjik commented Jun 10, 2021

Thank you for investigating... and indeed there way no transclusion in the Obsisian.md use-case. I've adopted a work-around like you suggested in the meantime... but would it be worth checking whether another GFM parser (e.g. cmarkgfm or pycmarkgfm doesn't have this bug? Thanks, just saw your comment you were thinking along the same lines :)

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.

GFM re-hrefs the href
2 participants