hdoc-tools 0.41.2 → 0.41.3

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/hdoc-build.js CHANGED
@@ -526,13 +526,15 @@
526
526
  const tmpInput = tmp.fileSync({ postfix: ".mmd" });
527
527
  const tmpOutput = tmp.fileSync({ postfix: ".svg" });
528
528
 
529
+ /*
529
530
  if (!str.startsWith('---')) {
530
531
  str = '---\n' + fs.readFileSync(mermaid_theme_path, {encoding: 'utf-8'}) + `\n---\n${str}`;
531
532
  }
533
+ */
532
534
 
533
535
  fs.writeFileSync(tmpInput.name, str);
534
536
  let cmd = `${__dirname}/node_modules/.bin/mmdc`;
535
-
537
+
536
538
  if (process.platform === "win32") {
537
539
  cmd = `"${cmd}"`;
538
540
  }
package/hdoc-serve.js CHANGED
@@ -137,13 +137,20 @@
137
137
  const tmpInput = tmp.fileSync({ postfix: ".mmd" });
138
138
  const tmpOutput = tmp.fileSync({ postfix: ".svg" });
139
139
 
140
+ /*
140
141
  if (!str.startsWith('---')) {
141
142
  str = '---\n' + fs.readFileSync(mermaid_theme_path, {encoding: 'utf-8'}) + `\n---\n${str}`;
142
143
  }
144
+ */
143
145
 
144
146
  fs.writeFileSync(tmpInput.name, str);
145
147
 
146
- const cmd = `${__dirname}/node_modules/.bin/mmdc -i "${tmpInput.name}" -o "${tmpOutput.name}" --quiet --backgroundColor transparent`;
148
+ let cmd = `${__dirname}/node_modules/.bin/mmdc`;
149
+
150
+ if (process.platform === "win32") {
151
+ cmd = `"${cmd}"`;
152
+ }
153
+ cmd = `${cmd} -i "${tmpInput.name}" -o "${tmpOutput.name}" --quiet --backgroundColor transparent`;
147
154
  console.log(`Generating Inline Mermaid SVG found in: ${file_path}`);
148
155
  execSync(cmd);
149
156
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.41.2",
3
+ "version": "0.41.3",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {