remark-clang-format
Advanced tools
Comparing version 2.2.0 to 2.5.0
10
index.js
'use strict'; | ||
import { visit } from 'unist-util-visit'; | ||
import { spawnSync as spawnSync } from 'child_process'; | ||
var visit = require("unist-util-visit"); | ||
// var fs = require("fs"); | ||
var spawnSync = require("child_process").spawnSync; | ||
@@ -15,3 +16,3 @@ function visitor(node) { | ||
(!node.meta || !node.meta.includes('nolint')) && | ||
(node.value && node.value.includes('--8<--')) | ||
(node.value && (!node.value.includes('--8<--'))) | ||
) { | ||
@@ -24,3 +25,4 @@ const child = spawnSync('clang-format', { input: node.value }); | ||
export default function attacher() { | ||
module.exports = function attacher() { | ||
return function transformer(tree) { | ||
@@ -27,0 +29,0 @@ visit(tree, visitor); |
{ | ||
"name": "remark-clang-format", | ||
"version": "2.2.0", | ||
"version": "2.5.0", | ||
"description": "run clang-format for code in markdown", | ||
@@ -40,4 +40,3 @@ "main": "index.js", | ||
"zx": "^2.0.0" | ||
}, | ||
"type": "module" | ||
} | ||
} |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
6086
61
No