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

alter_syntax: more parameters #75

Open
kysko opened this issue Jun 26, 2024 · 1 comment
Open

alter_syntax: more parameters #75

kysko opened this issue Jun 26, 2024 · 1 comment

Comments

@kysko
Copy link

kysko commented Jun 26, 2024

A feature enhancement suggestion:

When changing or extending the markdown syntax with the help of alter_syntax, one might need parse_blocks in addition to the syntax parameter.

A simple change in a line does it:

syntax = options.alter_syntax(syntax, parse_blocks)

Although it's easy to pass writer to the new parser, one might even go further with the following, for convenience:

syntax = options.alter_syntax(syntax, parse_blocks, writer)

I've successfully used this second version in a personal project.

However, I don't have the "whole picture" like you people, so don't know if the above would break something somewhere I haven't looked.

@tarleb
Copy link
Contributor

tarleb commented Aug 9, 2024

I second this, having parse_blocks and parse_inlines as additional parameters would be very helpful.

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

No branches or pull requests

2 participants