1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +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:
Jermolene 2014-09-19 15:03:52 +01:00
parent 7ed7aba8d0
commit 9e6dab06cc

View File

@ -56,8 +56,9 @@ function transformNode(node) {
var MarkdownParser = function(type,text,options) {
var dialect = options.wiki.getTiddlerText(CONFIG_DIALECT_TIDDLER,DEFAULT_DIALECT),
markdownTree = markdown.toHTMLTree(text,dialect);
this.tree = transformNodes(markdownTree.slice(1));
markdownTree = markdown.toHTMLTree(text,dialect),
node = $tw.utils.isArray(markdownTree[1]) ? markdownTree.slice(1) : markdownTree.slice(2);
this.tree = transformNodes(node);
};
/*