mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Update TW2 wikitext content type to text/x-tiddlywiki
And also stop assigning the default content type of `text/vnd.tiddlywiki` to imported tiddlers.
This commit is contained in:
parent
1ebe0d39b2
commit
779d8b3aad
@ -86,7 +86,7 @@ exports["application/json"] = function(text,fields) {
|
||||
|
||||
/*
|
||||
Parse an HTML file into tiddlers. There are three possibilities:
|
||||
# A TiddlyWiki classic HTML file containing `text/vnd.tiddlywiki2` tiddlers
|
||||
# A TiddlyWiki classic HTML file containing `text/x-tiddlywiki` tiddlers
|
||||
# A TiddlyWiki5 HTML file containing `text/vnd.tiddlywiki` tiddlers
|
||||
# An ordinary HTML file
|
||||
*/
|
||||
@ -117,7 +117,7 @@ function deserializeTiddlyWikiFile(text,storeAreaEnd,isTiddlyWiki5,fields) {
|
||||
var results = [],
|
||||
endOfDivRegExp = /(<\/div>\s*)/gi,
|
||||
startPos = storeAreaEnd,
|
||||
defaultType = isTiddlyWiki5 ? "text/vnd.tiddlywiki": "text/vnd.tiddlywiki2";
|
||||
defaultType = isTiddlyWiki5 ? undefined : "text/x-tiddlywiki";
|
||||
endOfDivRegExp.lastIndex = startPos;
|
||||
var match = endOfDivRegExp.exec(text);
|
||||
while(match) {
|
||||
|
@ -24,7 +24,7 @@ var TextParser = function(type,text,options) {
|
||||
};
|
||||
|
||||
exports["text/plain"] = TextParser;
|
||||
exports["text/vnd.tiddlywiki2"] = TextParser;
|
||||
exports["text/x-tiddlywiki"] = TextParser;
|
||||
exports["application/javascript"] = TextParser;
|
||||
exports["application/json"] = TextParser;
|
||||
exports["text/css"] = TextParser;
|
||||
|
Loading…
Reference in New Issue
Block a user