We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
some text is no longer working.
The text was updated successfully, but these errors were encountered:
I had the same issue, but only when using marked as described under "Pro level", so I investigated a bit:
This works as expected:
console.log(marked('~~strikethrough~~'));
and renders as:
<p><del>strikethrough</del></p>
When using the lexer and parser separately with a custom renderer, the following code
var tokens = marked.lexer('~~strikethrough~~', {renderer: myRenderer}); console.log(marked.parser(tokens, {renderer: myRenderer}));
ignores the strikethrough and produces:
<p>~~strikethrough~~</p>
As far as I can see, the marked.parser method seems to ignore the gfm: true default. The following code:
marked.parser
gfm: true
var tokens = marked.lexer('~~strikethrough~~', {renderer: myRenderer}); console.log(marked.parser(tokens, {renderer: myRenderer, gfm: true}));
outputs <p><del>strikethrough</del></p> again as expected.
So my issue here is that marked.parser() doesn't respect the default options.
marked.parser()
I have no idea if that is the same issue of @bsaelim, but it may be an explanation.
Sorry, something went wrong.
I think the issue as I described it may be resolved by pull request #1015.
I confirm #1015 solves this issue, but it has a performance problem if you call marked several times. For now, remember to do something like this:
var marked = require('marked'); var myRenderer = new marked.Renderer(); marked.setOptions({ renderer: myRenderer }); var tokens = var tokens = marked.lexer('~~strikethrough~~'); console.log(marked.parser(tokens));
outputs
I'm closing this in favor of the linked PR.
No branches or pull requests
some textis no longer working.The text was updated successfully, but these errors were encountered: