remark-clang-format
Advanced tools
Comparing version 1.9.2 to 1.9.3
12
index.js
@@ -19,9 +19,9 @@ 'use strict'; | ||
) { | ||
const child = spawnSync('clang-format', { input: node.value }); | ||
if (child.stderr) { | ||
console.warn('[remark-clang-format] stderr: ', String(child.stderr)); | ||
const child = spawnSync('clang-format', { input: node.value, shell: true }); | ||
if (child.stderr && String(child.stderr).length > 0) { | ||
console.error('[remark-clang-format] stderr: ', String(child.stderr)); | ||
} | ||
if (!child.stdout) { | ||
console.warn('[remark-clang-format] empty stdout'); | ||
console.warn('code: ', String(node.value)); | ||
if (!child.stdout || String(child.stdout).length < 2) { | ||
console.warning('[remark-clang-format] empty stdout'); | ||
console.warning('code: ', String(node.value)); | ||
} else { | ||
@@ -28,0 +28,0 @@ node.value = child.stdout; |
{ | ||
"name": "remark-clang-format", | ||
"version": "1.9.2", | ||
"version": "1.9.3", | ||
"description": "run clang-format for code in markdown", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
6426