From ec488e910c46dbec7ca7029f19359b60da71283e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ord=C3=A1s?= <3125580+davorpa@users.noreply.github.com> Date: Sat, 17 Sep 2022 11:51:24 +0200 Subject: [PATCH] cleanup comments --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index f1394a4..9ecf241 100644 --- a/index.js +++ b/index.js @@ -31,9 +31,10 @@ const excludes = [ * @returns {string} an string with the name of the section related with the input heading */ function getSectionNameFromHeadingContent(children) { + // visit nodes in depth const walk = (children, depth) => children.reduce((text, node, index) => { - if (!node || !node.type) return text; + if (!node || !node.type) return text; // not AST, maybe plain text switch (node.type) { // // meaningfull nodes