You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0cd7414
Browse filesBrowse the repository at this point in the historyBrowse files
fix(legacy-html,man-page,sitemap): treat $$, $&, $` and $' in values as literal text
String.prototype.replace(placeholder, value) treats some $ sequences in a
string replacement as patterns ($$ -> $, $& -> the match, $` / $' -> the
template before/after the match). Page content, navigation, man page
options/environment text, and sitemap URL fields are filled this way, so
any of those sequences in the source produced broken output (e.g. the
addons.md Makefile example $$(command -v node) rendered with one $
missing).
Pass each value through a replacer function instead, since a function's
return value is inserted as-is.
Fixesnodejs#1181
Fix `$$`, `$&`, `` $` `` and `$'` in page content being treated as `String.prototype.replace` replacement patterns instead of literal text. This affected the legacy HTML generator's page and navigation content, the man page generator's options/environment sections, and the sitemap generator's URL entries.
0 commit comments