-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Adds refered links to Markdown #3686
Conversation
5df23d3
to
634568d
Compare
@@ -641,3 +710,5 @@ class Markdown::Parser | |||
end | |||
end | |||
end | |||
|
|||
0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stray character? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, fixing it now! :)
634568d
to
f63e254
Compare
@Sija updated |
f63e254
to
996aa2d
Compare
I think it's kind of OK, there are many regexes and subtitutions, though, but I don't think the performance difference will matter. I'm not sure about replacing |
Maybe you can remove the 2nd pass in |
@spalladino I'm not sure if I understand you. I had an attempt before to process referenced links ( I could remove 2nd pass if there would exist I'm more than ok with future optimization, but at this moment I don't think if I could make it faster, more markdown spec accurate and easily to maintain. |
I think it's OK if we merge this. Eventually we should rewrite the whole parser with a better overall algorithm, maybe taking a look at how other parsers are implemented, or checking if the official site has some pointers on that. |
@asterite I've checked very briefly and it was not enough. I'm writing my own Jekyll-like blog generator so markdown will be quite important to me. I'll work on it later. |
@akwiatkowski you'll may like https://github.com/ysbaddaden/crystal-cmark for the time being? |
#codetriage
(incidentally, I wrote the link above with a reference link syntax, thanks GitHub editor!) |
Yes, definitely. The cmark shard exists because I needed a complete Markdown implementation, cmark is the reference implementation of CommonMark, and it only took minutes to write and publish bindings for it. But ultimately, a pure crystal, complete implementation of Markdow, following the CommonMark spec is the way to go. |
I think it would be wise to port the CommonMark implementation, or just write an implementation that conforms to CommonMark, and replace the current one. The current one was just created so that docs can be generated and shown without a new dependency, but it's far from complete, and it probably has some bugs too. |
Do we really need a markdown parser in the stdlib? I realise that it's required by the crystal compiler but if that's the only reason, wouldn't it be better to develop ways for the compiler to be able to use external shards? |
Since we'll use |
No description provided.