mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-06-22 00:14:07 +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:
|
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
|
# A TiddlyWiki5 HTML file containing `text/vnd.tiddlywiki` tiddlers
|
||||||
# An ordinary HTML file
|
# An ordinary HTML file
|
||||||
*/
|
*/
|
||||||
@ -117,7 +117,7 @@ function deserializeTiddlyWikiFile(text,storeAreaEnd,isTiddlyWiki5,fields) {
|
|||||||
var results = [],
|
var results = [],
|
||||||
endOfDivRegExp = /(<\/div>\s*)/gi,
|
endOfDivRegExp = /(<\/div>\s*)/gi,
|
||||||
startPos = storeAreaEnd,
|
startPos = storeAreaEnd,
|
||||||
defaultType = isTiddlyWiki5 ? "text/vnd.tiddlywiki": "text/vnd.tiddlywiki2";
|
defaultType = isTiddlyWiki5 ? undefined : "text/x-tiddlywiki";
|
||||||
endOfDivRegExp.lastIndex = startPos;
|
endOfDivRegExp.lastIndex = startPos;
|
||||||
var match = endOfDivRegExp.exec(text);
|
var match = endOfDivRegExp.exec(text);
|
||||||
while(match) {
|
while(match) {
|
||||||
|
@ -24,7 +24,7 @@ var TextParser = function(type,text,options) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports["text/plain"] = TextParser;
|
exports["text/plain"] = TextParser;
|
||||||
exports["text/vnd.tiddlywiki2"] = TextParser;
|
exports["text/x-tiddlywiki"] = TextParser;
|
||||||
exports["application/javascript"] = TextParser;
|
exports["application/javascript"] = TextParser;
|
||||||
exports["application/json"] = TextParser;
|
exports["application/json"] = TextParser;
|
||||||
exports["text/css"] = TextParser;
|
exports["text/css"] = TextParser;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user