Ask questionsGlobal-based Variable will generate strange characters
In Nodejs.org, I find a very strange problem:
For https://github.com/nodejs/nodejs.org/blob/6bd285580639910a578df236617d99f3ce69b960/scripts/plugins/anchor-markdown-headings.js#L19, if I take this variable out of the scope of the function, it cannot pass the newly-added unit test for the version of Nodejs 10.15.3, but if the same Regex is put directly into the body of the function, everything seems normal. I'm NOT sure why it happens like this?
Answer questions addaleax
@MaledongGit Can you post a simplified reproduction? Otherwise it’s going to be hard for somebody else to tell what’s going on.