-
Notifications
You must be signed in to change notification settings - Fork 21
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
change markdown parser to mistletoe #40
Conversation
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.
Thanks for submitting this! It's great, just a couple of preferences changes
As far as the test failing, it seems mistletoe adds a new line by default to any single line renderings. To fix the test failing, I think you can change the last line of the f"<description>{self.user.blog_byline}</description>" to: f"<description>{self.user.blog_byline}\n</description>" The change is an addition of a |
No problem! I'll do that when I get home, in a few hours. |
I think I've made it so that you don't need my approval to run the CI anymore |
All checks have passed now! |
Great! I can’t recall if we talked about this but are the extensions we removed now supported natively? Namely tables, footnotes, toc. |
I don't know what Edit: It's "table of contents". Testing now... |
Tables work, ToC doesn't, and neither do footnotes. Working on both now. |
I want to get this working, but I don't know if I can figure it out. There isn't very detailed documentation for mistletoe, so it isn't the easiest thing to work with. |
In terms of the TOC, I made an example here: https://nutcroft.com/blog/a-new-startup-lifecycle/ Essentially, the important part is that headings have ids. For example the first heading is an h2 and its id is In other words it renders as For this reason, we can have a link such as The least important part, which we can do without, is the Let me know if these make sense! |
In terms of footnotes, I see that mistletoe does not support them out of the box: miyuchina/mistletoe#47 One question is how easy we can re-implement them by overriding their HTMLRenderer, just like we did with the code highlighting part. They don't have a footnotes example in their contrib folder as they do for code highlighting: https://github.com/miyuchina/mistletoe/tree/e853a0def73f4d4c2be5bf16ef4ef4135df0d556/mistletoe/contrib But there is some kind of reference to footnotes in their docs building page here: as well as a |
Switched Markdown parser to Mistletoe.
Related to this issue.