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 <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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

+2-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
const yaml = require('js-yaml');
44

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

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

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

3934
return meta;
4035
}
4136

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

0 commit comments

Comments
 (0)