nodejs.org
nodejs.org copied to clipboard
build script: generate unexpected hyperlink for fullwidth comma
When translating the docs, we need to use other input source, at present the script seems to mark the end of hyperlink with halfwidth comma, but if we use a fullwidth comma it would generate unexpected hyperlink, for example:
// generate expected "http://localhost:3000"
visit http://localhost:3000, and you will see a message 'Hello World'
// generate unexpected "http://localhost:3000,xxx"
visit http://localhost:3000,and you will see a message 'Hello World'
@marswong:This has been fixed at #1943,and the result seems fine by using "<>" to quote the link——

It should be fixed at the parser level so that you don't need to wrap the link with "<>"
@stevemao :OK. But this is a temporary fix :)
@marswong , @stevemao , @fhemberger :I don't know when and how to fix this parse. But for a temporary fix, I submitted this and if this parser is fixed, I'll change back.
Thanks all!!!
I think the only way to prevent a full-width comma from being part of the url is to surround the urls with <> or add a space before the comma
Agreed, the only proper solution would be to disallow GitHub flavored links and require all of them to be wrapped in <>. But it's not a simple change, there's so much old content and inconsistencies.
For starters, we should check how is this addressed upstream in core. Then we need to verify the release post template and tools follow this scheme, enable the check in the markdown linter and have some kind of basic link checker set up.
Closing as the legacy build script is not used anymore.