markdown-up 3.11.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/script.js +5 -5
- package/package.json +2 -2
package/lib/script.js
CHANGED
|
@@ -62,22 +62,22 @@ export async function markdownScriptCodeBlock(codeBlock, options) {
|
|
|
62
62
|
// Parse the script
|
|
63
63
|
const script = parseScript(codeBlock.lines, codeBlock.startLineNumber + 1);
|
|
64
64
|
|
|
65
|
+
// Execute the script
|
|
66
|
+
await executeScriptAsync(script, options);
|
|
67
|
+
|
|
65
68
|
// Run the bare-script linter?
|
|
66
69
|
if ('logFn' in options && options.debug) {
|
|
67
|
-
const warnings = lintScript(script);
|
|
70
|
+
const warnings = lintScript(script, options.globals);
|
|
68
71
|
const warningPrefix = `MarkdownUp: Script static analysis...`;
|
|
69
72
|
if (warnings.length === 0) {
|
|
70
73
|
options.logFn(`${warningPrefix} OK`);
|
|
71
74
|
} else {
|
|
72
75
|
options.logFn(`${warningPrefix} ${warnings.length} warning${warnings.length > 1 ? 's' : ''}:`);
|
|
73
76
|
for (const warning of warnings) {
|
|
74
|
-
options.logFn(`MarkdownUp:
|
|
77
|
+
options.logFn(`MarkdownUp: ${warning}`);
|
|
75
78
|
}
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
|
-
|
|
79
|
-
// Execute the script
|
|
80
|
-
await executeScriptAsync(script, options);
|
|
81
81
|
} catch ({message}) {
|
|
82
82
|
errorMessage = message;
|
|
83
83
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "markdown-up",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.12.0",
|
|
5
5
|
"description": "MarkdownUp is a Markdown viewer",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"markdown",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test": "node --test test/"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"bare-script": "~3.
|
|
25
|
+
"bare-script": "~3.8",
|
|
26
26
|
"element-model": "~1.2",
|
|
27
27
|
"markdown-model": "~2.2",
|
|
28
28
|
"schema-markdown": "~1.2",
|