mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Fix problem with Maruku Markdown metadata
Fixes #855 - albeit it’s a bit of a kluge. The internal format returned by `markdown.toHTMLTree()` isn’t sufficiently well documented for me to be confident that the new code is resilient to all the things that might be returned.
This commit is contained in:
parent
7ed7aba8d0
commit
9e6dab06cc
@ -56,8 +56,9 @@ function transformNode(node) {
|
|||||||
|
|
||||||
var MarkdownParser = function(type,text,options) {
|
var MarkdownParser = function(type,text,options) {
|
||||||
var dialect = options.wiki.getTiddlerText(CONFIG_DIALECT_TIDDLER,DEFAULT_DIALECT),
|
var dialect = options.wiki.getTiddlerText(CONFIG_DIALECT_TIDDLER,DEFAULT_DIALECT),
|
||||||
markdownTree = markdown.toHTMLTree(text,dialect);
|
markdownTree = markdown.toHTMLTree(text,dialect),
|
||||||
this.tree = transformNodes(markdownTree.slice(1));
|
node = $tw.utils.isArray(markdownTree[1]) ? markdownTree.slice(1) : markdownTree.slice(2);
|
||||||
|
this.tree = transformNodes(node);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user