nodejs.org icon indicating copy to clipboard operation
nodejs.org copied to clipboard

build script: generate unexpected hyperlink for fullwidth comma

Open marswong opened this issue 7 years ago • 6 comments

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 avatar Apr 02 '18 03:04 marswong

@marswong:This has been fixed at #1943,and the result seems fine by using "<>" to quote the link—— image

ghost avatar Dec 17 '18 00:12 ghost

It should be fixed at the parser level so that you don't need to wrap the link with "<>"

stevemao avatar Dec 17 '18 03:12 stevemao

@stevemao :OK. But this is a temporary fix :)

ghost avatar Dec 17 '18 03:12 ghost

@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!!!

ghost avatar Dec 17 '18 03:12 ghost

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

UziTech avatar Mar 15 '19 02:03 UziTech

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.

XhmikosR avatar Sep 29 '19 13:09 XhmikosR

Closing as the legacy build script is not used anymore.

ovflowd avatar Mar 12 '23 13:03 ovflowd