How do I change the smart-quote behavior in Pollen Markdown? #100

Open
opened 4 years ago by kolstadmagnus · 3 comments
kolstadmagnus commented 4 years ago (Migrated from github.com)

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?

I assume I have to adjust [this parser](https://github.com/greghendershott/markdown) in a similar manner to what’s [explained here](https://docs.racket-lang.org/pollen/Typography.html). 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?
mbutterick commented 4 years ago (Migrated from github.com)

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.

> 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.
kolstadmagnus commented 4 years ago (Migrated from github.com)

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?

>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?
mbutterick commented 4 years ago (Migrated from github.com)

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.

> the parser is a part of the Pollen package Yes, in a sense. The Markdown parser is a [separate package](https://github.com/greghendershott/markdown) 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.
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen-users#100
Loading…
There is no content yet.