File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import unescapeHTML from 'lodash/unescape'
12
12
import isURL from 'validator/lib/isURL'
13
13
14
14
import { transform } from 'markmap-lib/dist/transform'
15
- import { markmap } from 'markmap-lib/dist/view'
15
+ import { Markmap } from 'markmap-lib/dist/view'
16
16
17
17
import { stripTags } from '../../utils/string'
18
18
@@ -561,11 +561,11 @@ export function finishView (view) {
561
561
const content = $value . text ( )
562
562
$value . unwrap ( )
563
563
try {
564
- const data = transform ( content )
564
+ const { root : data } = transform ( content )
565
565
$elem . html ( '<div class="markmap-container"><svg></svg></div>' )
566
- markmap ( $elem . find ( 'svg' ) [ 0 ] , data , {
566
+ Markmap . create ( $elem . find ( 'svg' ) [ 0 ] , {
567
567
duration : 0
568
- } )
568
+ } , data )
569
569
} catch ( err ) {
570
570
$elem . html ( `<div class="alert alert-warning">${ escapeHTML ( err ) } </div>` )
571
571
console . warn ( err )
You can’t perform that action at this time.
0 commit comments