1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-08 09:48:05 +00:00

Merge branch 'master' into parameterised-transclusions

This commit is contained in:
jeremy@jermolene.com
2023-02-10 16:04:08 +00:00
11 changed files with 125 additions and 20 deletions

View File

@@ -16,6 +16,22 @@ Filter operator for applying decodeURIComponent() to each item.
Export our filter functions
*/
exports.decodebase64 = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
results.push($tw.utils.base64Decode(title));
});
return results;
};
exports.encodebase64 = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
results.push($tw.utils.base64Encode(title));
});
return results;
};
exports.decodeuricomponent = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {

View File

@@ -238,7 +238,7 @@ exports.generateTiddlerFileInfo = function(tiddler,options) {
} else {
// Save as a .tid or a text/binary file plus a .meta file
var tiddlerType = tiddler.fields.type || "text/vnd.tiddlywiki";
if(tiddlerType === "text/vnd.tiddlywiki") {
if(tiddlerType === "text/vnd.tiddlywiki" || tiddler.hasField("_canonical_uri")) {
// Save as a .tid file
fileInfo.type = "application/x-tiddler";
fileInfo.hasMetaFile = false;

View File

@@ -46,6 +46,7 @@ GenesisWidget.prototype.execute = function() {
this.genesisRemappable = this.getAttribute("$remappable","yes") === "yes";
this.genesisNames = this.getAttribute("$names","");
this.genesisValues = this.getAttribute("$values","");
this.genesisIsBlock = this.getAttribute("$mode",this.parseTreeNode.isBlock && "block") === "block";
// Do not create a child widget if the $type attribute is missing or blank
if(!this.genesisType) {
this.makeChildWidgets(this.parseTreeNode.children);
@@ -60,6 +61,7 @@ GenesisWidget.prototype.execute = function() {
tag: nodeTag,
attributes: {},
orderedAttributes: [],
isBlock: this.genesisIsBlock,
children: this.parseTreeNode.children || [],
isNotRemappable: !this.genesisRemappable
}];