-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Need advice on extending marked with custom markup #57
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
Comments
I am also looking into extending marked. I am trying to implement a new inline rule, which is supposed to translate anything like
So I am injecting a new rule into the lexer and prototyped the replace function I am looking for. Unfortunately, this seems not to be enough. What am I missing? Would be grateful for any hints. EDIT: I haven't thoroughly looked into the code when I posted this, I suspected the rules to act like a chain, but it seems they don't. In order to make this work, some lines need to be added to the InlineLexer.prototype.output function, which is not actually possible without modifying the code. Though I might look into this more later, I want to just note down one finding: the function InlineLexer contains a line |
In my app I ended up pre-parsing the markdown using regex to add custom syntax, but I'd love to have this built in! |
+1 very needed feature! |
Closed - not actual anymore. We developped https://github.com/jonschlinkert/remarkable with pluggable syntax. |
We need to extend marked with
[[reference]]
syntax, that woud work in the same way, like highlight (via external function call)https://github.com/nodeca/ndoc/blob/master/syntax.md#short-links
Could you explain, how to monkeypatch marked, to add this inline tag?
The text was updated successfully, but these errors were encountered: