Open kolstadmagnus opened 3 years ago
really struggled with actually finding the Typography module so I could edit it
In DrRacket, right-click on a function and select “Open Defining File”
Is a similar approach possible for Markdown and its parser?
I didn’t write the Markdown parser, so I don’t know much about how it works. Though in general, if you don’t like its output, you may find it easier to put the parse tree through a second round of processing, rather than try to hack on the underlying parser.
In DrRacket, right-click on a function and select “Open Defining File”
I see. Thanks!
you may find it easier to put the parse tree through a second round of processing, rather than try to hack on the underlying parser.
That sounds like a smart idea, but I don’t have anywhere near the skills unfortunately.
I’ve looked over the parser, and think I know how to alter it to behave like I want. But how do I locate the underlying parser stored as it is on my computer? I assume it’s a similar approach as with locating the Typography module, since the parser is a part of the Pollen package?
the parser is a part of the Pollen package
Yes, in a sense. The Markdown parser is a separate package that is imported by Pollen.
That sounds like a smart idea, but I don’t have anywhere near the skills unfortunately.
You can achieve your goal by writing a suitable root
tag function in your Pollen project. You don’t need to hack the underlying Markdown parser.
I assume I have to adjust this parser in a similar manner to what’s explained here.
For Markup documents, I really struggled with actually finding the Typography module so I could edit it, so I ended up just copying the relevant code from the Pollen GitHub repository and pasting it in my own work environment, and then changing it there. This works fine.
Is a similar approach possible for Markdown and its parser? If it’s not, then what do I do?