Skip to content

Commit f525d48

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

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

src/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ module.exports = function umlPlugin(md, options) {
2424
switch(langName) {
2525
case 'mermaid':
2626
return mermaidParser.functions.getMarkup(code)
27-
/*.then(function(result) {
28-
return result;
29-
})*/
3027
break;
3128
case 'plantuml':
3229
case 'dot':

src/mermaid-parser.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ const functions = {
4141
// overwrites existing file
4242
fs.writeFileSync(codeFile, code)
4343

44-
runScript(puppeteerScript, function (err) {
44+
/*runScript(puppeteerScript, function (err) {
4545
if (err) throw err;
4646
console.log('finished running mermaid-puppeteer.js');
47-
});
47+
});*/
48+
49+
childProcess.execSync('node ' + puppeteerScript)
4850

4951
const output = fs.readFileSync(outputFile, 'utf-8')
5052
return '<div class="mermaid" data-processed="true">\n' + output + '\n</div>\n'

test/mermaid.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ describe('markdown-it-textual-uml: mermaid', function() {
1414
});
1515

1616
it('test logging', function () {
17-
console.log(md().render(`\`\`\`mermaid
17+
this.timeout(5000)
18+
console.log(md().use(umlPlugin).render(`\`\`\`mermaid
1819
graph TD
1920
A[Christmas] -->|Get money| B(Go shopping)
2021
B --> C{Let me think}
@@ -24,8 +25,7 @@ describe('markdown-it-textual-uml: mermaid', function() {
2425
\`\`\``));
2526
});
2627

27-
/*
28-
it('test default', function() {
28+
/*it('test default', function() {
2929
var defaultParser = md().use(umlPlugin)
3030
3131
function runGenerate() {
@@ -40,6 +40,5 @@ describe('markdown-it-textual-uml: mermaid', function() {
4040
})
4141
}
4242
runGenerate();
43-
})
44-
*/
43+
})*/
4544
})

0 commit comments

Comments
 (0)