How do I change the smart-quote behavior in Pollen Markdown?
#100
Open
opened 4 years ago by kolstadmagnus
·
3 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
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?
In DrRacket, right-click on a function and select “Open Defining File”
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.
I see. Thanks!
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?
Yes, in a sense. The Markdown parser is a separate package that is imported by Pollen.
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.