From 3d38d4add32a1cfebd9c331bc8772cc538710199 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 19 Nov 2012 16:58:16 +0000 Subject: [PATCH] Use text/x-tiddlywiki for old format TiddlyWiki text for compatibility --- core/modules/wiki.js | 2 +- plugins/tiddlywiki/tiddlyweb/tiddlyweb.js | 2 +- plugins/tiddlywiki/tw2parser/wikitextparser.js | 2 +- tests/wikitests/EighthTiddler.tid | 2 +- tests/wikitests/Fifth Tiddler.tid | 2 +- tests/wikitests/FirstTiddler.tid | 2 +- tests/wikitests/Fourth Tiddler.tid | 2 +- tests/wikitests/SecondTiddler.tid | 2 +- tests/wikitests/SeventhTiddler.tid | 2 +- tests/wikitests/SixthTiddler.tid | 2 +- tests/wikitests/ThirdTiddler.tid | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/modules/wiki.js b/core/modules/wiki.js index b80e90dde..4525e326a 100644 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -397,7 +397,7 @@ exports.initParsers = function(moduleType) { } }); // Install the rules for the old wikitext parser rules - var wikitextparser = this.parsers["text/vnd.tiddlywiki2"]; + var wikitextparser = this.parsers["text/x-tiddlywiki"]; if(wikitextparser) { wikitextparser.installRules(); } diff --git a/plugins/tiddlywiki/tiddlyweb/tiddlyweb.js b/plugins/tiddlywiki/tiddlyweb/tiddlyweb.js index d88505c99..b1d736beb 100644 --- a/plugins/tiddlywiki/tiddlyweb/tiddlyweb.js +++ b/plugins/tiddlywiki/tiddlyweb/tiddlyweb.js @@ -469,7 +469,7 @@ TiddlyWebSyncer.prototype.storeTiddler = function(tiddlerFields,revision) { if(result.type === "text/javascript") { result.type = "application/javascript"; } else if(!result.type || result.type === "None") { - result.type = "text/vnd.tiddlywiki2"; + result.type = "text/x-tiddlywiki"; } // Save the tiddler self.wiki.addTiddler(new $tw.Tiddler(self.wiki.getTiddler(result.title),result)); diff --git a/plugins/tiddlywiki/tw2parser/wikitextparser.js b/plugins/tiddlywiki/tw2parser/wikitextparser.js index 832387312..a78c22717 100644 --- a/plugins/tiddlywiki/tw2parser/wikitextparser.js +++ b/plugins/tiddlywiki/tw2parser/wikitextparser.js @@ -183,6 +183,6 @@ WikiTextParser.prototype.subWikifyTerm = function(output,terminatorRegExp) { this.output = oldOutput; }; -exports["text/vnd.tiddlywiki2"] = WikiTextParser; +exports["text/x-tiddlywiki"] = WikiTextParser; })(); diff --git a/tests/wikitests/EighthTiddler.tid b/tests/wikitests/EighthTiddler.tid index 169a4a319..9487bebf6 100644 --- a/tests/wikitests/EighthTiddler.tid +++ b/tests/wikitests/EighthTiddler.tid @@ -1,5 +1,5 @@ title: EighthTiddler -type: text/vnd.tiddlywiki2 +type: text/x-tiddlywiki <> <> diff --git a/tests/wikitests/Fifth Tiddler.tid b/tests/wikitests/Fifth Tiddler.tid index 323883542..30166d265 100644 --- a/tests/wikitests/Fifth Tiddler.tid +++ b/tests/wikitests/Fifth Tiddler.tid @@ -1,5 +1,5 @@ title: Fifth Tiddler -type: text/vnd.tiddlywiki2 +type: text/x-tiddlywiki |A caption above the table|c | Left | Middle | Right |h diff --git a/tests/wikitests/FirstTiddler.tid b/tests/wikitests/FirstTiddler.tid index 38cd5a168..f57ec7bc5 100644 --- a/tests/wikitests/FirstTiddler.tid +++ b/tests/wikitests/FirstTiddler.tid @@ -1,4 +1,4 @@ title: FirstTiddler -type: text/vnd.tiddlywiki2 +type: text/x-tiddlywiki This is the ''text'' of the first tiddler, with a @@font-size:8em;color:red;link@@ to the SecondTiddler, too. And a link to http://tiddlywiki.com/. diff --git a/tests/wikitests/Fourth Tiddler.tid b/tests/wikitests/Fourth Tiddler.tid index 41e018dde..8e5e83846 100644 --- a/tests/wikitests/Fourth Tiddler.tid +++ b/tests/wikitests/Fourth Tiddler.tid @@ -1,4 +1,4 @@ title: Fourth Tiddler -type: text/vnd.tiddlywiki2 +type: text/x-tiddlywiki A missing image [img[Something.jpg]] and a $1 couple of Ç Ç "HTML Entity" \ No newline at end of file diff --git a/tests/wikitests/SecondTiddler.tid b/tests/wikitests/SecondTiddler.tid index 758af7530..2201f05cf 100644 --- a/tests/wikitests/SecondTiddler.tid +++ b/tests/wikitests/SecondTiddler.tid @@ -1,5 +1,5 @@ title: SecondTiddler -type: text/vnd.tiddlywiki2 +type: text/x-tiddlywiki !!Heading This is the second tiddler. It has a list: diff --git a/tests/wikitests/SeventhTiddler.tid b/tests/wikitests/SeventhTiddler.tid index f92f4de90..bcf2c8f98 100644 --- a/tests/wikitests/SeventhTiddler.tid +++ b/tests/wikitests/SeventhTiddler.tid @@ -1,5 +1,5 @@ title: SeventhTiddler -type: text/vnd.tiddlywiki2 +type: text/x-tiddlywiki <> diff --git a/tests/wikitests/SixthTiddler.tid b/tests/wikitests/SixthTiddler.tid index 58d04c94f..64a4b45ac 100644 --- a/tests/wikitests/SixthTiddler.tid +++ b/tests/wikitests/SixthTiddler.tid @@ -1,5 +1,5 @@ title: SixthTiddler -type: text/vnd.tiddlywiki2 +type: text/x-tiddlywiki modified: 20110211110621 modifier: Jermolene diff --git a/tests/wikitests/ThirdTiddler.tid b/tests/wikitests/ThirdTiddler.tid index 651a2c2dd..0448aa461 100644 --- a/tests/wikitests/ThirdTiddler.tid +++ b/tests/wikitests/ThirdTiddler.tid @@ -1,5 +1,5 @@ title: ThirdTiddler -type: text/vnd.tiddlywiki2 +type: text/x-tiddlywiki An explicit link [[Fourth Tiddler]] and [[a pretty link|Fourth Tiddler]] and a transclusion <>