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'
1212import isURL from 'validator/lib/isURL'
1313
1414import { transform } from 'markmap-lib/dist/transform'
15- import { markmap } from 'markmap-lib/dist/view'
15+ import { Markmap } from 'markmap-lib/dist/view'
1616
1717import { stripTags } from '../../utils/string'
1818
@@ -561,11 +561,11 @@ export function finishView (view) {
561561 const content = $value . text ( )
562562 $value . unwrap ( )
563563 try {
564- const data = transform ( content )
564+ const { root : data } = transform ( content )
565565 $elem . html ( '<div class="markmap-container"><svg></svg></div>' )
566- markmap ( $elem . find ( 'svg' ) [ 0 ] , data , {
566+ Markmap . create ( $elem . find ( 'svg' ) [ 0 ] , {
567567 duration : 0
568- } )
568+ } , data )
569569 } catch ( err ) {
570570 $elem . html ( `<div class="alert alert-warning">${ escapeHTML ( err ) } </div>` )
571571 console . warn ( err )
You can’t perform that action at this time.
0 commit comments