Skip to content

Commit fe4e511

Browse files
vsemozhetbytMylesBorins
authored andcommitted
tools: fix nits in tools/doc/common.js
PR-URL: #19599 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 11b8d47 commit fe4e511

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

‎tools/doc/common.js‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
constyaml=require('js-yaml');
44

55
functionisYAMLBlock(text){
6-
return!!text.match(/^<!--YAML/);
6+
return/^<!--YAML/.test(text);
77
}
88

9-
exports.isYAMLBlock=isYAMLBlock;
10-
119
functionarrify(value){
1210
returnArray.isArray(value) ? value : [value];
1311
}
@@ -32,11 +30,8 @@ function extractAndParseYAML(text){
3230
}
3331

3432
meta.changes=meta.changes||[];
35-
for(constentryofmeta.changes){
36-
entry.description=entry.description.replace(/^\^\s*/,'');
37-
}
3833

3934
returnmeta;
4035
}
4136

42-
exports.extractAndParseYAML=extractAndParseYAML;
37+
module.exports={ isYAMLBlock,extractAndParseYAML};

0 commit comments

Comments
(0)