Skip to content

Commit 21c5aca

Browse files
committed
line in the sand.
1 parent be7c084 commit 21c5aca

File tree

7 files changed

+83
-118
lines changed

7 files changed

+83
-118
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ typings/
6363
dist
6464
.reify-cache
6565
src/**/mermaid.min.js
66+
src/temp/

src/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ module.exports = function umlPlugin(md, options) {
2323

2424
switch(langName) {
2525
case 'mermaid':
26-
mermaidParser.functions.getMarkup(code)
27-
.then(function(result) {
28-
return result
29-
}).catch((err) => {
30-
console.log(err)
31-
})
26+
return mermaidParser.functions.getMarkup(code)
27+
/*.then(function(result) {
28+
return result;
29+
})*/
3230
break;
3331
case 'plantuml':
3432
case 'dot':

src/mermaid-parser.js

Lines changed: 50 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
'use strict'
22

3-
const puppeteer = require('puppeteer')
43
const path = require('path')
4+
const fs = require('fs')
5+
const childProcess = require('child_process');
56

6-
// const mermaid = require('mermaid')
7+
const tempDir = path.join(__dirname, 'temp', 'mermaid')
8+
const outputFile = path.join(tempDir, 'output.data')
9+
const puppeteerScript = path.join(__dirname, './mermaid-puppeteer.js')
710

811
const functions = {
912
options: {},
@@ -21,57 +24,58 @@ const functions = {
2124
if (options) {
2225
this.options = options;
2326
}
24-
25-
// mermaid.initialize(Object.assign(this.mermaidParserDefaults, options))
27+
if (!fs.existsSync(tempDir)){
28+
fs.mkdirSync(tempDir);
29+
}
30+
const optionsFile = path.join(tempDir, 'options.data')
31+
// overwrites existing file
32+
fs.writeFileSync(optionsFile, JSON.stringify(this.options))
2633
},
2734

28-
async getMarkup(code) {
29-
const browser = await puppeteer.launch()
30-
const mermaidConfig = Object.assign(this.mermaidParserDefaults, this.options)
31-
try {
32-
const page = await browser.newPage()
33-
const file = path.join(__dirname, 'index.html')
34-
await page.goto(`file://${file}`)
35-
const definition = code;
36-
37-
const element = (await page.$$('#container'))[1];
38-
const divsCounts = await page.$$eval('#container', divs => divs.length);
39-
40-
await page.$eval('#container', (container, definition, mermaidConfig) => {
41-
container.innerHTML = definition
42-
window.mermaid.initialize(mermaidConfig)
43-
window.mermaid.init(undefined, container)
44-
}, definition, mermaidConfig)
45-
46-
const svg = await page.$eval('#container', container => container.innerHTML)
47-
48-
const resultSvg = svg
49-
50-
browser.close()
51-
return resultSvg;
52-
} catch ({
53-
str,
54-
hash
55-
}) {
56-
browser.close()
57-
return `<pre>${str}</pre>`
35+
getMarkup(code) {
36+
37+
const codeFile = path.join(tempDir, 'code.data')
38+
if (!fs.existsSync(tempDir)){
39+
fs.mkdirSync(tempDir);
5840
}
41+
// overwrites existing file
42+
fs.writeFileSync(codeFile, code)
5943

60-
/*try {
61-
var needsUniqueId = 'render' + (Math.floor(Math.random() * 10000)).toString()
62-
mermaid.mermaidAPI.render(needsUniqueId, code, sc => {
63-
code = sc
64-
})
65-
return `<div class="mermaid">${code}</div>`
66-
} catch ({
67-
str,
68-
hash
69-
}) {
70-
return `<pre>${str}</pre>`
71-
}*/
44+
runScript(puppeteerScript, function (err) {
45+
if (err) throw err;
46+
console.log('finished running mermaid-puppeteer.js');
47+
});
48+
49+
const output = fs.readFileSync(outputFile, 'utf-8')
50+
return '<div class="mermaid" data-processed="true">\n' + output + '\n</div>\n'
7251
}
7352
}
7453

54+
// https://stackoverflow.com/a/22649812/420827
55+
function runScript(scriptPath, callback) {
56+
57+
// keep track of whether callback has been invoked to prevent multiple invocations
58+
var invoked = false;
59+
60+
var process = childProcess.fork(scriptPath);
61+
62+
// listen for errors as they may prevent the exit event from firing
63+
process.on('error', function (err) {
64+
if (invoked) return;
65+
invoked = true;
66+
callback(err);
67+
});
68+
69+
// execute the callback once the process has finished running
70+
process.on('exit', function (code) {
71+
if (invoked) return;
72+
invoked = true;
73+
var err = code === 0 ? null : new Error('exit code ' + code);
74+
callback(err);
75+
});
76+
77+
}
78+
7579
module.exports = {
7680
functions
7781
};

src/mermaid-puppeteer.js

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
const puppeteer = require('puppeteer');
2+
const fs = require('fs')
23
const path = require('path');
34

45
(async () => {
56
const browser = await puppeteer.launch()
67
try {
8+
const tempDir = path.join(__dirname, 'temp', 'mermaid')
9+
const codeFile = path.join(tempDir, 'code.data')
10+
const optionsFile = path.join(tempDir, 'options.data')
11+
const outputFile = path.join(tempDir, 'output.data')
712

8-
const options = {}
13+
if (!fs.existsSync(tempDir)){
14+
throw err;
15+
}
16+
17+
const code = fs.readFileSync(codeFile, 'utf-8')
18+
const options = JSON.parse(fs.readFileSync(optionsFile, 'utf-8'))
919

1020
const mermaidParserDefaults = {
1121
startOnLoad: false,
@@ -20,25 +30,17 @@ const path = require('path');
2030
const page = await browser.newPage()
2131
const file = path.join(__dirname, 'index.html')
2232
await page.goto(`file://${file}`)
23-
const definition =
24-
`graph TD;
25-
A-->B;
26-
A-->C;
27-
B-->D;
28-
C-->D;`;
29-
30-
const element = (await page.$$('#container'))[1];
31-
const divsCounts = await page.$$eval('#container', divs => divs.length);
32-
33-
await page.$eval('#container', (container, definition, mermaidConfig) => {
34-
container.innerHTML = definition
33+
34+
await page.$eval('#container', (container, code, mermaidConfig) => {
35+
container.innerHTML = code
3536
window.mermaid.initialize(mermaidConfig)
3637
window.mermaid.init(undefined, container)
37-
}, definition, mermaidConfig)
38+
}, code, mermaidConfig)
3839

3940
const svg = await page.$eval('#container', container => container.innerHTML)
4041

41-
console.log('svg:', svg);
42+
// overwrites existing file
43+
fs.writeFileSync(outputFile, svg)
4244

4345
await browser.close()
4446
}

test/fixtures/mermaid/default.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ graph TD;
88
C-->D;
99
```
1010
.
11-
<div class="mermaid">graph TD;
12-
A-->B;
13-
A-->C;
14-
B-->D;
15-
C-->D;</div>b
11+
<div class="mermaid" data-processed="true">
12+
<svg id="mermaid-1567470580104" width="100%" xmlns="http://www.w3.org/2000/svg" style="max-width: 124.640625px;" viewBox="0 0 124.640625 233"><style>#mermaid-1567470580104 .label{font-family:\'trebuchet ms\', verdana, arial;color:#333}#mermaid-1567470580104 .label text{fill:#333}#mermaid-1567470580104 .node rect,#mermaid-1567470580104 .node circle,#mermaid-1567470580104 .node ellipse,#mermaid-1567470580104 .node polygon{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-1567470580104 .node.clickable{cursor:pointer}#mermaid-1567470580104 .arrowheadPath{fill:#333}#mermaid-1567470580104 .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-1567470580104 .edgeLabel{background-color:#e8e8e8}#mermaid-1567470580104 .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-1567470580104 .cluster text{fill:#333}#mermaid-1567470580104 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\'trebuchet ms\', verdana, arial;font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-1567470580104 .actor{stroke:#ccf;fill:#ECECFF}#mermaid-1567470580104 text.actor{fill:#000;stroke:none}#mermaid-1567470580104 .actor-line{stroke:grey}#mermaid-1567470580104 .messageLine0{stroke-width:1.5;stroke-dasharray:\'2 2\';stroke:#333}#mermaid-1567470580104 .messageLine1{stroke-width:1.5;stroke-dasharray:\'2 2\';stroke:#333}#mermaid-1567470580104 #arrowhead{fill:#333}#mermaid-1567470580104 .sequenceNumber{fill:#fff}#mermaid-1567470580104 #sequencenumber{fill:#333}#mermaid-1567470580104 #crosshead path{fill:#333 !important;stroke:#333 !important}#mermaid-1567470580104 .messageText{fill:#333;stroke:none}#mermaid-1567470580104 .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-1567470580104 .labelText{fill:#000;stroke:none}#mermaid-1567470580104 .loopText{fill:#000;stroke:none}#mermaid-1567470580104 .loopLine{stroke-width:2;stroke-dasharray:\'2 2\';stroke:#ccf}#mermaid-1567470580104 .note{stroke:#aa3;fill:#fff5ad}#mermaid-1567470580104 .noteText{fill:black;stroke:none;font-family:\'trebuchet ms\', verdana, arial;font-size:14px}#mermaid-1567470580104 .activation0{fill:#f4f4f4;stroke:#666}#mermaid-1567470580104 .activation1{fill:#f4f4f4;stroke:#666}#mermaid-1567470580104 .activation2{fill:#f4f4f4;stroke:#666}#mermaid-1567470580104 .section{stroke:none;opacity:0.2}#mermaid-1567470580104 .section0{fill:rgba(102,102,255,0.49)}#mermaid-1567470580104 .section2{fill:#fff400}#mermaid-1567470580104 .section1,#mermaid-1567470580104 .section3{fill:#fff;opacity:0.2}#mermaid-1567470580104 .sectionTitle0{fill:#333}#mermaid-1567470580104 .sectionTitle1{fill:#333}#mermaid-1567470580104 .sectionTitle2{fill:#333}#mermaid-1567470580104 .sectionTitle3{fill:#333}#mermaid-1567470580104 .sectionTitle{text-anchor:start;font-size:11px;text-height:14px}#mermaid-1567470580104 .grid .tick{stroke:#d3d3d3;opacity:0.3;shape-rendering:crispEdges}#mermaid-1567470580104 .grid path{stroke-width:0}#mermaid-1567470580104 .today{fill:none;stroke:red;stroke-width:2px}#mermaid-1567470580104 .task{stroke-width:2}#mermaid-1567470580104 .taskText{text-anchor:middle;font-size:11px}#mermaid-1567470580104 .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px}#mermaid-1567470580104 .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-1567470580104 .task.clickable{cursor:pointer}#mermaid-1567470580104 .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-1567470580104 .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-1567470580104 .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-1567470580104 .taskText0,#mermaid-1567470580104 .taskText1,#mermaid-1567470580104 .taskText2,#mermaid-1567470580104 .taskText3{fill:#fff}#mermaid-1567470580104 .task0,#mermaid-1567470580104 .task1,#mermaid-1567470580104 .task2,#mermaid-1567470580104 .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-1567470580104 .taskTextOutside0,#mermaid-1567470580104 .taskTextOutside2{fill:#000}#mermaid-1567470580104 .taskTextOutside1,#mermaid-1567470580104 .taskTextOutside3{fill:#000}#mermaid-1567470580104 .active0,#mermaid-1567470580104 .active1,#mermaid-1567470580104 .active2,#mermaid-1567470580104 .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-1567470580104 .activeText0,#mermaid-1567470580104 .activeText1,#mermaid-1567470580104 .activeText2,#mermaid-1567470580104 .activeText3{fill:#000 !important}#mermaid-1567470580104 .done0,#mermaid-1567470580104 .done1,#mermaid-1567470580104 .done2,#mermaid-1567470580104 .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-1567470580104 .doneText0,#mermaid-1567470580104 .doneText1,#mermaid-1567470580104 .doneText2,#mermaid-1567470580104 .doneText3{fill:#000 !important}#mermaid-1567470580104 .crit0,#mermaid-1567470580104 .crit1,#mermaid-1567470580104 .crit2,#mermaid-1567470580104 .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-1567470580104 .activeCrit0,#mermaid-1567470580104 .activeCrit1,#mermaid-1567470580104 .activeCrit2,#mermaid-1567470580104 .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-1567470580104 .doneCrit0,#mermaid-1567470580104 .doneCrit1,#mermaid-1567470580104 .doneCrit2,#mermaid-1567470580104 .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-1567470580104 .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-1567470580104 .milestoneText{font-style:italic}#mermaid-1567470580104 .doneCritText0,#mermaid-1567470580104 .doneCritText1,#mermaid-1567470580104 .doneCritText2,#mermaid-1567470580104 .doneCritText3{fill:#000 !important}#mermaid-1567470580104 .activeCritText0,#mermaid-1567470580104 .activeCritText1,#mermaid-1567470580104 .activeCritText2,#mermaid-1567470580104 .activeCritText3{fill:#000 !important}#mermaid-1567470580104 .titleText{text-anchor:middle;font-size:18px;fill:#000}#mermaid-1567470580104 g.classGroup text{fill:#9370db;stroke:none;font-family:\'trebuchet ms\', verdana, arial;font-size:10px}#mermaid-1567470580104 g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-1567470580104 g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-1567470580104 .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-1567470580104 .classLabel .label{fill:#9370db;font-size:10px}#mermaid-1567470580104 .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-1567470580104 #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1567470580104 #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1567470580104 #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-1567470580104 #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-1567470580104 #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1567470580104 #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1567470580104 #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1567470580104 #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1567470580104 .commit-id,#mermaid-1567470580104 .commit-msg,#mermaid-1567470580104 .branch-label{fill:lightgrey;color:lightgrey}\n</style><style>#mermaid-1567470580104 {\n color: rgb(0, 0, 0);\n font: normal normal 400 normal 16px / normal "Times New Roman";\n }</style><g transform="translate(-12, -12)"><g class="output"><g class="clusters"></g><g class="edgePaths"><g class="edgePath" style="opacity: 1;"><path class="path" d="M59.19140625,56.33049345021176L34.53125,84L34.53125,109" marker-end="url(#arrowhead14)" style="fill:none"></path><defs><marker id="arrowhead14" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="strokeWidth" markerWidth="8" markerHeight="6" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></path></marker></defs></g><g class="edgePath" style="opacity: 1;"><path class="path" d="M89.19140625,56.33049345021176L113.8515625,84L113.8515625,109" marker-end="url(#arrowhead15)" style="fill:none"></path><defs><marker id="arrowhead15" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="strokeWidth" markerWidth="8" markerHeight="6" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></path></marker></defs></g><g class="edgePath" style="opacity: 1;"><path class="path" d="M34.53125,148L34.53125,173L59.19140625,200.66950654978825" marker-end="url(#arrowhead16)" style="fill:none"></path><defs><marker id="arrowhead16" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="strokeWidth" markerWidth="8" markerHeight="6" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></path></marker></defs></g><g class="edgePath" style="opacity: 1;"><path class="path" d="M113.8515625,148L113.8515625,173L89.19140625,200.66950654978825" marker-end="url(#arrowhead17)" style="fill:none"></path><defs><marker id="arrowhead17" viewBox="0 0 10 10" refX="9" refY="5" markerUnits="strokeWidth" markerWidth="8" markerHeight="6" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowheadPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></path></marker></defs></g></g><g class="edgeLabels"><g class="edgeLabel" style="opacity: 1;" transform=""><g transform="translate(0,0)" class="label"><rect rx="0" ry="0" width="0" height="0" style="fill:#e8e8e8;"></rect><text><tspan xml:space="preserve" dy="1em" x="1"></tspan></text></g></g><g
13+
class="edgeLabel" style="opacity: 1;" transform=""><g transform="translate(0,0)" class="label"><rect rx="0" ry="0" width="0" height="0" style="fill:#e8e8e8;"></rect><text><tspan xml:space="preserve" dy="1em" x="1"></tspan></text></g></g><g class="edgeLabel" style="opacity: 1;" transform=""><g transform="translate(0,0)" class="label"><rect rx="0" ry="0" width="0" height="0" style="fill:#e8e8e8;"></rect><text><tspan xml:space="preserve" dy="1em" x="1"></tspan></text></g></g><g class="edgeLabel" style="opacity: 1;" transform=""><g transform="translate(0,0)" class="label"><rect rx="0" ry="0" width="0" height="0" style="fill:#e8e8e8;"></rect><text><tspan xml:space="preserve" dy="1em" x="1"></tspan></text></g></g></g><g class="nodes"><g class="node" id="A" transform="translate(74.19140625,39.5)" style="opacity: 1;"><rect rx="0" ry="0" x="-15" y="-19.5" width="30" height="39"></rect><g class="label" transform="translate(0,0)"><g transform="translate(-5,-9.5)"><text><tspan xml:space="preserve" dy="1em" x="1">A</tspan></text></g></g></g><g class="node" id="B" transform="translate(34.53125,128.5)" style="opacity: 1;"><rect rx="0" ry="0" x="-14.53125" y="-19.5" width="29.0625" height="39"></rect><g class="label" transform="translate(0,0)"><g transform="translate(-4.53125,-9.5)"><text><tspan xml:space="preserve" dy="1em" x="1">B</tspan></text></g></g></g><g class="node" id="C" transform="translate(113.8515625,128.5)" style="opacity: 1;"><rect rx="0" ry="0" x="-14.7890625" y="-19.5" width="29.578125" height="39"></rect><g class="label" transform="translate(0,0)"><g transform="translate(-4.7890625,-9.5)"><text><tspan xml:space="preserve" dy="1em" x="1">C</tspan></text></g></g></g><g class="node" id="D" transform="translate(74.19140625,217.5)" style="opacity: 1;"><rect rx="0" ry="0" x="-15" y="-19.5" width="30" height="39"></rect><g class="label" transform="translate(0,0)"><g transform="translate(-5,-9.5)"><text><tspan xml:space="preserve" dy="1em" x="1">D</tspan></text></g></g></g></g></g></g></svg>
14+
</div>
1615
.
16+

test/mermaid.js

Lines changed: 4 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import md from 'markdown-it'
77
import umlPlugin from '../src/index.js'
88

99
describe('markdown-it-textual-uml: mermaid', function() {
10-
/*it('test sanity', function () {
10+
it('test sanity', function () {
1111
md().use(umlPlugin);
1212
assert(md().render('# Hello world').trim() === '<h1>Hello world</h1>', '# Hello world')
1313
assert(md().render('Hello world').trim() === '<p>Hello world</p>', 'Hello world')
@@ -22,8 +22,9 @@ describe('markdown-it-textual-uml: mermaid', function() {
2222
C -->|Two| E[iPhone]
2323
C -->|Three| F[Car]
2424
\`\`\``));
25-
});*/
25+
});
2626

27+
/*
2728
it('test default', function() {
2829
var defaultParser = md().use(umlPlugin)
2930
@@ -40,46 +41,5 @@ describe('markdown-it-textual-uml: mermaid', function() {
4041
}
4142
runGenerate();
4243
})
44+
*/
4345
})
44-
45-
// console.log(mdi.render(`\`\`\`
46-
// graph TD
47-
// A[Christmas] -->|Get money| B(Go shopping)
48-
// B --> C{Let me think}
49-
// C -->|One| D[Laptop]
50-
// C -->|Two| E[iPhone]
51-
// C -->|Three| F[Car]
52-
// \`\`\``))
53-
// console.log(mdi.render(`\`\`\`
54-
// graph TD
55-
// A[Christmas] -->|Get money| B(Go shopping)
56-
// B ----> C{Let me think}
57-
// C -->|One| D[Laptop]
58-
// C -->|Two| E[iPhone]
59-
// C -->|Three| F[Car]
60-
// \`\`\``))
61-
62-
// assert(mdi.render(`\`\`\`mermaid
63-
// graph TD
64-
// A[Christmas] -->|Get money| B(Go shopping)
65-
// B --> C{Let me think}
66-
// C -->|One| D[Laptop]
67-
// C -->|Two| E[iPhone]
68-
// C -->|Three| F[Car]
69-
// \`\`\``).indexOf('class="mermaid"') > -1)
70-
// assert(mdi.render(`\`\`\`
71-
// graph TD
72-
// A[Christmas] -->|Get money| B(Go shopping)
73-
// B --> C{Let me think}
74-
// C -->|One| D[Laptop]
75-
// C -->|Two| E[iPhone]
76-
// C -->|Three| F[Car]
77-
// \`\`\``).indexOf('class="mermaid"') > -1)
78-
// assert(mdi.render(`\`\`\`
79-
// graph TD
80-
// A[Christmas] -->|Get money| B(Go shopping)
81-
// B ----> C{Let me think}
82-
// C -->|One| D[Laptop]
83-
// C -->|Two| E[iPhone]
84-
// C -->|Three| F[Car]
85-
// \`\`\``).indexOf('<pre>Parse error') > -1)

test/tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
//require('./plantuml.js')
2-
//require('./ditaa.js')
1+
require('./plantuml.js')
2+
require('./ditaa.js')
33
require('./mermaid.js')

0 commit comments

Comments
 (0)