Skip to content

Commit e6c108d

Browse files
HeRaNOEnter-tainer
authored andcommitted
format-code.js: output original code when meeting error
1 parent a2bddf6 commit e6c108d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

code/format-code.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function visitor(node) {
2121
'[remark-clang-format] stderr: ',
2222
child.stderr.toString(),
2323
);
24+
console.warn('[remark-clang-format] original code: ', node.value);
2425
break;
2526
}
2627
if (!child.stdout) {
@@ -41,6 +42,7 @@ function visitor(node) {
4142
});
4243
if (child.stderr && child.stderr.length > 0) {
4344
console.warn('[remark-ruff] stderr: ', child.stderr.toString());
45+
console.warn('[remark-ruff] original code: ', node.value);
4446
break;
4547
}
4648
if (!child.stdout) {

0 commit comments

Comments
 (0)