We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4db7848 commit 4c3465fCopy full SHA for 4c3465f
tools/doc/common.js
@@ -3,11 +3,9 @@
3
const yaml = require('js-yaml');
4
5
function isYAMLBlock(text) {
6
- return !!text.match(/^<!-- YAML/);
+ return /^<!-- YAML/.test(text);
7
}
8
9
-exports.isYAMLBlock = isYAMLBlock;
10
-
11
function arrify(value) {
12
return Array.isArray(value) ? value : [value];
13
@@ -32,11 +30,8 @@ function extractAndParseYAML(text) {
32
30
33
31
34
meta.changes = meta.changes || [];
35
- for (const entry of meta.changes) {
36
- entry.description = entry.description.replace(/^\^\s*/, '');
37
- }
38
39
return meta;
40
41
42
-exports.extractAndParseYAML = extractAndParseYAML;
+module.exports = { isYAMLBlock, extractAndParseYAML };
0 commit comments