mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +00:00
More MIME type shenanigans
This commit is contained in:
parent
84650b9a54
commit
f07bc18204
@ -66,7 +66,7 @@ $tw.config.jsModuleHeaderRegExpString = "^\\/\\*\\\\\\n((?:^[^\\n]*\\n)+?)(^\\\\
|
||||
$tw.config.fileExtensionInfo = {
|
||||
".tid": {type: "application/x-tiddler"},
|
||||
".tiddler": {type: "application/x-tiddler-html-div"},
|
||||
".recipe": {type: "application/x-tiddlywiki-recipe"},
|
||||
".recipe": {type: "application/vnd.tiddlywiki2-recipe"},
|
||||
".txt": {type: "text/plain"},
|
||||
".css": {type: "text/css"},
|
||||
".html": {type: "text/html"},
|
||||
@ -85,7 +85,7 @@ $tw.config.contentTypeInfo = {
|
||||
"text/vnd.tiddlywiki": {encoding: "utf8", extension: ".tid"},
|
||||
"application/x-tiddler": {encoding: "utf8", extension: ".tid"},
|
||||
"application/x-tiddler-html-div": {encoding: "utf8", extension: ".tiddler"},
|
||||
"application/x-tiddlywiki-recipe": {encoding: "utf8", extension: ".recipe"},
|
||||
"application/vnd.tiddlywiki2-recipe": {encoding: "utf8", extension: ".recipe"},
|
||||
"text/plain": {encoding: "utf8", extension: ".txt"},
|
||||
"text/css": {encoding: "utf8", extension: ".css"},
|
||||
"text/html": {encoding: "utf8", extension: ".html"},
|
||||
|
@ -36,7 +36,7 @@ Command.prototype.execute = function() {
|
||||
} else {
|
||||
var fields = {title: self.params[0]},
|
||||
extname = path.extname(self.params[0]),
|
||||
type = extname === ".html" ? "application/x-tiddlywiki" : extname;
|
||||
type = extname === ".html" ? "application/vnd.tiddlywiki2" : extname;
|
||||
var tiddlers = self.commander.wiki.deserializeTiddlers(type,data,fields);
|
||||
if(!tiddlers) {
|
||||
self.callback("No tiddlers found in file \"" + self.params[0] + "\"");
|
||||
|
@ -75,7 +75,7 @@ exports["application/json"] = function(text,fields) {
|
||||
return result;
|
||||
};
|
||||
|
||||
exports["application/x-tiddlywiki"] = function(text,fields) {
|
||||
exports["application/vnd.tiddlywiki2"] = function(text,fields) {
|
||||
var locateStoreArea = function(tiddlywikidoc) {
|
||||
var startSaveArea = '<div id="' + 'storeArea">',
|
||||
startSaveAreaRegExp = /<div id=["']?storeArea['"]?>/gi,
|
||||
|
@ -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/x-tiddlywiki-recipe"] = function(text,fields) {
|
||||
exports["application/vnd.tiddlywiki2-recipe"] = function(text,fields) {
|
||||
var self = this,
|
||||
path = require("path"),
|
||||
fs = require("fs"),
|
||||
|
@ -54,4 +54,4 @@ These files are a straightforward array of hashmaps of name:value fields. Curren
|
||||
|
||||
TiddlyWiki HTML files contain a collection of tiddlers encoded in `<DIV>` format.
|
||||
|
||||
//The ContentType `application/x-tiddlywiki` is used internally for these files//
|
||||
//The ContentType `application/vnd.tiddlywiki2` is used internally for these files//
|
||||
|
Loading…
Reference in New Issue
Block a user