-
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
the way markdown links are written in the dart docs is not recognized by many markdown parsers #23601
Comments
cc @alan-knight is this something we can change? I'm not sure how the MDN links get into the HTML docs in the first place. |
I think this would be a good idea. Currently it's also a pain to say provide a comment on a link in a comment. For example |
The new dartdoc will not convert |
The sister markdown bug, dart-lang/markdown#53 was fixed in dart-lang/markdown#54. |
Thanks! The new dartdoc doesn't support |
@sethladd Wait, this issue was not about what I still see a space in the markdown generated by Webstorm: If I try to get the dartdocs by dart services, I don't get a space but a new line If I would paste these dartdocs to for example common mark, then it still doesn't recognize the link: |
Ah, thanks for the clarification. Yes, we need to fix all the comments in our docs, to generate correct markdown links. cc @alan-knight @terrylucas what are we using to generate the HTML libraries? Is there a place we can fix how the links are generated? |
Here's a fix for all of the Note: This fix is important before the dartdoc package bumps the markdown package above 0.8.0. There were too many in |
Here's the full delta which includes this issue – kevmoo/dartdoc@42a7fa2?diff=split |
Second patch: https://codereview.chromium.org/1437773003/ in addition to the patch above that I list: https://codereview.chromium.org/1401063004 |
BUG= #23601 R=kevmoo@google.com Review URL: https://codereview.chromium.org/1401063004 .
Ping.
|
Oh, I was wondering why this markdown issue kept popping up to the top level inbox and wouldn't go away :-) Those comments are generated out of the docs.json file, which has been passed down to us through the generations. It was once generated from somewhere else, or combined with data from elsewhere, but I'm pretty sure that if you edit them in there that will get propogated into html_dartium.dart and html_dart2js.dart It's also a question as to whether those links are actually still valid. But they aren't obviously all broken, so it's probably not too bad. |
Thanks so much @alan-knight !! Updated |
BUG= #23601 Tested with dartdoc package at HEAD with new markdown package 0.9. Looks great. R=alanknight@google.com Review URL: https://codereview.chromium.org/1440183003 .
OK last change log in the mail: https://codereview.chromium.org/1448963002/ which is the last needed to close this issue. |
BUG= #23601 R=alanknight@google.com Review URL: https://codereview.chromium.org/1448963002 .
OK this should be complete as of that last CL. |
thanks for fixing this @srawlins |
Many markdown links in the dartdocs are written in the following way:
[Node.textContent] (https://developer.mozilla.org/en-US/docs/Web/API/Node.textContent)
Node the space between [...] and (...). Writing links in this way is not regocnized by many markdown parsers:
http://johnmacfarlane.net/babelmark2/?normalize=1&text=%5BNode.textContent%5D+(https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FAPI%2FNode.textContent)
It would be easier for developers if they don't have to write custom markdown rules to parse those links. For example, I'm using the
marked-element
from polymer 1.0:https://elements.polymer-project.org/elements/marked-element
and this markdown parser doesn't recognise the dartdocs links.
The text was updated successfully, but these errors were encountered: