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.
print-window-tiddler
Jermolene 2014-09-19 15:03:52 +01:00
rodzic 7ed7aba8d0
commit 9e6dab06cc
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -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);
};
/*