summaryrefslogtreecommitdiff
path: root/tools/doc
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2018-03-25 18:47:22 +0300
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2018-03-25 21:48:57 +0300
commit50e5eff12ab33f868067fb41601e9d8feb2d8177 (patch)
tree794b3cbd4ee46a312359bd89422aebfd805010b4 /tools/doc
parent9125479be92ec49c67be6bf46ba38bf9774587f8 (diff)
downloadandroid-node-v8-50e5eff12ab33f868067fb41601e9d8feb2d8177.tar.gz
android-node-v8-50e5eff12ab33f868067fb41601e9d8feb2d8177.tar.bz2
android-node-v8-50e5eff12ab33f868067fb41601e9d8feb2d8177.zip
tools: fix nits in tools/doc/common.js
PR-URL: https://github.com/nodejs/node/pull/19599 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'tools/doc')
-rw-r--r--tools/doc/common.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/doc/common.js b/tools/doc/common.js
index 3a66cbd7b0..48ff3d1b82 100644
--- a/tools/doc/common.js
+++ b/tools/doc/common.js
@@ -3,11 +3,9 @@
const yaml = require('js-yaml');
function isYAMLBlock(text) {
- return !!text.match(/^<!-- YAML/);
+ return /^<!-- YAML/.test(text);
}
-exports.isYAMLBlock = isYAMLBlock;
-
function arrify(value) {
return Array.isArray(value) ? value : [value];
}
@@ -32,11 +30,8 @@ function extractAndParseYAML(text) {
}
meta.changes = meta.changes || [];
- for (const entry of meta.changes) {
- entry.description = entry.description.replace(/^\^\s*/, '');
- }
return meta;
}
-exports.extractAndParseYAML = extractAndParseYAML;
+module.exports = { isYAMLBlock, extractAndParseYAML };