Skip to content

Commit 967cdba

Browse files
author
Chris Young
committed
doc: use better regex
Fixes: #10726
1 parent d01c036 commit 967cdba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/doc/html.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const typeParser = require('./type-parser.js');
3131
module.exports = toHTML;
3232

3333
const STABILITY_TEXT_REG_EXP = /(.*:)\s*(\d)([\s\S]*)/;
34-
const DOC_CREATED_REG_EXP = /<!--introduced_in( )?=( )?v([0-9]+)\.([0-9]+)\.([0-9]+)-->/;
34+
const DOC_CREATED_REG_EXP = /<!--\s*introduced_in\s*=\s*v([0-9]+)\.([0-9]+)\.([0-9]+)\s*-->/;
3535

3636
// customized heading without id attribute
3737
const renderer = new marked.Renderer();
@@ -219,7 +219,7 @@ function altDocs(filename) {
219219
{ num: '5.x' },
220220
{ num: '4.x', lts: true },
221221
{ num: '0.12.x' },
222-
{ num: '0.10.x' },
222+
{ num: '0.10.x' }
223223
];
224224

225225
const host = 'https://nodejs.org';

0 commit comments

Comments
 (0)