Skip to content

Commit

Permalink
runkit demo
Browse files Browse the repository at this point in the history
  • Loading branch information
arve0 committed Aug 19, 2023
1 parent 8ee9a00 commit 8ef972c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const res = md.render(src);
console.log(res);
```

[demo as jsfiddle](https://jsfiddle.net/arve0/1kk1h6p3/4/)
[demo in RunKit](https://runkit.com/embed/k48mqe5q6p56)

### Options

Expand Down
10 changes: 4 additions & 6 deletions demo.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
'use strict';
var md = require('markdown-it')();
var implicitFigures = require('markdown-it-implicit-figures');
const md = require('markdown-it')();
const implicitFigures = require('markdown-it-implicit-figures');

md.use(implicitFigures, { dataType: true, figcaption: true });

var src = 'text with ![](img.png)\n\n![Will become caption.](fig.png "Foo bar")\n\nanother paragraph';
var res = md.render(src);
const src = 'text with ![](img.png)\n\n![Will become caption.](fig.png "Foo bar")\n\nanother paragraph';

console.log(res);
md.render(src) // output below

0 comments on commit 8ef972c

Please sign in to comment.