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

Change the Markdown parser #321

Merged
merged 2 commits into from
Mar 5, 2015
Merged

Change the Markdown parser #321

merged 2 commits into from
Mar 5, 2015

Conversation

okuryu
Copy link
Member

@okuryu okuryu commented Mar 3, 2015

It changes the Markdown parser from marked to markdown-it.

Potential security issues have been reported to the marked, but there is no plan to still be fixed. Because YUIDoc is an one of the development tool, I have thought unlikely to be affected by the problem. However, marked is no longer actively maintained, and I'd like to choice a parser that are more maintenance.

Since YUIDoc only have utilized simply marked as a simple Markdown parser, change can often be reduced.

/cc @juandopazo @caridy

Potential security issues have been reported to the marked, but there
is no plan to still be fixed. Because YUIDoc is a one of the development
tool, I have thought unlikely to be affected by the problem. However,
marked is no longer actively maintained, and I'd like to choice a parser
that are more maintenance.

Since YUIDoc only have utilized simply marked as a simple Markdown parser,
change can often be reduced.
@yahoocla
Copy link

yahoocla commented Mar 3, 2015

CLA is valid!

markdown: function (md) {
var html = marked(md, this.options.markdown);
markdown: function (data) {
var md = new MarkdownIt(this.options.markdown);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we create the instance only once? Also, what are the defaults for this.options.markdown?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I'll take a look!

@okuryu
Copy link
Member Author

okuryu commented Mar 4, 2015

Okay, changed to reuse an instance of MarkdownIt in an instance of DocBuilder.

@juandopazo
Copy link
Member

Looks good!

@okuryu
Copy link
Member Author

okuryu commented Mar 5, 2015

Thanks a lot!

@okuryu okuryu merged commit 59e05a8 into yui:master Mar 5, 2015
@okuryu okuryu deleted the markdown-it branch March 5, 2015 11:24
@okuryu okuryu added this to the v0.6.0 milestone Mar 5, 2015
@okuryu okuryu self-assigned this Mar 5, 2015
@schnittstabil schnittstabil mentioned this pull request Apr 15, 2015
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

Successfully merging this pull request may close these issues.

3 participants