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

@ -1224,7 +1224,7 @@ $tw.boot.startup = function() {
$tw.utils.registerFileType("text/vnd.tiddlywiki","utf8",".tid");
$tw.utils.registerFileType("application/x-tiddler","utf8",".tid");
$tw.utils.registerFileType("application/x-tiddler-html-div","utf8",".tiddler");
$tw.utils.registerFileType("application/vnd.tiddlywiki2-recipe","utf8",".recipe");
$tw.utils.registerFileType("text/vnd.tiddlywiki2-recipe","utf8",".recipe");
$tw.utils.registerFileType("text/plain","utf8",".txt");
$tw.utils.registerFileType("text/css","utf8",".css");
$tw.utils.registerFileType("text/html","utf8",".html");

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) {

View File

@ -24,7 +24,7 @@ var TextParser = function(type,text,options) {
};
exports["text/plain"] = TextParser;
exports["application/vnd.tiddlywiki2"] = TextParser;
exports["text/vnd.tiddlywiki2"] = TextParser;
exports["application/javascript"] = TextParser;
exports["application/json"] = TextParser;
exports["text/css"] = TextParser;

View File

@ -1,4 +1,3 @@
title: SiteSubtitle
type: application/x-tiddler
for TiddlyWeb

View File

@ -1,4 +1,3 @@
title: SiteTitle
type: application/x-tiddler
TiddlyWiki5 in the Sky

View File

@ -14,7 +14,7 @@ The idea is to process the recipe file recursively, loading tiddlers into the ma
/*global $tw: false */
"use strict";
exports["application/vnd.tiddlywiki2-recipe"] = function(text,fields) {
exports["text/vnd.tiddlywiki2-recipe"] = function(text,fields) {
var self = this,
path = require("path"),
fs = require("fs"),