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

How to extends custom syntax #133

Open
jinyang1994 opened this issue Jan 8, 2019 · 2 comments
Open

How to extends custom syntax #133

jinyang1994 opened this issue Jan 8, 2019 · 2 comments
Labels

Comments

@jinyang1994
Copy link

I want to add some custom syntax in markup-it.
What should I do?

@Soreine
Copy link
Contributor

Soreine commented Jan 8, 2019

You need to write a set of rules like it is done in the markdown or html folders.
Rules are functions that are called, in order, to consume the input text during deserialization, or input node during serialization, and store their result in the State stack.

I'm sorry that we don't have a more detailed documentation and simple examples. You can play with the tests and the (quite complex) markdown parser implementation.

@jinyang1994
Copy link
Author

Thanks for your answer. Does it provide an interface for me to extend the syntax?
It might look like md.use in markdown-it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants