kopia lustrzana https://github.com/miklobit/TiddlyWiki5
rodzic
15d1abf523
commit
6864251962
|
@ -1224,7 +1224,7 @@ $tw.boot.startup = function() {
|
||||||
$tw.utils.registerFileType("text/vnd.tiddlywiki","utf8",".tid");
|
$tw.utils.registerFileType("text/vnd.tiddlywiki","utf8",".tid");
|
||||||
$tw.utils.registerFileType("application/x-tiddler","utf8",".tid");
|
$tw.utils.registerFileType("application/x-tiddler","utf8",".tid");
|
||||||
$tw.utils.registerFileType("application/x-tiddler-html-div","utf8",".tiddler");
|
$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/plain","utf8",".txt");
|
||||||
$tw.utils.registerFileType("text/css","utf8",".css");
|
$tw.utils.registerFileType("text/css","utf8",".css");
|
||||||
$tw.utils.registerFileType("text/html","utf8",".html");
|
$tw.utils.registerFileType("text/html","utf8",".html");
|
||||||
|
|
|
@ -86,8 +86,8 @@ 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 `application/vnd.tiddlywiki2` tiddlers
|
# A TiddlyWiki classic HTML file containing `text/vnd.tiddlywiki2` tiddlers
|
||||||
# A TiddlyWiki5 HTML file containing `application/vnd.tiddlywiki` tiddlers
|
# A TiddlyWiki5 HTML file containing `text/vnd.tiddlywiki` tiddlers
|
||||||
# An ordinary HTML file
|
# An ordinary HTML file
|
||||||
*/
|
*/
|
||||||
exports["text/html"] = function(text,fields) {
|
exports["text/html"] = function(text,fields) {
|
||||||
|
@ -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 ? "application/vnd.tiddlywiki": "application/vnd.tiddlywiki2";
|
defaultType = isTiddlyWiki5 ? "text/vnd.tiddlywiki": "text/vnd.tiddlywiki2";
|
||||||
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["application/vnd.tiddlywiki2"] = TextParser;
|
exports["text/vnd.tiddlywiki2"] = 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;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
title: SiteSubtitle
|
title: SiteSubtitle
|
||||||
type: application/x-tiddler
|
|
||||||
|
|
||||||
for TiddlyWeb
|
for TiddlyWeb
|
|
@ -1,4 +1,3 @@
|
||||||
title: SiteTitle
|
title: SiteTitle
|
||||||
type: application/x-tiddler
|
|
||||||
|
|
||||||
TiddlyWiki5 in the Sky
|
TiddlyWiki5 in the Sky
|
|
@ -14,7 +14,7 @@ The idea is to process the recipe file recursively, loading tiddlers into the ma
|
||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["application/vnd.tiddlywiki2-recipe"] = function(text,fields) {
|
exports["text/vnd.tiddlywiki2-recipe"] = function(text,fields) {
|
||||||
var self = this,
|
var self = this,
|
||||||
path = require("path"),
|
path = require("path"),
|
||||||
fs = require("fs"),
|
fs = require("fs"),
|
||||||
|
|
Ładowanie…
Reference in New Issue