From 26b5fc4a6d2c9f6aacb0d11bfba3a334aeca3fc2 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 3 Mar 2012 18:07:47 +0000 Subject: [PATCH] Fixed default type for unknown typed text blocks --- js/WikiTextRules.js | 2 +- tiddlywiki5/tiddlers/TypedBlockTests.tid | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/js/WikiTextRules.js b/js/WikiTextRules.js index 4fe54ee19..c59a893e8 100755 --- a/js/WikiTextRules.js +++ b/js/WikiTextRules.js @@ -414,7 +414,7 @@ var rules = [ oldNextMatch = w.nextMatch, oldChildren = w.children, oldDependencies = w.dependencies, - parseTree = w.store.parseText(mimeType,content); + parseTree = w.store.parseText(mimeType,content,{defaultType: "text/plain"}); w.output = oldOutput; w.source = oldSource; w.nextMatch = oldNextMatch; diff --git a/tiddlywiki5/tiddlers/TypedBlockTests.tid b/tiddlywiki5/tiddlers/TypedBlockTests.tid index f49cfe652..69e55be79 100644 --- a/tiddlywiki5/tiddlers/TypedBlockTests.tid +++ b/tiddlywiki5/tiddlers/TypedBlockTests.tid @@ -42,3 +42,14 @@ Which renders as: $$$.json {"teapot": "brown","inside":["milk","sugar",23]} $$$ + +Unknown types render as plain text: +{{{ +$$$text/unknown +Some plain text, which will not be //formatted//. +$$$ +}}} +Which renders as: +$$$text/unknown +Some plain text, which will not be //formatted//. +$$$