Skip to content

Commit

Permalink
fix: if stdout is none, do not modify node value
Browse files Browse the repository at this point in the history
  • Loading branch information
Enter-tainer committed Jan 31, 2022
1 parent 4140af9 commit 738a00d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ function visitor(node) {
}
if (!child.stdout) {
console.warn("[remark-clang-format] empty stdout");
console.warn("code: ", node.value);
console.warn("[remark-clang-format] original code: ", node.value);
console.warn("[remark-clang-format] child info", child);
// node value left untouched
} else {
node.value = child.stdout;
}
node.value = child.stdout;
}
}
}
Expand Down

0 comments on commit 738a00d

Please sign in to comment.