kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Ensure system tiddlers are imported
We no longer generate a separate “systemArea” for system tiddlers but we still need to import it for older wikisprint-window-tiddler
rodzic
026a27c1ab
commit
7a4abba9fd
|
@ -96,7 +96,15 @@ exports["text/html"] = function(text,fields) {
|
||||||
match = storeAreaMarkerRegExp.exec(text);
|
match = storeAreaMarkerRegExp.exec(text);
|
||||||
if(match) {
|
if(match) {
|
||||||
// If so, it's either a classic TiddlyWiki file or a TW5 file
|
// If so, it's either a classic TiddlyWiki file or a TW5 file
|
||||||
return deserializeTiddlyWikiFile(text,storeAreaMarkerRegExp.lastIndex,!!match[1],fields);
|
// First read the normal tiddlers
|
||||||
|
var results = deserializeTiddlyWikiFile(text,storeAreaMarkerRegExp.lastIndex,!!match[1],fields);
|
||||||
|
// Then any system tiddlers
|
||||||
|
var systemAreaMarkerRegExp = /<div id=["']?systemArea['"]?( style=["']?display:none;["']?)?>/gi,
|
||||||
|
sysMatch = systemAreaMarkerRegExp.exec(text);
|
||||||
|
if(sysMatch) {
|
||||||
|
results.push.apply(results,deserializeTiddlyWikiFile(text,systemAreaMarkerRegExp.lastIndex,!!sysMatch[1],fields));
|
||||||
|
}
|
||||||
|
return results
|
||||||
} else {
|
} else {
|
||||||
// It's not a TiddlyWiki so we'll return the entire HTML file as a tiddler
|
// It's not a TiddlyWiki so we'll return the entire HTML file as a tiddler
|
||||||
return deserializeHtmlFile(text,fields);
|
return deserializeHtmlFile(text,fields);
|
||||||
|
|
Ładowanie…
Reference in New Issue