1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-01 22:38:08 +00:00

Cleaning up content types

Dealt with some inconsistencies
This commit is contained in:
Jeremy Ruston
2013-05-13 17:42:07 +01:00
parent 15d1abf523
commit 6864251962
6 changed files with 6 additions and 8 deletions

View File

@@ -86,8 +86,8 @@ exports["application/json"] = function(text,fields) {
/*
Parse an HTML file into tiddlers. There are three possibilities:
# A TiddlyWiki classic HTML file containing `application/vnd.tiddlywiki2` tiddlers
# A TiddlyWiki5 HTML file containing `application/vnd.tiddlywiki` tiddlers
# A TiddlyWiki classic HTML file containing `text/vnd.tiddlywiki2` tiddlers
# A TiddlyWiki5 HTML file containing `text/vnd.tiddlywiki` tiddlers
# An ordinary HTML file
*/
exports["text/html"] = function(text,fields) {
@@ -117,7 +117,7 @@ function deserializeTiddlyWikiFile(text,storeAreaEnd,isTiddlyWiki5,fields) {
var results = [],
endOfDivRegExp = /(<\/div>\s*)/gi,
startPos = storeAreaEnd,
defaultType = isTiddlyWiki5 ? "application/vnd.tiddlywiki": "application/vnd.tiddlywiki2";
defaultType = isTiddlyWiki5 ? "text/vnd.tiddlywiki": "text/vnd.tiddlywiki2";
endOfDivRegExp.lastIndex = startPos;
var match = endOfDivRegExp.exec(text);
while(match) {