diff --git a/core/language/en-GB/Docs/PaletteColours.multids b/core/language/en-GB/Docs/PaletteColours.multids index 1c671a67c..bc1b36c3d 100644 --- a/core/language/en-GB/Docs/PaletteColours.multids +++ b/core/language/en-GB/Docs/PaletteColours.multids @@ -65,6 +65,10 @@ sidebar-tab-foreground-selected: Sidebar tab foreground for selected tabs sidebar-tab-foreground: Sidebar tab foreground sidebar-tiddler-link-foreground-hover: Sidebar tiddler link foreground hover sidebar-tiddler-link-foreground: Sidebar tiddler link foreground +stability-stable: Badge for stability level "stable" +stability-experimental: Badge for stability level "experimental" +stability-deprecated: Badge for stability level "deprecated" +stability-legacy: Badge for stability level "legacy" testcase-accent-level-1: Test case accent colour with no nesting testcase-accent-level-2: Test case accent colour with 2nd level nesting testcase-accent-level-3: Test case accent colour with 3rd level nesting or higher diff --git a/core/modules/filters/backtranscludes.js b/core/modules/filters/backtranscludes.js index 7d4215073..253b9dd7b 100644 --- a/core/modules/filters/backtranscludes.js +++ b/core/modules/filters/backtranscludes.js @@ -16,11 +16,11 @@ Filter operator for returning all the backtranscludes from a tiddler Export our filter function */ exports.backtranscludes = function(source,operator,options) { - var results = []; + var results = new $tw.utils.LinkedList(); source(function(tiddler,title) { - $tw.utils.pushTop(results,options.wiki.getTiddlerBacktranscludes(title)); + results.pushTop(options.wiki.getTiddlerBacktranscludes(title)); }); - return results; + return results.makeTiddlerIterator(options.wiki); }; })(); diff --git a/core/modules/filters/strings.js b/core/modules/filters/strings.js index 538dd0597..11f7634b7 100644 --- a/core/modules/filters/strings.js +++ b/core/modules/filters/strings.js @@ -127,7 +127,7 @@ function diffPartsToChars(text1,text2,mode) { if(lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) : (lineHash[line] !== undefined)) { chars += String.fromCharCode(lineHash[line]); } else { - if (lineArrayLength == maxLines) { + if(lineArrayLength == maxLines) { line = text.substring(lineStart); lineEnd = text.length; } @@ -217,7 +217,10 @@ exports.splitregexp = function(source,operator,options) { return ["RegExp error: " + ex]; } source(function(tiddler,title) { - Array.prototype.push.apply(result,title.split(regExp)); + var parts = title.split(regExp).map(function(part){ + return part || ""; // make sure it's a string + }); + Array.prototype.push.apply(result,parts); }); return result; }; @@ -264,7 +267,7 @@ exports.pad = function(source,operator,options) { } else { var padString = "", padStringLength = targetLength - title.length; - while (padStringLength > padString.length) { + while(padStringLength > padString.length) { padString += fill; } //make sure we do not exceed the specified length diff --git a/core/modules/filters/transcludes.js b/core/modules/filters/transcludes.js index bd618296b..8f42b3bae 100644 --- a/core/modules/filters/transcludes.js +++ b/core/modules/filters/transcludes.js @@ -20,7 +20,7 @@ exports.transcludes = function(source,operator,options) { source(function(tiddler,title) { results.pushTop(options.wiki.getTiddlerTranscludes(title)); }); - return results.toArray(); + return results.makeTiddlerIterator(options.wiki); }; })(); diff --git a/core/modules/indexers/back-indexer.js b/core/modules/indexers/back-indexer.js index b9daf3328..77b51b819 100644 --- a/core/modules/indexers/back-indexer.js +++ b/core/modules/indexers/back-indexer.js @@ -75,7 +75,7 @@ BackSubIndexer.prototype._getTarget = function(tiddler) { } var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {}); if(parser) { - return this.wiki[this.extractor](parser.tree); + return this.wiki[this.extractor](parser.tree, tiddler.fields.title); } return []; } diff --git a/core/modules/parsers/parseutils.js b/core/modules/parsers/parseutils.js index 1f86dd909..2a2e36309 100644 --- a/core/modules/parsers/parseutils.js +++ b/core/modules/parsers/parseutils.js @@ -114,7 +114,7 @@ exports.parseStringLiteral = function(source,pos) { var match = reString.exec(source); if(match && match.index === pos) { node.value = match[1] !== undefined ? match[1] :( - match[2] !== undefined ? match[2] : match[3] + match[2] !== undefined ? match[2] : match[3] ); node.end = pos + match[0].length; return node; diff --git a/core/modules/parsers/wikiparser/rules/codeblock.js b/core/modules/parsers/wikiparser/rules/codeblock.js index 262038f87..6c3480566 100644 --- a/core/modules/parsers/wikiparser/rules/codeblock.js +++ b/core/modules/parsers/wikiparser/rules/codeblock.js @@ -29,13 +29,16 @@ exports.init = function(parser) { exports.parse = function() { var reEnd = /(\r?\n```$)/mg; + var languageStart = this.parser.pos + 3, + languageEnd = languageStart + this.match[1].length; // Move past the match this.parser.pos = this.matchRegExp.lastIndex; // Look for the end of the block reEnd.lastIndex = this.parser.pos; var match = reEnd.exec(this.parser.source), - text; + text, + codeStart = this.parser.pos; // Process the block if(match) { text = this.parser.source.substring(this.parser.pos,match.index); @@ -48,8 +51,8 @@ exports.parse = function() { return [{ type: "codeblock", attributes: { - code: {type: "string", value: text}, - language: {type: "string", value: this.match[1]} + code: {type: "string", value: text, start: codeStart, end: this.parser.pos}, + language: {type: "string", value: this.match[1], start: languageStart, end: languageEnd} } }]; }; diff --git a/core/modules/parsers/wikiparser/rules/codeinline.js b/core/modules/parsers/wikiparser/rules/codeinline.js index ee9149833..048fc051c 100644 --- a/core/modules/parsers/wikiparser/rules/codeinline.js +++ b/core/modules/parsers/wikiparser/rules/codeinline.js @@ -33,7 +33,8 @@ exports.parse = function() { // Look for the end marker reEnd.lastIndex = this.parser.pos; var match = reEnd.exec(this.parser.source), - text; + text, + start = this.parser.pos; // Process the text if(match) { text = this.parser.source.substring(this.parser.pos,match.index); @@ -47,7 +48,9 @@ exports.parse = function() { tag: "code", children: [{ type: "text", - text: text + text: text, + start: start, + end: this.parser.pos }] }]; }; diff --git a/core/modules/parsers/wikiparser/rules/extlink.js b/core/modules/parsers/wikiparser/rules/extlink.js index e06f88d8d..5b9f57adf 100644 --- a/core/modules/parsers/wikiparser/rules/extlink.js +++ b/core/modules/parsers/wikiparser/rules/extlink.js @@ -31,6 +31,7 @@ exports.init = function(parser) { exports.parse = function() { // Move past the match + var start = this.parser.pos; this.parser.pos = this.matchRegExp.lastIndex; // Create the link unless it is suppressed if(this.match[0].substr(0,1) === "~") { @@ -46,7 +47,7 @@ exports.parse = function() { rel: {type: "string", value: "noopener noreferrer"} }, children: [{ - type: "text", text: this.match[0] + type: "text", text: this.match[0], start: start, end: this.parser.pos }] }]; } diff --git a/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js b/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js index 7ab4801bf..73bdff813 100644 --- a/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js +++ b/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js @@ -31,6 +31,16 @@ exports.init = function(parser) { exports.parse = function() { // Move past the match + var filterStart = this.parser.pos + 3; + var filterEnd = filterStart + this.match[1].length; + var toolTipStart = filterEnd + 1; + var toolTipEnd = toolTipStart + (this.match[2] ? this.match[2].length : 0); + var templateStart = toolTipEnd + 2; + var templateEnd = templateStart + (this.match[3] ? this.match[3].length : 0); + var styleStart = templateEnd + 2; + var styleEnd = styleStart + (this.match[4] ? this.match[4].length : 0); + var classesStart = styleEnd + 1; + var classesEnd = classesStart + (this.match[5] ? this.match[5].length : 0); this.parser.pos = this.matchRegExp.lastIndex; // Get the match details var filter = this.match[1], @@ -42,21 +52,21 @@ exports.parse = function() { var node = { type: "list", attributes: { - filter: {type: "string", value: filter} + filter: {type: "string", value: filter, start: filterStart, end: filterEnd}, }, isBlock: true }; if(tooltip) { - node.attributes.tooltip = {type: "string", value: tooltip}; + node.attributes.tooltip = {type: "string", value: tooltip, start: toolTipStart, end: toolTipEnd}; } if(template) { - node.attributes.template = {type: "string", value: template}; + node.attributes.template = {type: "string", value: template, start: templateStart, end: templateEnd}; } if(style) { - node.attributes.style = {type: "string", value: style}; + node.attributes.style = {type: "string", value: style, start: styleStart, end: styleEnd}; } if(classes) { - node.attributes.itemClass = {type: "string", value: classes.split(".").join(" ")}; + node.attributes.itemClass = {type: "string", value: classes.split(".").join(" "), start: classesStart, end: classesEnd}; } return [node]; }; diff --git a/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js b/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js index 029fd6802..c0b19a941 100644 --- a/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js +++ b/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js @@ -30,6 +30,16 @@ exports.init = function(parser) { }; exports.parse = function() { + var filterStart = this.parser.pos + 3; + var filterEnd = filterStart + this.match[1].length; + var toolTipStart = filterEnd + 1; + var toolTipEnd = toolTipStart + (this.match[2] ? this.match[2].length : 0); + var templateStart = toolTipEnd + 2; + var templateEnd = templateStart + (this.match[3] ? this.match[3].length : 0); + var styleStart = templateEnd + 2; + var styleEnd = styleStart + (this.match[4] ? this.match[4].length : 0); + var classesStart = styleEnd + 1; + var classesEnd = classesStart + (this.match[5] ? this.match[5].length : 0); // Move past the match this.parser.pos = this.matchRegExp.lastIndex; // Get the match details @@ -42,20 +52,20 @@ exports.parse = function() { var node = { type: "list", attributes: { - filter: {type: "string", value: filter} + filter: {type: "string", value: filter, start: filterStart, end: filterEnd}, } }; if(tooltip) { - node.attributes.tooltip = {type: "string", value: tooltip}; + node.attributes.tooltip = {type: "string", value: tooltip, start: toolTipStart, end: toolTipEnd}; } if(template) { - node.attributes.template = {type: "string", value: template}; + node.attributes.template = {type: "string", value: template, start: templateStart, end: templateEnd}; } if(style) { - node.attributes.style = {type: "string", value: style}; + node.attributes.style = {type: "string", value: style, start: styleStart, end: styleEnd}; } if(classes) { - node.attributes.itemClass = {type: "string", value: classes.split(".").join(" ")}; + node.attributes.itemClass = {type: "string", value: classes.split(".").join(" "), start: classesStart, end: classesEnd}; } return [node]; }; diff --git a/core/modules/parsers/wikiparser/rules/hardlinebreaks.js b/core/modules/parsers/wikiparser/rules/hardlinebreaks.js index c278686b4..94f517cd4 100644 --- a/core/modules/parsers/wikiparser/rules/hardlinebreaks.js +++ b/core/modules/parsers/wikiparser/rules/hardlinebreaks.js @@ -45,10 +45,11 @@ exports.parse = function() { reEnd.lastIndex = this.parser.pos; match = reEnd.exec(this.parser.source); if(match) { + var start = this.parser.pos; this.parser.pos = reEnd.lastIndex; // Add a line break if the terminator was a line break if(match[2]) { - tree.push({type: "element", tag: "br"}); + tree.push({type: "element", tag: "br", start: start, end: this.parser.pos}); } } } while(match && !match[1]); diff --git a/core/modules/parsers/wikiparser/rules/heading.js b/core/modules/parsers/wikiparser/rules/heading.js index de4e45c27..7a0ecb9db 100644 --- a/core/modules/parsers/wikiparser/rules/heading.js +++ b/core/modules/parsers/wikiparser/rules/heading.js @@ -30,15 +30,17 @@ exports.parse = function() { // Move past the !s this.parser.pos = this.matchRegExp.lastIndex; // Parse any classes, whitespace and then the heading itself + var classStart = this.parser.pos; var classes = this.parser.parseClasses(); + var classEnd = this.parser.pos; this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true}); var tree = this.parser.parseInlineRun(/(\r?\n)/mg); // Return the heading return [{ type: "element", - tag: "h" + headingLevel, + tag: "h" + headingLevel, attributes: { - "class": {type: "string", value: classes.join(" ")} + "class": {type: "string", value: classes.join(" "), start: classStart, end: classEnd} }, children: tree }]; diff --git a/core/modules/parsers/wikiparser/rules/html.js b/core/modules/parsers/wikiparser/rules/html.js index 4dbd6a07c..61c4ad9e1 100644 --- a/core/modules/parsers/wikiparser/rules/html.js +++ b/core/modules/parsers/wikiparser/rules/html.js @@ -44,6 +44,10 @@ Parse the most recent match exports.parse = function() { // Retrieve the most recent match so that recursive calls don't overwrite it var tag = this.nextTag; + if (!tag.isSelfClosing) { + tag.openTagStart = tag.start; + tag.openTagEnd = tag.end; + } this.nextTag = null; // Advance the parser position to past the tag this.parser.pos = tag.end; @@ -60,6 +64,27 @@ exports.parse = function() { var reEnd = new RegExp("(" + reEndString + ")","mg"); tag.children = this.parser.parseInlineRun(reEnd,{eatTerminator: true}); } + tag.end = this.parser.pos; + tag.closeTagEnd = tag.end; + if (tag.closeTagEnd === tag.openTagEnd || this.parser.source[tag.closeTagEnd - 1] !== '>') { + tag.closeTagStart = tag.end; + } else { + tag.closeTagStart = tag.closeTagEnd - 2; + var closeTagMinPos = tag.children.length > 0 ? tag.children[tag.children.length-1].end : tag.openTagEnd; + if (!Number.isSafeInteger(closeTagMinPos)) closeTagMinPos = tag.openTagEnd; + while (tag.closeTagStart >= closeTagMinPos) { + var char = this.parser.source[tag.closeTagStart]; + if (char === '>') { + tag.closeTagStart = -1; + break; + } + if (char === '<') break; + tag.closeTagStart -= 1; + } + if (tag.closeTagStart < closeTagMinPos) { + tag.closeTagStart = tag.end; + } + } } // Return the tag return [tag]; diff --git a/core/modules/parsers/wikiparser/rules/image.js b/core/modules/parsers/wikiparser/rules/image.js index 6b379d9c5..6f58225e0 100644 --- a/core/modules/parsers/wikiparser/rules/image.js +++ b/core/modules/parsers/wikiparser/rules/image.js @@ -122,9 +122,9 @@ exports.parseImage = function(source,pos) { } pos = token.end; if(token.match[1]) { - node.attributes.tooltip = {type: "string", value: token.match[1].trim()}; + node.attributes.tooltip = {type: "string", value: token.match[1].trim(),start: token.start,end:token.start + token.match[1].length - 1}; } - node.attributes.source = {type: "string", value: (token.match[2] || "").trim()}; + node.attributes.source = {type: "string", value: (token.match[2] || "").trim(), start: token.start + (token.match[1] ? token.match[1].length : 0), end: token.end - 2}; // Update the end position node.end = pos; return node; diff --git a/core/modules/parsers/wikiparser/rules/import.js b/core/modules/parsers/wikiparser/rules/import.js index a66df7057..bb1832255 100644 --- a/core/modules/parsers/wikiparser/rules/import.js +++ b/core/modules/parsers/wikiparser/rules/import.js @@ -38,13 +38,14 @@ exports.parse = function() { // Parse the filter terminated by a line break var reMatch = /(.*)(?:$|\r?\n)/mg; reMatch.lastIndex = this.parser.pos; + var filterStart = this.parser.source; var match = reMatch.exec(this.parser.source); this.parser.pos = reMatch.lastIndex; // Parse tree nodes to return return [{ type: "importvariables", attributes: { - filter: {type: "string", value: match[1]} + filter: {type: "string", value: match[1], start: filterStart, end: this.parser.pos} }, children: [] }]; diff --git a/core/modules/parsers/wikiparser/rules/list.js b/core/modules/parsers/wikiparser/rules/list.js index 17eab6dad..d89c201b9 100644 --- a/core/modules/parsers/wikiparser/rules/list.js +++ b/core/modules/parsers/wikiparser/rules/list.js @@ -74,6 +74,7 @@ exports.parse = function() { // Match the list marker var reMatch = /([\*#;:>]+)/mg; reMatch.lastIndex = this.parser.pos; + var start = this.parser.pos; var match = reMatch.exec(this.parser.source); if(!match || match.index !== this.parser.pos) { break; @@ -94,9 +95,21 @@ exports.parse = function() { } // Construct the list element or reuse the previous one at this level if(listStack.length <= t) { - var listElement = {type: "element", tag: listInfo.listTag, children: [ - {type: "element", tag: listInfo.itemTag, children: []} - ]}; + var listElement = { + type: "element", + tag: listInfo.listTag, + children: [ + { + type: "element", + tag: listInfo.itemTag, + children: [], + start: start, + end: this.parser.pos, + } + ], + start: start, + end: this.parser.pos, + }; // Link this list element into the last child item of the parent list item if(t) { var prevListItem = listStack[t-1].children[listStack[t-1].children.length-1]; @@ -105,21 +118,33 @@ exports.parse = function() { // Save this element in the stack listStack[t] = listElement; } else if(t === (match[0].length - 1)) { - listStack[t].children.push({type: "element", tag: listInfo.itemTag, children: []}); + listStack[t].children.push({ + type: "element", + tag: listInfo.itemTag, + children: [], + start: start, + end: this.parser.pos, + }); } } if(listStack.length > match[0].length) { listStack.splice(match[0].length,listStack.length - match[0].length); } // Process the body of the list item into the last list item + var classStart = this.parser.pos; var lastListChildren = listStack[listStack.length-1].children, lastListItem = lastListChildren[lastListChildren.length-1], classes = this.parser.parseClasses(); + var classEnd = this.parser.pos; this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true}); var tree = this.parser.parseInlineRun(/(\r?\n)/mg); lastListItem.children.push.apply(lastListItem.children,tree); + lastListItem.end = this.parser.pos; + listStack[listStack.length-1].end = this.parser.pos; if(classes.length > 0) { $tw.utils.addClassToParseTreeNode(lastListItem,classes.join(" ")); + lastListItem.attributes.class.start = classStart; + lastListItem.attributes.class.end = classEnd; } // Consume any whitespace following the list item this.parser.skipWhitespace(); diff --git a/core/modules/parsers/wikiparser/rules/prettyextlink.js b/core/modules/parsers/wikiparser/rules/prettyextlink.js index 4c497c257..4707fa0d0 100644 --- a/core/modules/parsers/wikiparser/rules/prettyextlink.js +++ b/core/modules/parsers/wikiparser/rules/prettyextlink.js @@ -96,15 +96,20 @@ exports.parseLink = function(source,pos) { splitPos = null; } // Pull out the tooltip and URL - var tooltip, URL; + var tooltip, URL, urlStart; + textNode.start = pos; if(splitPos) { + urlStart = splitPos + 1; URL = source.substring(splitPos + 1,closePos).trim(); textNode.text = source.substring(pos,splitPos).trim(); + textNode.end = splitPos; } else { + urlStart = pos; URL = source.substring(pos,closePos).trim(); textNode.text = URL; + textNode.end = closePos; } - node.attributes.href = {type: "string", value: URL}; + node.attributes.href = {type: "string", value: URL, start: urlStart, end: closePos}; node.attributes.target = {type: "string", value: "_blank"}; node.attributes.rel = {type: "string", value: "noopener noreferrer"}; // Update the end position diff --git a/core/modules/parsers/wikiparser/rules/prettylink.js b/core/modules/parsers/wikiparser/rules/prettylink.js index 56a2850a3..66c19dc88 100644 --- a/core/modules/parsers/wikiparser/rules/prettylink.js +++ b/core/modules/parsers/wikiparser/rules/prettylink.js @@ -29,32 +29,39 @@ exports.init = function(parser) { exports.parse = function() { // Move past the match + var start = this.parser.pos + 2; this.parser.pos = this.matchRegExp.lastIndex; // Process the link var text = this.match[1], - link = this.match[2] || text; + link = this.match[2] || text, + textEndPos = this.parser.source.indexOf("|", start); + if (textEndPos < 0 || textEndPos > this.matchRegExp.lastIndex) { + textEndPos = this.matchRegExp.lastIndex - 2; + } + var linkStart = this.match[2] ? (start + this.match[1].length + 1) : start; + var linkEnd = linkStart + link.length; if($tw.utils.isLinkExternal(link)) { return [{ type: "element", tag: "a", attributes: { - href: {type: "string", value: link}, + href: {type: "string", value: link, start: linkStart, end: linkEnd}, "class": {type: "string", value: "tc-tiddlylink-external"}, target: {type: "string", value: "_blank"}, rel: {type: "string", value: "noopener noreferrer"} }, children: [{ - type: "text", text: text + type: "text", text: text, start: start, end: textEndPos }] }]; } else { return [{ type: "link", attributes: { - to: {type: "string", value: link} + to: {type: "string", value: link, start: linkStart, end: linkEnd} }, children: [{ - type: "text", text: text + type: "text", text: text, start: start, end: textEndPos }] }]; } diff --git a/core/modules/parsers/wikiparser/rules/quoteblock.js b/core/modules/parsers/wikiparser/rules/quoteblock.js index 787b7e30f..fdd6c860b 100644 --- a/core/modules/parsers/wikiparser/rules/quoteblock.js +++ b/core/modules/parsers/wikiparser/rules/quoteblock.js @@ -28,9 +28,13 @@ exports.parse = function() { // Move past the 0) { tree.push({ type: "element", tag: "cite", - children: cite + children: cite, + start: citeStart, + end: citeEnd }); } // Return the blockquote element @@ -57,7 +67,7 @@ exports.parse = function() { type: "element", tag: "blockquote", attributes: { - class: { type: "string", value: classes.join(" ") }, + class: { type: "string", value: classes.join(" "), start: classStart, end: classEnd }, }, children: tree }]; diff --git a/core/modules/parsers/wikiparser/rules/syslink.js b/core/modules/parsers/wikiparser/rules/syslink.js index 6eb2cdcd4..6bcbee384 100644 --- a/core/modules/parsers/wikiparser/rules/syslink.js +++ b/core/modules/parsers/wikiparser/rules/syslink.js @@ -29,10 +29,11 @@ exports.init = function(parser) { exports.parse = function() { var match = this.match[0]; // Move past the match + var start = this.parser.pos; this.parser.pos = this.matchRegExp.lastIndex; // Create the link unless it is suppressed if(match.substr(0,1) === "~") { - return [{type: "text", text: match.substr(1)}]; + return [{type: "text", text: match.substr(1), start: start+1, end: this.parser.pos}]; } else { return [{ type: "link", @@ -41,10 +42,12 @@ exports.parse = function() { }, children: [{ type: "text", - text: match + text: match, + start: start, + end: this.parser.pos }] }]; } }; -})(); \ No newline at end of file +})(); diff --git a/core/modules/parsers/wikiparser/rules/table.js b/core/modules/parsers/wikiparser/rules/table.js index 61cd71948..59aa81e91 100644 --- a/core/modules/parsers/wikiparser/rules/table.js +++ b/core/modules/parsers/wikiparser/rules/table.js @@ -150,7 +150,7 @@ exports.parse = function() { } else { // Otherwise, create a new row if this one is of a different type if(rowType !== currRowType) { - rowContainer = {type: "element", tag: rowContainerTypes[rowType], children: []}; + rowContainer = {type: "element", tag: rowContainerTypes[rowType], children: [], start: this.parser.pos, end: this.parser.pos}; table.children.push(rowContainer); currRowType = rowType; } @@ -178,6 +178,7 @@ exports.parse = function() { // Increment the row count rowCount++; } + rowContainer.end = this.parser.pos; } rowMatch = rowRegExp.exec(this.parser.source); } diff --git a/core/modules/parsers/wikiparser/rules/typedblock.js b/core/modules/parsers/wikiparser/rules/typedblock.js index 4195e57e5..07c88be15 100644 --- a/core/modules/parsers/wikiparser/rules/typedblock.js +++ b/core/modules/parsers/wikiparser/rules/typedblock.js @@ -46,6 +46,7 @@ exports.parse = function() { renderType = this.match[2]; // Move past the match this.parser.pos = this.matchRegExp.lastIndex; + var start = this.parser.pos; // Look for the end of the block reEnd.lastIndex = this.parser.pos; var match = reEnd.exec(this.parser.source), @@ -74,7 +75,9 @@ exports.parse = function() { tag: "pre", children: [{ type: "text", - text: text + text: text, + start: start, + end: this.parser.pos }] }]; } diff --git a/core/modules/parsers/wikiparser/rules/wikilink.js b/core/modules/parsers/wikiparser/rules/wikilink.js index fadc4587e..6b195f9ff 100644 --- a/core/modules/parsers/wikiparser/rules/wikilink.js +++ b/core/modules/parsers/wikiparser/rules/wikilink.js @@ -36,6 +36,7 @@ exports.parse = function() { // Get the details of the match var linkText = this.match[0]; // Move past the macro call + var start = this.parser.pos; this.parser.pos = this.matchRegExp.lastIndex; // If the link starts with the unwikilink character then just output it as plain text if(linkText.substr(0,1) === $tw.config.textPrimitives.unWikiLink) { @@ -57,7 +58,9 @@ exports.parse = function() { }, children: [{ type: "text", - text: linkText + text: linkText, + start: start, + end: this.parser.pos }] }]; }; diff --git a/core/modules/parsers/wikiparser/wikiparser.js b/core/modules/parsers/wikiparser/wikiparser.js index 527e39eba..854171d19 100644 --- a/core/modules/parsers/wikiparser/wikiparser.js +++ b/core/modules/parsers/wikiparser/wikiparser.js @@ -91,6 +91,11 @@ var WikiParser = function(type,text,options) { } else { topBranch.push.apply(topBranch,this.parseBlocks()); } + // Build rules' name map + this.usingRuleMap = {}; + $tw.utils.each(this.pragmaRules, function (ruleInfo) { self.usingRuleMap[ruleInfo.rule.name] = Object.getPrototypeOf(ruleInfo.rule); }); + $tw.utils.each(this.blockRules, function (ruleInfo) { self.usingRuleMap[ruleInfo.rule.name] = Object.getPrototypeOf(ruleInfo.rule); }); + $tw.utils.each(this.inlineRules, function (ruleInfo) { self.usingRuleMap[ruleInfo.rule.name] = Object.getPrototypeOf(ruleInfo.rule); }); // Return the parse tree }; @@ -209,8 +214,13 @@ WikiParser.prototype.parsePragmas = function() { break; } // Process the pragma rule + var start = this.pos; var subTree = nextMatch.rule.parse(); if(subTree.length > 0) { + // Set the start and end positions of the pragma rule if + if (subTree[0].start === undefined) subTree[0].start = start; + if (subTree[subTree.length - 1].end === undefined) subTree[subTree.length - 1].end = this.pos; + $tw.utils.each(subTree, function (node) { node.rule = nextMatch.rule.name; }); // Quick hack; we only cope with a single parse tree node being returned, which is true at the moment currentTreeBranch.push.apply(currentTreeBranch,subTree); subTree[0].children = []; @@ -235,7 +245,15 @@ WikiParser.prototype.parseBlock = function(terminatorRegExpString) { // Look for a block rule that applies at the current position var nextMatch = this.findNextMatch(this.blockRules,this.pos); if(nextMatch && nextMatch.matchIndex === this.pos) { - return nextMatch.rule.parse(); + var start = this.pos; + var subTree = nextMatch.rule.parse(); + // Set the start and end positions of the first and last blocks if they're not already set + if (subTree.length > 0) { + if (subTree[0].start === undefined) subTree[0].start = start; + if (subTree[subTree.length - 1].end === undefined) subTree[subTree.length - 1].end = this.pos; + } + $tw.utils.each(subTree, function (node) { node.rule = nextMatch.rule.name; }); + return subTree; } // Treat it as a paragraph if we didn't find a block rule var start = this.pos; @@ -332,7 +350,16 @@ WikiParser.prototype.parseInlineRunUnterminated = function(options) { this.pos = nextMatch.matchIndex; } // Process the run rule - tree.push.apply(tree,nextMatch.rule.parse()); + var start = this.pos; + var subTree = nextMatch.rule.parse(); + // Set the start and end positions of the first and last child if they're not already set + if (subTree.length > 0) { + // Set the start and end positions of the first and last child if they're not already set + if (subTree[0].start === undefined) subTree[0].start = start; + if (subTree[subTree.length - 1].end === undefined) subTree[subTree.length - 1].end = this.pos; + } + $tw.utils.each(subTree, function (node) { node.rule = nextMatch.rule.name; }); + tree.push.apply(tree,subTree); // Look for the next run rule nextMatch = this.findNextMatch(this.inlineRules,this.pos); } @@ -383,7 +410,15 @@ WikiParser.prototype.parseInlineRunTerminatedExtended = function(terminatorRegEx this.pos = inlineRuleMatch.matchIndex; } // Process the inline rule - tree.push.apply(tree,inlineRuleMatch.rule.parse()); + var start = this.pos; + var subTree = inlineRuleMatch.rule.parse(); + // Set the start and end positions of the first and last child if they're not already set + if (subTree.length > 0) { + if (subTree[0].start === undefined) subTree[0].start = start; + if (subTree[subTree.length - 1].end === undefined) subTree[subTree.length - 1].end = this.pos; + } + $tw.utils.each(subTree, function (node) { node.rule = inlineRuleMatch.rule.name; }); + tree.push.apply(tree,subTree); // Look for the next inline rule inlineRuleMatch = this.findNextMatch(this.inlineRules,this.pos); // Look for the next terminator match @@ -409,7 +444,7 @@ WikiParser.prototype.pushTextWidget = function(array,text,start,end) { text = $tw.utils.trim(text); } if(text) { - array.push({type: "text", text: text, start: start, end: end}); + array.push({type: "text", text: text, start: start, end: end}); } }; @@ -462,4 +497,3 @@ WikiParser.prototype.amendRules = function(type,names) { exports["text/vnd.tiddlywiki"] = WikiParser; })(); - diff --git a/core/modules/server/authenticators/header.js b/core/modules/server/authenticators/header.js index 9d9990d31..cc1d6bdaf 100644 --- a/core/modules/server/authenticators/header.js +++ b/core/modules/server/authenticators/header.js @@ -37,7 +37,9 @@ HeaderAuthenticator.prototype.authenticateRequest = function(request,response,st return false; } else { // authenticatedUsername will be undefined for anonymous users - state.authenticatedUsername = $tw.utils.decodeURIComponentSafe(username); + if(username) { + state.authenticatedUsername = $tw.utils.decodeURIComponentSafe(username); + } return true; } }; diff --git a/core/modules/widgets/action-log.js b/core/modules/widgets/action-log.js index fc8412006..7b1d1e904 100644 --- a/core/modules/widgets/action-log.js +++ b/core/modules/widgets/action-log.js @@ -66,7 +66,12 @@ LogWidget.prototype.log = function() { }); for(var v in this.variables) { - allVars[v] = this.getVariable(v,{defaultValue:""}); + var variable = this.parentWidget && this.parentWidget.variables[v]; + if(variable && variable.isFunctionDefinition) { + allVars[v] = variable.value; + } else { + allVars[v] = this.getVariable(v,{defaultValue:""}); + } } if(this.filter) { filteredVars = this.wiki.compileFilter(this.filter).call(this.wiki,this.wiki.makeTiddlerIterator(allVars)); diff --git a/core/modules/widgets/button.js b/core/modules/widgets/button.js index 958b6f6da..aef0fe630 100644 --- a/core/modules/widgets/button.js +++ b/core/modules/widgets/button.js @@ -262,7 +262,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of */ ButtonWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - if(changedAttributes.actions || changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes.selectedClass || changedAttributes.style || changedAttributes.dragFilter || changedAttributes.dragTiddler || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup]) || (this.popupTitle && changedTiddlers[this.popupTitle]) || changedAttributes.popupAbsCoords || changedAttributes.setTitle || changedAttributes.setField || changedAttributes.setIndex || changedAttributes.popupTitle || changedAttributes.disabled || changedAttributes["default"]) { + if(changedAttributes.tooltip || changedAttributes.actions || changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes.selectedClass || changedAttributes.style || changedAttributes.dragFilter || changedAttributes.dragTiddler || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup]) || (this.popupTitle && changedTiddlers[this.popupTitle]) || changedAttributes.popupAbsCoords || changedAttributes.setTitle || changedAttributes.setField || changedAttributes.setIndex || changedAttributes.popupTitle || changedAttributes.disabled || changedAttributes["default"]) { this.refreshSelf(); return true; } else { diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 96e40a708..2954454d5 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -551,28 +551,41 @@ exports.getTiddlerBacklinks = function(targetTitle) { /* -Return an array of tiddler titles that are directly transcluded within the given parse tree +Return an array of tiddler titles that are directly transcluded within the given parse tree. `title` is the tiddler being parsed, we will ignore its self-referential transclusions, only return */ -exports.extractTranscludes = function(parseTreeRoot) { +exports.extractTranscludes = function(parseTreeRoot, title) { // Count up the transcludes var transcludes = [], checkParseTree = function(parseTree, parentNode) { for(var t=0; t`) means self-referential transclusion. + value = title; + } else if(parseTreeNode.attributes.field && parseTreeNode.attributes.field.type === "string") { + // Old usage with Empty value (like `<$transclude field='created'/>`) + value = title; } - if(transcludes.indexOf(value) === -1) { - transcludes.push(value); + // Deduplicate the result. + if(value && transcludes.indexOf(value) === -1) { + $tw.utils.pushTop(transcludes,value); } } if(parseTreeNode.children) { - checkParseTree(parseTreeNode.children, parseTreeNode); + checkParseTree(parseTreeNode.children,parseTreeNode); } } }; @@ -591,7 +604,8 @@ exports.getTiddlerTranscludes = function(title) { // Parse the tiddler var parser = self.parseTiddler(title); if(parser) { - return self.extractTranscludes(parser.tree); + // this will ignore self-referential transclusions from `title` + return self.extractTranscludes(parser.tree,title); } return []; }); diff --git a/core/palettes/Vanilla.tid b/core/palettes/Vanilla.tid index c7c800046..d2b765b02 100644 --- a/core/palettes/Vanilla.tid +++ b/core/palettes/Vanilla.tid @@ -82,6 +82,10 @@ sidebar-tab-foreground: <> sidebar-tiddler-link-foreground-hover: #444444 sidebar-tiddler-link-foreground: #999999 site-title-foreground: <> +stability-stable: #008000 +stability-experimental: #c07c00 +stability-deprecated: #ff0000 +stability-legacy: #0000ff static-alert-foreground: #aaaaaa tab-background-selected: #ffffff tab-background: #d8d8d8 diff --git a/core/ui/ControlPanel/TiddlyWiki.tid b/core/ui/ControlPanel/TiddlyWiki.tid index ca3c88831..f8d923da2 100644 --- a/core/ui/ControlPanel/TiddlyWiki.tid +++ b/core/ui/ControlPanel/TiddlyWiki.tid @@ -9,7 +9,7 @@ list-before: <$list filter="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]"> -
> style="border-top:1px solid #eee;"> +
> > !!.tc-control-panel-accent <$link><$transclude field="caption"/> diff --git a/core/wiki/macros/lingo.tid b/core/wiki/macros/lingo.tid index 24d451b03..fc2e60ebc 100644 --- a/core/wiki/macros/lingo.tid +++ b/core/wiki/macros/lingo.tid @@ -1,24 +1,10 @@ title: $:/core/macros/lingo -tags: $:/tags/Global +tags: $:/tags/Macro - -\procedure lingo-base() +\define lingo-base() $:/language/ -\end lingo-base +\end -\procedure lingo(title,override-lingo-base) - - -<$parameters $parseMode="parseMode"> - - <$let active-lingo-base={{{ [!match[]else] }}}> - - <$transclude $tiddler={{{ [addsuffix] }}} $mode=<<parseMode>>> - <!-- If that didn't work, try the new <lingo-base><langcode>/<title> format --> - <$let language-code={{{ [[$:/language]get[text]get[name]else[en-GB]] }}}> - <$transclude $tiddler={{{ [<active-lingo-base>addsuffix<language-code>addsuffix[/]addsuffix<title>] }}} $mode=<<parseMode>>/> - </$let> - </$transclude> - </$let> -</$parameters> -\end lingo +\define lingo(title) +{{$(lingo-base)$$title$}} +\end diff --git a/editions/fr-FR/tiddlers/community/editions/_Noteself_ by Danielo Rodríguez.tid b/editions/fr-FR/tiddlers/community/editions/_Noteself_ by Danielo Rodriguez.tid similarity index 100% rename from editions/fr-FR/tiddlers/community/editions/_Noteself_ by Danielo Rodríguez.tid rename to editions/fr-FR/tiddlers/community/editions/_Noteself_ by Danielo Rodriguez.tid diff --git a/editions/prerelease/tiddlers/Release 5.3.4.tid b/editions/prerelease/tiddlers/Release 5.3.4.tid index 8c9a76fce..f30fb44a8 100644 --- a/editions/prerelease/tiddlers/Release 5.3.4.tid +++ b/editions/prerelease/tiddlers/Release 5.3.4.tid @@ -52,10 +52,11 @@ The easiest way to use the <<.wlink TestCaseWidget>> is by creating TestCaseTidd ! Translation improvements -Improvements to the following translations: +This release also includes improvements to the following translations: * Chinese * French +* German * Macedonian * Polish @@ -69,7 +70,7 @@ Improvements to the following translations: ! Filter Improvements -* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7966">> new [[backtranscludes Operator]] +* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6081">> new [[transcludes|transcludes Operator]] and [[backtranscludes|backtranscludes Operator]] operators ! Usability Improvements @@ -78,12 +79,13 @@ Improvements to the following translations: ! Hackability Improvements +* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7866">> the wikitext parser to generate start/end properties for all nodes * <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/8109">> [[WidgetMessage: tm-http-request]] to be able to use Basic Authentication +* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/8225">> [[WidgetMessage: tm-http-request]] to allow the default headers to be suppressed * <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7882">> infinite recursion handling using a custom exception * <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7966">> button to the JavaScript error popup allowing tiddlers to be saved to a local JSON file * <<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/issues/8120">> to latest version of modern-normalize 2.0.0 * <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/8211">> [[tm-permalink|WidgetMessage: tm-permalink]], [[tm-permaview|WidgetMessage: tm-permaview]] and [[tm-copy-to-clipboard|WidgetMessage: tm-copy-to-clipboard]] messages to allow the notification text to be customised -* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/8225">> [[WidgetMessage: tm-http-request]] to allow the default headers to be suppressed * <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/8097">> window title rendering to automatically include global definitions ! Bug Fixes @@ -108,11 +110,15 @@ Improvements to the following translations: * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7945">> theme font size settings to open in new window CSS * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/8098">> backlink parser to prevent it parsing binary tiddlers * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/8203">> issue where default parameters were not applied when a ParametersWidget did not find a parent TranscludeWidget +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/8222">> crash when using [[splitregexp Operator]] with a regular expression that includes capture groups +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/8239">> ActionLogWidget evaluating all variables in scope ! Node.js Improvements * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/8141">> usage of "Cache-Control" header * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7878">> SaveCommand not overwriting files when required +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/8237">> server header authentication when header is missing +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/8253">> ButtonWidget should refresh when "tooltip" attribute changes ! Performance Improvements @@ -122,7 +128,7 @@ Improvements to the following translations: * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/8195">> issue with fakedom TW_Node inheritence * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/8099">> SJCL library creating variables in global scope -* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/8179">> fix `widget.getVariableInfo()` to always return a `params` property +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/8179">> `widget.getVariableInfo()` to always return a `params` property ! Infrastructure Improvements @@ -145,6 +151,7 @@ eschlon etardiff flibbles FSpark +Gk0Wk hoelzro jinix6 joshuafontany diff --git a/editions/test/tiddlers/tests/data/pragmas/WhitespaceAfterPragma.tid b/editions/test/tiddlers/tests/data/pragmas/WhitespaceAfterPragma.tid index 34b7b12ff..9eb6089ff 100644 --- a/editions/test/tiddlers/tests/data/pragmas/WhitespaceAfterPragma.tid +++ b/editions/test/tiddlers/tests/data/pragmas/WhitespaceAfterPragma.tid @@ -58,7 +58,10 @@ title: ExpectedResult "value": "Something" } ], - "isProcedureDefinition": true + "isProcedureDefinition": true, + "start": 0, + "end": 43, + "rule": "fnprocdef" } ] </p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/test-backtranscludes.js b/editions/test/tiddlers/tests/test-backtranscludes.js index 8ef997566..cd089df94 100644 --- a/editions/test/tiddlers/tests/test-backtranscludes.js +++ b/editions/test/tiddlers/tests/test-backtranscludes.js @@ -11,7 +11,7 @@ Tests the backtranscludes mechanism. /*global $tw: false */ "use strict"; -describe('Backtranscludes tests', function() { +describe('Backtranscludes and transclude filter tests', function() { describe('a tiddler with no transcludes to it', function() { var wiki = new $tw.Wiki(); @@ -22,6 +22,9 @@ describe('Backtranscludes tests', function() { it('should have no backtranscludes', function() { expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe(''); }); + it('should have no transcludes', function() { + expect(wiki.filterTiddlers('TestIncoming +[transcludes[]]').join(',')).toBe(''); + }); }); describe('A tiddler added to the wiki with a transclude to it', function() { @@ -38,6 +41,9 @@ describe('Backtranscludes tests', function() { it('should have a backtransclude', function() { expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); }); + it('should have a transclude', function() { + expect(wiki.filterTiddlers('TestOutgoing +[transcludes[]]').join(',')).toBe('TestIncoming'); + }); }); describe('A tiddler transclude with template will still use the tiddler as result.', function() { @@ -56,6 +62,26 @@ describe('Backtranscludes tests', function() { }); }); + describe('A data tiddler transclude will still use the tiddler as result.', function() { + var wiki = new $tw.Wiki(); + + wiki.addTiddler({ + title: 'TestIncoming', + type: 'application/x-tiddler-dictionary', + text: 'name: value'}); + + wiki.addTiddler({ + title: 'TestOutgoing', + text: 'A transclude to {{TestIncoming##name}}'}); + + it('should have a backtransclude', function() { + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + }); + it('should have a transclude', function() { + expect(wiki.filterTiddlers('TestOutgoing +[transcludes[]]').join(',')).toBe('TestIncoming'); + }); + }); + describe('A tiddler that has a transclude added to it later', function() { it('should have an additional backtransclude', function() { var wiki = new $tw.Wiki(); @@ -143,6 +169,73 @@ describe('Backtranscludes tests', function() { expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe(''); }); }); + + describe('a tiddler with some transcludes on it in order', function() { + var wiki = new $tw.Wiki(); + + wiki.addTiddler({ + title: 'TestOutgoing', + text: "{{New Tiddler!!created}}\n\nA transclude to {{TestIncoming}}" + }); + + it('should have a transclude', function() { + expect(wiki.filterTiddlers('TestOutgoing +[transcludes[]]').join(',')).toBe('New Tiddler,TestIncoming'); + }); + + it('should have a back transclude', function() { + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + expect(wiki.filterTiddlers('[[New Tiddler]] +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + }); + }); + + describe('include implicit self transclusion', function() { + var wiki = new $tw.Wiki(); + + wiki.addTiddler({ + title: 'TestOutgoing', + text: "{{!!created}}\n\nAn implicit self-referential transclude to <$transclude $field='created'/> and <$transclude field='created'/>"}); + + it('should have no transclude', function() { + expect(wiki.filterTiddlers('TestOutgoing +[transcludes[]]').join(',')).toBe('TestOutgoing'); + }); + + it('should have no back transcludes', function() { + expect(wiki.filterTiddlers('TestOutgoing +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + }); + }); + + describe('include explicit self transclusion', function() { + var wiki = new $tw.Wiki(); + + wiki.addTiddler({ + title: 'TestOutgoing', + text: "{{TestOutgoing!!created}}\n\n<$transclude $tiddler='TestOutgoing' $field='created'/> and <$transclude tiddler='TestOutgoing' field='created'/>"}); + + it('should have no transclude', function() { + expect(wiki.filterTiddlers('TestOutgoing +[transcludes[]]').join(',')).toBe('TestOutgoing'); + }); + + it('should have no back transcludes', function() { + expect(wiki.filterTiddlers('TestOutgoing +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + }); + }); + + describe('recognize transclusion defined by widget', function() { + var wiki = new $tw.Wiki(); + + wiki.addTiddler({ + title: 'TestOutgoing', + text: "<$tiddler tiddler='TestIncoming'><$transclude $tiddler /></$tiddler>\n\n<$transclude tiddler='TiddlyWiki Pre-release'/>"}); + + it('should have a transclude', function() { + expect(wiki.filterTiddlers('TestOutgoing +[transcludes[]]').join(',')).toBe('TestIncoming,TiddlyWiki Pre-release'); + }); + + it('should have a back transclude', function() { + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + expect(wiki.filterTiddlers('[[TiddlyWiki Pre-release]] +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + }); + }); }); })(); diff --git a/editions/test/tiddlers/tests/test-wikitext-parser.js b/editions/test/tiddlers/tests/test-wikitext-parser.js index bc3d9acd8..04d041ec9 100644 --- a/editions/test/tiddlers/tests/test-wikitext-parser.js +++ b/editions/test/tiddlers/tests/test-wikitext-parser.js @@ -26,7 +26,7 @@ describe("WikiText parser tests", function() { it("should parse tags", function() { expect(parse("<br>")).toEqual( - [ { type : 'element', tag : 'p', start : 0, end : 4, children : [ { type : 'element', tag : 'br', start : 0, end : 4, isBlock : false, attributes : { }, orderedAttributes: [ ] } ] } ] + [ { type : 'element', tag : 'p', start : 0, end : 4, children : [ { type : 'element', tag : 'br', start : 0, end : 4, openTagStart: 0, openTagEnd: 4, rule: 'html', isBlock : false, attributes : { }, orderedAttributes: [ ] } ] } ] ); expect(parse("</br>")).toEqual( @@ -36,78 +36,77 @@ describe("WikiText parser tests", function() { ); expect(parse("<div>")).toEqual( - [ { type : 'element', tag : 'p', start : 0, end : 5, children : [ { type : 'element', tag : 'div', start : 0, end : 5, isBlock : false, attributes : { }, orderedAttributes: [ ], children : [ ] } ] } ] + [ { type : 'element', tag : 'p', start : 0, end : 5, children : [ { type : 'element', tag : 'div', start : 0, end : 5, openTagStart: 0, openTagEnd: 5, closeTagStart: 5, closeTagEnd: 5, rule: 'html', isBlock : false, attributes : { }, orderedAttributes: [ ], children : [ ] } ] } ] ); expect(parse("<div/>")).toEqual( - [ { type : 'element', tag : 'p', start : 0, end : 6, children : [ { type : 'element', tag : 'div', isSelfClosing : true, isBlock : false, attributes : { }, orderedAttributes: [ ], start : 0, end : 6 } ] } ] + [ { type : 'element', tag : 'p', start : 0, end : 6, children : [ { type : 'element', tag : 'div', isSelfClosing : true, isBlock : false, attributes : { }, orderedAttributes: [ ], start : 0, end : 6, rule: 'html' } ] } ] ); expect(parse("<div></div>")).toEqual( - [ { type : 'element', tag : 'p', start : 0, end : 11, children : [ { type : 'element', tag : 'div', isBlock : false, attributes : { }, orderedAttributes: [ ], children : [ ], start : 0, end : 5 } ] } ] + [ { type : 'element', tag : 'p', start : 0, end : 11, children : [ { type : 'element', tag : 'div', isBlock : false, attributes : { }, orderedAttributes: [ ], children : [ ], start : 0, end : 11, openTagStart: 0, openTagEnd: 5, closeTagStart: 5, closeTagEnd: 11, rule: 'html' } ] } ] ); expect(parse("<div>some text</div>")).toEqual( - [ { type : 'element', tag : 'p', start : 0, end : 20, children : [ { type : 'element', tag : 'div', start : 0, end : 20, isBlock : false, attributes : { }, orderedAttributes: [ ], children : [ { type : 'text', text : 'some text', start : 5, end : 14 } ], start : 0, end : 5 } ] } ] + [ { type : 'element', tag : 'p', start : 0, end : 20, children : [ { type : 'element', tag : 'div', openTagStart: 0, openTagEnd: 5, closeTagStart: 14, closeTagEnd: 20, rule: 'html', isBlock : false, attributes : { }, orderedAttributes: [ ], children : [ { type : 'text', text : 'some text', start : 5, end : 14 } ], start : 0, end : 20 } ] } ] ); expect(parse("<div attribute>some text</div>")).toEqual( - [ { type : 'element', tag : 'p', start : 0, end : 30, children : [ { type : 'element', tag : 'div', isBlock : false, attributes : { attribute : { type : 'string', value : 'true', start : 4, end : 14, name: 'attribute' } }, orderedAttributes: [ { type : 'string', value : 'true', start : 4, end : 14, name: 'attribute' } ], children : [ { type : 'text', text : 'some text', start : 15, end : 24 } ], start : 0, end : 15 } ] } ] + [ { type : 'element', tag : 'p', start : 0, end : 30, children : [ { type : 'element', tag : 'div', isBlock : false, attributes : { attribute : { type : 'string', value : 'true', start : 4, end : 14, name: 'attribute' } }, orderedAttributes: [ { type : 'string', value : 'true', start : 4, end : 14, name: 'attribute' } ], children : [ { type : 'text', text : 'some text', start : 15, end : 24 } ], start : 0, end : 30, openTagStart: 0, openTagEnd: 15, closeTagStart: 24, closeTagEnd: 30, rule: 'html' } ] } ] ); expect(parse("<div attribute='value'>some text</div>")).toEqual( - - [ { type : 'element', tag : 'p', start : 0, end : 38, children : [ { type : 'element', tag : 'div', start: 0, end: 38, isBlock : false, attributes : { attribute : { type : 'string', name: 'attribute', value : 'value', start: 4, end: 22 } }, orderedAttributes: [ { type: 'string', name: 'attribute', value : 'value', start: 4, end: 22 } ], children : [ { type : 'text', text : 'some text', start : 23, end : 32 } ], start : 0, end : 23 } ] } ] + [ { type : 'element', tag : 'p', start : 0, end : 38, children : [ { type : 'element', tag : 'div', openTagStart: 0, openTagEnd: 23, closeTagStart: 32, closeTagEnd: 38, rule: 'html', isBlock : false, attributes : { attribute : { type : 'string', name: 'attribute', value : 'value', start: 4, end: 22 } }, orderedAttributes: [ { type: 'string', name: 'attribute', value : 'value', start: 4, end: 22 } ], children : [ { type : 'text', text : 'some text', start : 23, end : 32 } ], start : 0, end : 38 } ] } ] ); expect(parse("<div attribute={{TiddlerTitle}}>some text</div>")).toEqual( - [ { type : 'element', tag : 'p', start: 0, end: 47, children : [ { type : 'element', tag : 'div', isBlock : false, attributes : { attribute : { type : 'indirect', name: 'attribute', textReference : 'TiddlerTitle', start : 4, end : 31 } }, orderedAttributes: [ { type : 'indirect', name: 'attribute', textReference : 'TiddlerTitle', start : 4, end : 31 } ], children : [ { type : 'text', text : 'some text', start : 32, end : 41 } ], start : 0, end : 32 } ] } ] + [ { type : 'element', tag : 'p', start: 0, end: 47, children : [ { type : 'element', tag : 'div', isBlock : false, attributes : { attribute : { type : 'indirect', name: 'attribute', textReference : 'TiddlerTitle', start : 4, end : 31 } }, orderedAttributes: [ { type : 'indirect', name: 'attribute', textReference : 'TiddlerTitle', start : 4, end : 31 } ], children : [ { type : 'text', text : 'some text', start : 32, end : 41 } ], start : 0, end : 47, openTagStart: 0, openTagEnd: 32, closeTagStart: 41, closeTagEnd: 47, rule: 'html' } ] } ] ); expect(parse("<$reveal state='$:/temp/search' type='nomatch' text=''>")).toEqual( - [ { type : 'element', tag : 'p', start: 0, end: 55, children : [ { type : 'reveal', tag: '$reveal', start : 0, attributes : { state : { start : 8, name : 'state', type : 'string', value : '$:/temp/search', end : 31 }, type : { start : 31, name : 'type', type : 'string', value : 'nomatch', end : 46 }, text : { start : 46, name : 'text', type : 'string', value : '', end : 54 } }, orderedAttributes: [ { start : 8, name : 'state', type : 'string', value : '$:/temp/search', end : 31 }, { start : 31, name : 'type', type : 'string', value : 'nomatch', end : 46 }, { start : 46, name : 'text', type : 'string', value : '', end : 54 } ], end : 55, isBlock : false, children : [ ] } ] } ] + [ { type : 'element', tag : 'p', start: 0, end: 55, children : [ { type : 'reveal', tag: '$reveal', rule: 'html', attributes : { state : { start : 8, name : 'state', type : 'string', value : '$:/temp/search', end : 31 }, type : { start : 31, name : 'type', type : 'string', value : 'nomatch', end : 46 }, text : { start : 46, name : 'text', type : 'string', value : '', end : 54 } }, orderedAttributes: [ { start : 8, name : 'state', type : 'string', value : '$:/temp/search', end : 31 }, { start : 31, name : 'type', type : 'string', value : 'nomatch', end : 46 }, { start : 46, name : 'text', type : 'string', value : '', end : 54 } ], start: 0, end : 55, openTagStart: 0, openTagEnd: 55, closeTagStart: 55, closeTagEnd: 55, isBlock : false, children : [ ] } ] } ] ); expect(parse("<div attribute={{TiddlerTitle!!field}}>some text</div>")).toEqual( - [ { type : 'element', tag : 'p', start: 0, end: 54, children : [ { type : 'element', tag : 'div', isBlock : false, attributes : { attribute : { type : 'indirect', name : 'attribute', textReference : 'TiddlerTitle!!field', start : 4, end : 38 } }, orderedAttributes: [ { type : 'indirect', name : 'attribute', textReference : 'TiddlerTitle!!field', start : 4, end : 38 } ], children : [ { type : 'text', text : 'some text', start : 39, end : 48 } ], start : 0, end : 39 } ] } ] + [ { type : 'element', tag : 'p', start: 0, end: 54, children : [ { type : 'element', tag : 'div', rule: 'html', isBlock : false, attributes : { attribute : { type : 'indirect', name : 'attribute', textReference : 'TiddlerTitle!!field', start : 4, end : 38 } }, orderedAttributes: [ { type : 'indirect', name : 'attribute', textReference : 'TiddlerTitle!!field', start : 4, end : 38 } ], children : [ { type : 'text', text : 'some text', start : 39, end : 48 } ], start : 0, end : 54, openTagStart: 0, openTagEnd: 39, closeTagStart: 48, closeTagEnd: 54 } ] } ] ); expect(parse("<div attribute={{Tiddler Title!!field}}>some text</div>")).toEqual( - [ { type : 'element', tag : 'p', start: 0, end: 55, children : [ { type : 'element', tag : 'div', isBlock : false, attributes : { attribute : { type : 'indirect', name : 'attribute', textReference : 'Tiddler Title!!field', start : 4, end : 39 } }, orderedAttributes: [ { type : 'indirect', name : 'attribute', textReference : 'Tiddler Title!!field', start : 4, end : 39 } ], children : [ { type : 'text', text : 'some text', start : 40, end : 49 } ], start : 0, end : 40 } ] } ] + [ { type : 'element', tag : 'p', start: 0, end: 55, children : [ { type : 'element', tag : 'div', rule: 'html', isBlock : false, attributes : { attribute : { type : 'indirect', name : 'attribute', textReference : 'Tiddler Title!!field', start : 4, end : 39 } }, orderedAttributes: [ { type : 'indirect', name : 'attribute', textReference : 'Tiddler Title!!field', start : 4, end : 39 } ], children : [ { type : 'text', text : 'some text', start : 40, end : 49 } ], start : 0, end : 55, openTagStart: 0, openTagEnd: 40, closeTagStart: 49, closeTagEnd: 55 } ] } ] ); expect(parse("<div attribute={{TiddlerTitle!!field}}>\n\nsome text</div>")).toEqual( - [ { type : 'element', start : 0, attributes : { attribute : { start : 4, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 38 } }, orderedAttributes: [ { start : 4, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 38 } ], tag : 'div', end : 39, isBlock : true, children : [ { type : 'element', tag : 'p', start : 41, end : 50, children : [ { type : 'text', text : 'some text', start : 41, end : 50 } ] } ] } ] + [ { type : 'element', start : 0, attributes : { attribute : { start : 4, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 38 } }, orderedAttributes: [ { start : 4, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 38 } ], tag : 'div', rule: 'html', end : 56, openTagStart: 0, openTagEnd: 39, closeTagStart: 50, closeTagEnd: 56, isBlock : true, children : [ { type : 'element', tag : 'p', start : 41, end : 50, children : [ { type : 'text', text : 'some text', start : 41, end : 50 } ] } ] } ] ); expect(parse("<div><div attribute={{TiddlerTitle!!field}}>\n\nsome text</div></div>")).toEqual( - [ { type : 'element', tag : 'p', start: 0, end: 67, children : [ { type : 'element', start : 0, attributes : { }, orderedAttributes: [ ], tag : 'div', end : 5, isBlock : false, children : [ { type : 'element', start : 5, attributes : { attribute : { start : 9, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 43 } }, orderedAttributes: [ { start : 9, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 43 } ], tag : 'div', end : 44, isBlock : true, children : [ { type : 'element', tag : 'p', start : 46, end : 55, children : [ { type : 'text', text : 'some text', start : 46, end : 55 } ] } ] } ] } ] } ] + [ { type : 'element', tag : 'p', start: 0, end: 67, children : [ { type : 'element', start : 0, end: 67, openTagStart: 0, openTagEnd: 5, closeTagStart: 61, closeTagEnd: 67, attributes : { }, orderedAttributes: [ ], tag : 'div', rule: 'html', isBlock : false, children : [ { type : 'element', start : 5, attributes : { attribute : { start : 9, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 43 } }, orderedAttributes: [ { start : 9, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 43 } ], tag : 'div', end : 61, openTagStart: 5, openTagEnd: 44, closeTagStart: 55, closeTagEnd: 61, rule: 'html', isBlock : true, children : [ { type : 'element', tag : 'p', start : 46, end : 55, children : [ { type : 'text', text : 'some text', start : 46, end : 55 } ] } ] } ] } ] } ] ); expect(parse("<div><div attribute={{TiddlerTitle!!field}}>\n\n!some heading</div></div>")).toEqual( - [ { type : 'element', tag : 'p', start: 0, end: 71, children : [ { type : 'element', start : 0, attributes : { }, orderedAttributes: [ ], tag : 'div', end : 5, isBlock : false, children : [ { type : 'element', start : 5, attributes : { attribute : { start : 9, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 43 } }, orderedAttributes: [ { start : 9, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 43 } ], tag : 'div', end : 44, isBlock : true, children : [ { type : 'element', tag : 'h1', attributes : { class : { type : 'string', value : '' } }, children : [ { type : 'text', text : 'some heading</div></div>', start : 47, end : 71 } ] } ] } ] } ] } ] + [ { type : 'element', tag : 'p', start: 0, end: 71, children : [ { type : 'element', start : 0, end: 71, openTagStart: 0, openTagEnd: 5, closeTagStart: 71, closeTagEnd: 71, attributes : { }, orderedAttributes: [ ], tag : 'div', rule: 'html', isBlock : false, children : [ { type : 'element', start : 5, attributes : { attribute : { start : 9, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 43 } }, orderedAttributes: [ { start : 9, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 43 } ], tag : 'div', end : 71, openTagStart: 5, openTagEnd: 44, closeTagStart: 71, closeTagEnd: 71, rule: 'html', isBlock : true, children : [ { type : 'element', tag : 'h1', start: 46, end: 71, rule: 'heading', attributes : { class : { type : 'string', value : '', start: 47, end: 47 } }, children : [ { type : 'text', text : 'some heading</div></div>', start : 47, end : 71 } ] } ] } ] } ] } ] ); expect(parse("<div><div attribute={{TiddlerTitle!!field}}>\n!some heading</div></div>")).toEqual( - [ { type : 'element', tag : 'p', start: 0, end: 70, children : [ { type : 'element', start : 0, attributes : { }, orderedAttributes: [ ], tag : 'div', end : 5, isBlock : false, children : [ { type : 'element', start : 5, attributes : { attribute : { start : 9, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 43 } }, orderedAttributes: [ { start : 9, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 43 } ], tag : 'div', end : 44, isBlock : false, children : [ { type : 'text', text : '\n!some heading', start : 44, end : 58 } ] } ] } ] } ] + [ { type : 'element', tag : 'p', start: 0, end: 70, children : [ { type : 'element', start : 0, end: 70, openTagStart: 0, openTagEnd: 5, closeTagStart: 64, closeTagEnd: 70, attributes : { }, orderedAttributes: [ ], tag : 'div', rule: 'html', isBlock : false, children : [ { type : 'element', start : 5, attributes : { attribute : { start : 9, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 43 } }, orderedAttributes: [ { start : 9, name : 'attribute', type : 'indirect', textReference : 'TiddlerTitle!!field', end : 43 } ], tag : 'div', end : 64, openTagStart: 5, openTagEnd: 44, closeTagStart: 58, closeTagEnd: 64, rule: 'html', isBlock : false, children : [ { type : 'text', text : '\n!some heading', start : 44, end : 58 } ] } ] } ] } ] ); // Regression test for issue (#3306) expect(parse("<div><span><span>\n\nSome text</span></span></div>")).toEqual( - [ { type : 'element', tag : 'p', start: 0, end: 48, children : [ { type : 'element', start : 0, attributes : { }, orderedAttributes: [ ], tag : 'div', end : 5, isBlock : false, children : [ { type : 'element', start : 5, attributes : { }, orderedAttributes: [ ], tag : 'span', end : 11, isBlock : false, children : [ { type : 'element', start : 11, attributes : { }, orderedAttributes: [ ], tag : 'span', end : 17, isBlock : true, children : [ { type : 'element', tag : 'p', start : 19, end : 28, children : [ { type : 'text', text : 'Some text', start : 19, end : 28 } ] } ] } ] } ] } ] } ] + [ { type : 'element', tag : 'p', start: 0, end: 48, children : [ { type : 'element', start : 0, end: 48, openTagStart: 0, openTagEnd: 5, closeTagStart: 42, closeTagEnd: 48, attributes : { }, orderedAttributes: [ ], tag : 'div', rule: 'html', isBlock : false, children : [ { type : 'element', start : 5, attributes : { }, orderedAttributes: [ ], tag : 'span', end : 42, openTagStart: 5, openTagEnd: 11, closeTagStart: 35, closeTagEnd: 42, rule: 'html', isBlock : false, children : [ { type : 'element', start : 11, attributes : { }, orderedAttributes: [ ], tag : 'span', end : 35, openTagStart: 11, openTagEnd: 17, closeTagStart: 28, closeTagEnd: 35, rule: 'html', isBlock : true, children : [ { type : 'element', tag : 'p', start : 19, end : 28, children : [ { type : 'text', text : 'Some text', start : 19, end : 28 } ] } ] } ] } ] } ] } ] ); }); @@ -115,7 +114,7 @@ describe("WikiText parser tests", function() { it("should parse macro definitions", function() { expect(parse("\\define myMacro()\nnothing\n\\end\n")).toEqual( - [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"isMacroDefinition":true,"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}]}] + [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"isMacroDefinition":true,"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"start":0,"end":30,"rule":"macrodef"}] ); }); @@ -123,7 +122,7 @@ describe("WikiText parser tests", function() { it("should parse procedure definitions with no parameters", function() { expect(parse("\\procedure myMacro()\nnothing\n\\end\n")).toEqual( - [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isProcedureDefinition":true}] + [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isProcedureDefinition":true,"start":0,"end":33,"rule":"fnprocdef"}] ); }); @@ -131,7 +130,7 @@ describe("WikiText parser tests", function() { it("should parse single line procedure definitions with no parameters", function() { expect(parse("\\procedure myMacro() nothing\n")).toEqual( - [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isProcedureDefinition":true}] + [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isProcedureDefinition":true,"start":0,"end":28,"rule":"fnprocdef"}] ); }); @@ -139,7 +138,7 @@ describe("WikiText parser tests", function() { it("should parse procedure definitions with parameters", function() { expect(parse("\\procedure myMacro(one,two,three,four:elephant)\nnothing\n\\end\n")).toEqual( - [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[{"name":"one"},{"name":"two"},{"name":"three"},{"name":"four","default":"elephant"}],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isProcedureDefinition":true}] + [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[{"name":"one"},{"name":"two"},{"name":"three"},{"name":"four","default":"elephant"}],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isProcedureDefinition":true,"start":0,"end":60,"rule":"fnprocdef"}] ); }); @@ -147,14 +146,14 @@ describe("WikiText parser tests", function() { it("should parse procedure definitions", function() { expect(parse("\\procedure myMacro(one:'Jaguar')\n<$text text=<<one>>/>\n\\end\n\n")).toEqual( - [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"<$text text=<<one>>/>"}},"children":[],"params":[{"name":"one","default":"Jaguar"}],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"<$text text=<<one>>/>"}],"isProcedureDefinition":true}] + [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"<$text text=<<one>>/>"}},"children":[],"params":[{"name":"one","default":"Jaguar"}],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"<$text text=<<one>>/>"}],"isProcedureDefinition":true,"start":0,"end":59,"rule":"fnprocdef"}] ); }); it("should parse function definitions with no parameters", function() { expect(parse("\\function myMacro()\nnothing\n\\end\n")).toEqual( - [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isFunctionDefinition":true}] + [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isFunctionDefinition":true,"start":0,"end":32,"rule":"fnprocdef"}] ); }); @@ -162,7 +161,7 @@ describe("WikiText parser tests", function() { it("should parse single line function definitions with no parameters", function() { expect(parse("\\function myMacro() nothing\n")).toEqual( - [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isFunctionDefinition":true}] + [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isFunctionDefinition":true,"start":0,"end":27,"rule":"fnprocdef"}] ); }); @@ -170,7 +169,7 @@ describe("WikiText parser tests", function() { it("should parse function definitions with parameters", function() { expect(parse("\\function myMacro(one,two,three,four:elephant)\nnothing\n\\end\n")).toEqual( - [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[{"name":"one"},{"name":"two"},{"name":"three"},{"name":"four","default":"elephant"}],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isFunctionDefinition":true}] + [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[{"name":"one"},{"name":"two"},{"name":"three"},{"name":"four","default":"elephant"}],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isFunctionDefinition":true,"start":0,"end":59,"rule":"fnprocdef"}] ); }); @@ -178,7 +177,7 @@ describe("WikiText parser tests", function() { it("should parse function definitions", function() { expect(parse("\\function myMacro(one:'Jaguar')\n<$text text=<<one>>/>\n\\end\n\n")).toEqual( - [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"<$text text=<<one>>/>"}},"children":[],"params":[{"name":"one","default":"Jaguar"}],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"<$text text=<<one>>/>"}],"isFunctionDefinition":true}] + [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"<$text text=<<one>>/>"}},"children":[],"params":[{"name":"one","default":"Jaguar"}],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"<$text text=<<one>>/>"}],"isFunctionDefinition":true,"start":0,"end":58,"rule":"fnprocdef"}] ); }); @@ -186,7 +185,7 @@ describe("WikiText parser tests", function() { it("should parse comment in pragma area. Comment will be invisible", function() { expect(parse("<!-- comment in pragma area -->\n\\define aMacro()\nnothing\n\\end\n")).toEqual( - [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"aMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"isMacroDefinition":true,"orderedAttributes":[{"name":"name","type":"string","value":"aMacro"},{"name":"value","type":"string","value":"nothing"}]}] + [{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"aMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"isMacroDefinition":true,"orderedAttributes":[{"name":"name","type":"string","value":"aMacro"},{"name":"value","type":"string","value":"nothing"}],"start":32,"end":61,"rule":"macrodef"}] ); }); @@ -194,12 +193,12 @@ describe("WikiText parser tests", function() { it("should block mode filtered transclusions", function() { expect(parse("{{{ filter }}}")).toEqual( - [ { type: 'list', attributes: { filter: { type: 'string', value: ' filter ' } }, isBlock: true } ] + [ { type: 'list', attributes: { filter: { type: 'string', value: ' filter ', start: 3, end: 11 } }, isBlock: true, start: 0, end: 14, rule: "filteredtranscludeblock" } ] ); expect(parse("{{{ fil\nter }}}")).toEqual( - [ { type: 'list', attributes: { filter: { type: 'string', value: ' fil\nter ' } }, isBlock: true } ] + [ { type: 'list', attributes: { filter: { type: 'string', value: ' fil\nter ', start: 3, end: 12 } }, isBlock: true, start: 0, end: 15, rule: "filteredtranscludeblock" } ] ); }); @@ -207,38 +206,38 @@ describe("WikiText parser tests", function() { it("should parse inline macro calls", function() { expect(parse("<<john>><<paul>><<george>><<ringo>>")).toEqual( - [{"type":"element","tag":"p","children":[{"type":"transclude","start":0,"end":8,"attributes":{"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"}]},{"type":"transclude","start":8,"end":16,"attributes":{"$variable":{"name":"$variable","type":"string","value":"paul"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"paul"}]},{"type":"transclude","start":16,"end":26,"attributes":{"$variable":{"name":"$variable","type":"string","value":"george"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"george"}]},{"type":"transclude","start":26,"end":35,"attributes":{"$variable":{"name":"$variable","type":"string","value":"ringo"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"ringo"}]}],"start":0,"end":35}] + [{"type":"element","tag":"p","children":[{"type":"transclude","start":0,"end":8,"rule":"macrocallinline","attributes":{"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"}]},{"type":"transclude","start":8,"end":16,"rule":"macrocallinline","attributes":{"$variable":{"name":"$variable","type":"string","value":"paul"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"paul"}]},{"type":"transclude","start":16,"end":26,"rule":"macrocallinline","attributes":{"$variable":{"name":"$variable","type":"string","value":"george"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"george"}]},{"type":"transclude","start":26,"end":35,"rule":"macrocallinline","attributes":{"$variable":{"name":"$variable","type":"string","value":"ringo"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"ringo"}]}],"start":0,"end":35}] ); expect(parse("text <<john one:val1 two: 'val \"2\"' three: \"val '3'\" four: \"\"\"val 4\"5'\"\"\" five: [[val 5]] >>")).toEqual( - [{"type":"element","tag":"p","children":[{"type":"text","text":"text ","start":0,"end":5},{"type":"transclude","start":5,"end":92,"attributes":{"$variable":{"name":"$variable","type":"string","value":"john"},"one":{"name":"one","type":"string","value":"val1","start":11,"end":20},"two":{"name":"two","type":"string","value":"val \"2\"","start":20,"end":35},"three":{"name":"three","type":"string","value":"val '3'","start":35,"end":52},"four":{"name":"four","type":"string","value":"val 4\"5'","start":52,"end":73},"five":{"name":"five","type":"string","value":"val 5","start":73,"end":89}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"},{"name":"one","type":"string","value":"val1","start":11,"end":20},{"name":"two","type":"string","value":"val \"2\"","start":20,"end":35},{"name":"three","type":"string","value":"val '3'","start":35,"end":52},{"name":"four","type":"string","value":"val 4\"5'","start":52,"end":73},{"name":"five","type":"string","value":"val 5","start":73,"end":89}]}],"start":0,"end":92}] + [{"type":"element","tag":"p","children":[{"type":"text","text":"text ","start":0,"end":5},{"type":"transclude","start":5,"end":92,"rule":"macrocallinline","attributes":{"$variable":{"name":"$variable","type":"string","value":"john"},"one":{"name":"one","type":"string","value":"val1","start":11,"end":20},"two":{"name":"two","type":"string","value":"val \"2\"","start":20,"end":35},"three":{"name":"three","type":"string","value":"val '3'","start":35,"end":52},"four":{"name":"four","type":"string","value":"val 4\"5'","start":52,"end":73},"five":{"name":"five","type":"string","value":"val 5","start":73,"end":89}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"},{"name":"one","type":"string","value":"val1","start":11,"end":20},{"name":"two","type":"string","value":"val \"2\"","start":20,"end":35},{"name":"three","type":"string","value":"val '3'","start":35,"end":52},{"name":"four","type":"string","value":"val 4\"5'","start":52,"end":73},{"name":"five","type":"string","value":"val 5","start":73,"end":89}]}],"start":0,"end":92}] ); expect(parse("ignored << carrots <<john>>")).toEqual( - [{"type":"element","tag":"p","children":[{"type":"text","text":"ignored << carrots ","start":0,"end":19},{"type":"transclude","start":19,"end":27,"attributes":{"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"}]}],"start":0,"end":27}] + [{"type":"element","tag":"p","children":[{"type":"text","text":"ignored << carrots ","start":0,"end":19},{"type":"transclude","start":19,"end":27,"rule":"macrocallinline","attributes":{"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"}]}],"start":0,"end":27}] ); expect(parse("text <<<john>>")).toEqual( - [{"type":"element","tag":"p","children":[{"type":"text","text":"text ","start":0,"end":5},{"type":"transclude","start":5,"end":14,"attributes":{"$variable":{"name":"$variable","type":"string","value":"<john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"<john"}]}],"start":0,"end":14}] + [{"type":"element","tag":"p","children":[{"type":"text","text":"text ","start":0,"end":5},{"type":"transclude","start":5,"end":14,"rule":"macrocallinline","attributes":{"$variable":{"name":"$variable","type":"string","value":"<john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"<john"}]}],"start":0,"end":14}] ); expect(parse("before\n<<john>>")).toEqual( - [{"type":"element","tag":"p","children":[{"type":"text","text":"before\n","start":0,"end":7},{"type":"transclude","start":7,"end":15,"attributes":{"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"}]}],"start":0,"end":15}] + [{"type":"element","tag":"p","children":[{"type":"text","text":"before\n","start":0,"end":7},{"type":"transclude","start":7,"end":15,"rule":"macrocallinline","attributes":{"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"}]}],"start":0,"end":15}] ); // A single space will cause it to be inline expect(parse("<<john>> ")).toEqual( - [{"type":"element","tag":"p","children":[{"type":"transclude","start":0,"end":8,"attributes":{"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"}]},{"type":"text","text":" ","start":8,"end":9}],"start":0,"end":9}] + [{"type":"element","tag":"p","children":[{"type":"transclude","start":0,"end":8,"rule":"macrocallinline","attributes":{"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"}]},{"type":"text","text":" ","start":8,"end":9}],"start":0,"end":9}] ); expect(parse("text <<outie one:'my <<innie>>' >>")).toEqual( - [{"type":"element","tag":"p","children":[{"type":"text","text":"text ","start":0,"end":5},{"type":"transclude","start":5,"end":34,"attributes":{"$variable":{"name":"$variable","type":"string","value":"outie"},"one":{"name":"one","type":"string","value":"my <<innie>>","start":12,"end":31}},"orderedAttributes":[{"name":"$variable","type":"string","value":"outie"},{"name":"one","type":"string","value":"my <<innie>>","start":12,"end":31}]}],"start":0,"end":34}] + [{"type":"element","tag":"p","children":[{"type":"text","text":"text ","start":0,"end":5},{"type":"transclude","start":5,"end":34,"rule":"macrocallinline","attributes":{"$variable":{"name":"$variable","type":"string","value":"outie"},"one":{"name":"one","type":"string","value":"my <<innie>>","start":12,"end":31}},"orderedAttributes":[{"name":"$variable","type":"string","value":"outie"},{"name":"one","type":"string","value":"my <<innie>>","start":12,"end":31}]}],"start":0,"end":34}] ); @@ -247,37 +246,37 @@ describe("WikiText parser tests", function() { it("should parse block macro calls", function() { expect(parse("<<john>>\n<<paul>>\r\n<<george>>\n<<ringo>>")).toEqual( - [ { type: 'transclude', start: 0, attributes: { $variable: { name: "$variable", type: "string", value: "john" }}, orderedAttributes: [ { name: "$variable", type: "string", value: "john" }], end: 8, isBlock: true }, { type: 'transclude', start: 9, attributes: { $variable: { name: "$variable", type: "string", value: "paul" }}, orderedAttributes: [ { name: "$variable", type: "string", value: "paul" }], end: 17, isBlock: true }, { type: 'transclude', start: 19, attributes: { $variable: { name: "$variable", type: "string", value: "george" }}, orderedAttributes: [ { name: "$variable", type: "string", value: "george" }], end: 29, isBlock: true }, { type: 'transclude', start: 30, attributes: { $variable: { name: "$variable", type: "string", value: "ringo" }}, orderedAttributes: [ { name: "$variable", type: "string", value: "ringo" }], end: 39, isBlock: true } ] + [ { type: 'transclude', start: 0, rule: 'macrocallblock', attributes: { $variable: { name: "$variable", type: "string", value: "john" }}, orderedAttributes: [ { name: "$variable", type: "string", value: "john" }], end: 8, isBlock: true }, { type: 'transclude', start: 9, rule: 'macrocallblock', attributes: { $variable: { name: "$variable", type: "string", value: "paul" }}, orderedAttributes: [ { name: "$variable", type: "string", value: "paul" }], end: 17, isBlock: true }, { type: 'transclude', start: 19, rule: 'macrocallblock', attributes: { $variable: { name: "$variable", type: "string", value: "george" }}, orderedAttributes: [ { name: "$variable", type: "string", value: "george" }], end: 29, isBlock: true }, { type: 'transclude', start: 30, rule: 'macrocallblock', attributes: { $variable: { name: "$variable", type: "string", value: "ringo" }}, orderedAttributes: [ { name: "$variable", type: "string", value: "ringo" }], end: 39, isBlock: true } ] ); expect(parse("<<john one:val1 two: 'val \"2\"' three: \"val '3'\" four: \"\"\"val 4\"5'\"\"\" five: [[val 5]] >>")).toEqual( - [{"type":"transclude","start":0,"end":87,"attributes":{"$variable":{"name":"$variable","type":"string","value":"john"},"one":{"name":"one","type":"string","value":"val1","start":6,"end":15},"two":{"name":"two","type":"string","value":"val \"2\"","start":15,"end":30},"three":{"name":"three","type":"string","value":"val '3'","start":30,"end":47},"four":{"name":"four","type":"string","value":"val 4\"5'","start":47,"end":68},"five":{"name":"five","type":"string","value":"val 5","start":68,"end":84}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"},{"name":"one","type":"string","value":"val1","start":6,"end":15},{"name":"two","type":"string","value":"val \"2\"","start":15,"end":30},{"name":"three","type":"string","value":"val '3'","start":30,"end":47},{"name":"four","type":"string","value":"val 4\"5'","start":47,"end":68},{"name":"five","type":"string","value":"val 5","start":68,"end":84}],"isBlock":true}] + [{"type":"transclude","start":0,"end":87,"rule":"macrocallblock","attributes":{"$variable":{"name":"$variable","type":"string","value":"john"},"one":{"name":"one","type":"string","value":"val1","start":6,"end":15},"two":{"name":"two","type":"string","value":"val \"2\"","start":15,"end":30},"three":{"name":"three","type":"string","value":"val '3'","start":30,"end":47},"four":{"name":"four","type":"string","value":"val 4\"5'","start":47,"end":68},"five":{"name":"five","type":"string","value":"val 5","start":68,"end":84}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"},{"name":"one","type":"string","value":"val1","start":6,"end":15},{"name":"two","type":"string","value":"val \"2\"","start":15,"end":30},{"name":"three","type":"string","value":"val '3'","start":30,"end":47},{"name":"four","type":"string","value":"val 4\"5'","start":47,"end":68},{"name":"five","type":"string","value":"val 5","start":68,"end":84}],"isBlock":true}] ); expect(parse("<< carrots\n\n<<john>>")).toEqual( - [ { type: 'element', tag: 'p', start : 0, end : 10, children: [ { type: 'text', text: '<< carrots', start : 0, end : 10 } ] }, { type: 'transclude', start: 12, attributes: { $variable: {name: "$variable", type:"string", value: "john"} }, orderedAttributes: [ {name: "$variable", type:"string", value: "john"} ], end: 20, isBlock: true } ] + [ { type: 'element', tag: 'p', start : 0, end : 10, children: [ { type: 'text', text: '<< carrots', start : 0, end : 10 } ] }, { type: 'transclude', start: 12, rule: 'macrocallblock', attributes: { $variable: {name: "$variable", type:"string", value: "john"} }, orderedAttributes: [ {name: "$variable", type:"string", value: "john"} ], end: 20, isBlock: true } ] ); expect(parse("before\n\n<<john>>")).toEqual( - [ { type: 'element', tag: 'p', start : 0, end : 6, children: [ { type: 'text', text: 'before', start : 0, end : 6 } ] }, { type: 'transclude', start: 8, attributes: { $variable: {name: "$variable", type:"string", value: "john"} }, orderedAttributes: [ {name: "$variable", type:"string", value: "john"} ], end: 16, isBlock: true } ] + [ { type: 'element', tag: 'p', start : 0, end : 6, children: [ { type: 'text', text: 'before', start : 0, end : 6 } ] }, { type: 'transclude', start: 8, rule: 'macrocallblock', attributes: { $variable: {name: "$variable", type:"string", value: "john"} }, orderedAttributes: [ {name: "$variable", type:"string", value: "john"} ], end: 16, isBlock: true } ] ); expect(parse("<<john>>\nafter")).toEqual( - [ { type: 'transclude', start: 0, attributes: { $variable: {name: "$variable", type:"string", value: "john"} }, orderedAttributes: [ {name: "$variable", type:"string", value: "john"} ], end: 8, isBlock: true }, { type: 'element', tag: 'p', start: 9, end: 14, children: [ { type: 'text', text: 'after', start: 9, end: 14 } ] } ] + [ { type: 'transclude', start: 0, rule: 'macrocallblock', attributes: { $variable: {name: "$variable", type:"string", value: "john"} }, orderedAttributes: [ {name: "$variable", type:"string", value: "john"} ], end: 8, isBlock: true }, { type: 'element', tag: 'p', start: 9, end: 14, children: [ { type: 'text', text: 'after', start: 9, end: 14 } ] } ] ); expect(parse("<<multiline arg:\"\"\"\n\nwikitext\n\"\"\" >>")).toEqual( - [{"type":"transclude","start":0,"end":36,"attributes":{"$variable":{"name":"$variable","type":"string","value":"multiline"},"arg":{"name":"arg","type":"string","value":"\n\nwikitext\n","start":11,"end":33}},"orderedAttributes":[{"name":"$variable","type":"string","value":"multiline"},{"name":"arg","type":"string","value":"\n\nwikitext\n","start":11,"end":33}],"isBlock":true}] + [{"type":"transclude","start":0,"end":36,"rule":"macrocallblock","attributes":{"$variable":{"name":"$variable","type":"string","value":"multiline"},"arg":{"name":"arg","type":"string","value":"\n\nwikitext\n","start":11,"end":33}},"orderedAttributes":[{"name":"$variable","type":"string","value":"multiline"},{"name":"arg","type":"string","value":"\n\nwikitext\n","start":11,"end":33}],"isBlock":true}] ); expect(parse("<<outie one:'my <<innie>>' >>")).toEqual( - [ { type: 'transclude', start: 0, attributes: { $variable: {name: "$variable", type:"string", value: "outie"}, one: {name: "one", type:"string", value: "my <<innie>>", start: 7, end: 26} }, orderedAttributes: [ {name: "$variable", type:"string", value: "outie"}, {name: "one", type:"string", value: "my <<innie>>", start: 7, end: 26} ], end: 29, isBlock: true } ] + [ { type: 'transclude', start: 0, rule: 'macrocallblock', attributes: { $variable: {name: "$variable", type:"string", value: "outie"}, one: {name: "one", type:"string", value: "my <<innie>>", start: 7, end: 26} }, orderedAttributes: [ {name: "$variable", type:"string", value: "outie"}, {name: "one", type:"string", value: "my <<innie>>", start: 7, end: 26} ], end: 29, isBlock: true } ] ); }); @@ -285,23 +284,23 @@ describe("WikiText parser tests", function() { it("should parse tricky macrocall parameters", function() { expect(parse("<<john pa>am>>")).toEqual( - [{"type":"transclude","start":0,"end":14,"attributes":{"0":{"name":"0","type":"string","value":"pa>am","start":6,"end":12},"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"},{"name":"0","type":"string","value":"pa>am","start":6,"end":12}],"isBlock":true}] + [{"type":"transclude","start":0,"end":14,"attributes":{"0":{"name":"0","type":"string","value":"pa>am","start":6,"end":12},"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"},{"name":"0","type":"string","value":"pa>am","start":6,"end":12}],"isBlock":true,"rule":"macrocallblock"}] ); expect(parse("<<john param> >>")).toEqual( - [{"type":"transclude","start":0,"end":16,"attributes":{"0":{"name":"0","type":"string","value":"param>","start":6,"end":13},"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"},{"name":"0","type":"string","value":"param>","start":6,"end":13}],"isBlock":true}] + [{"type":"transclude","start":0,"end":16,"attributes":{"0":{"name":"0","type":"string","value":"param>","start":6,"end":13},"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"},{"name":"0","type":"string","value":"param>","start":6,"end":13}],"isBlock":true,"rule":"macrocallblock"}] ); expect(parse("<<john param>>>")).toEqual( - [{"type":"element","tag":"p","children":[{"type":"transclude","start":0,"end":14,"attributes":{"0":{"name":"0","type":"string","value":"param","start":6,"end":12},"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"},{"name":"0","type":"string","value":"param","start":6,"end":12}]},{"type":"text","text":">","start":14,"end":15}],"start":0,"end":15}] + [{"type":"element","tag":"p","children":[{"type":"transclude","start":0,"end":14,"rule":"macrocallinline","attributes":{"0":{"name":"0","type":"string","value":"param","start":6,"end":12},"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"},{"name":"0","type":"string","value":"param","start":6,"end":12}]},{"type":"text","text":">","start":14,"end":15}],"start":0,"end":15}] ); // equals signs should be allowed expect(parse("<<john var>=4 >>")).toEqual( - [{"type":"transclude","start":0,"end":16,"attributes":{"0":{"name":"0","type":"string","value":"var>=4","start":6,"end":13},"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"},{"name":"0","type":"string","value":"var>=4","start":6,"end":13}],"isBlock":true}] + [{"type":"transclude","start":0,"end":16,"attributes":{"0":{"name":"0","type":"string","value":"var>=4","start":6,"end":13},"$variable":{"name":"$variable","type":"string","value":"john"}},"orderedAttributes":[{"name":"$variable","type":"string","value":"john"},{"name":"0","type":"string","value":"var>=4","start":6,"end":13}],"isBlock":true,"rule":"macrocallblock"}] ); @@ -310,7 +309,7 @@ describe("WikiText parser tests", function() { it("should parse horizontal rules", function() { expect(parse("---Not a rule\n\n----\n\nBetween\n\n---")).toEqual( - [ { type : 'element', tag : 'p', start : 0, end : 13, children : [ { type : 'entity', entity : '—' }, { type : 'text', text : 'Not a rule', start : 3, end : 13 } ] }, { type : 'element', tag : 'hr' }, { type : 'element', tag : 'p', start : 21, end : 28, children : [ { type : 'text', text : 'Between', start : 21, end : 28 } ] }, { type : 'element', tag : 'hr' } ] + [ { type : 'element', tag : 'p', start : 0, end : 13, children : [ { type : 'entity', entity : '—', start: 0, end: 3, rule: 'dash' }, { type : 'text', text : 'Not a rule', start : 3, end : 13 } ] }, { type : 'element', tag : 'hr', start: 15, end: 20, rule: 'horizrule' }, { type : 'element', tag : 'p', start : 21, end : 28, children : [ { type : 'text', text : 'Between', start : 21, end : 28 } ] }, { type : 'element', tag : 'hr', start: 30, end: 33, rule: 'horizrule' } ] ); @@ -319,7 +318,7 @@ describe("WikiText parser tests", function() { it("should parse hard linebreak areas", function() { expect(parse("\"\"\"Something\nin the\nway she moves\n\"\"\"\n\n")).toEqual( - [ { type : 'element', tag : 'p', children : [ { type : 'text', text : 'Something', start : 3, end : 12 }, { type : 'element', tag : 'br' }, { type : 'text', text : 'in the', start : 13, end : 19 }, { type : 'element', tag : 'br' }, { type : 'text', text : 'way she moves', start : 20, end : 33 }, { type : 'element', tag : 'br' } ], start : 0, end : 37 } ] + [ { type : 'element', tag : 'p', children : [ { type : 'text', text : 'Something', start : 3, end : 12, rule: 'hardlinebreaks' }, { type : 'element', tag : 'br', rule: 'hardlinebreaks', start: 12, end: 13 }, { type : 'text', text : 'in the', start : 13, end : 19, rule: 'hardlinebreaks' }, { type : 'element', tag : 'br', rule: 'hardlinebreaks', start: 19, end: 20 }, { type : 'text', text : 'way she moves', start : 20, end : 33, rule: 'hardlinebreaks' }, { type : 'element', tag : 'br', rule: 'hardlinebreaks', start: 33, end: 34 } ], start : 0, end : 37 } ] ); diff --git a/editions/tw5.com/tiddlers/about/Archive.tid b/editions/tw5.com/tiddlers/about/Archive.tid index 988f65e7b..a74a3218d 100644 --- a/editions/tw5.com/tiddlers/about/Archive.tid +++ b/editions/tw5.com/tiddlers/about/Archive.tid @@ -8,7 +8,7 @@ tags: About 5.1.10 5.1.11 5.1.12 5.1.13 5.1.14 5.1.15 5.1.16 5.1.17 5.1.18 5.1.19 5.1.20 5.1.21 5.1.22 5.1.23 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 -5.3.0 5.3.1 +5.3.0 5.3.1 5.3.2 5.3.3 \end Older versions of TiddlyWiki are available in the [[archive|https://github.com/Jermolene/jermolene.github.io/tree/master/archive]]: diff --git a/editions/tw5.com/tiddlers/concepts/Hard and Soft Links.tid b/editions/tw5.com/tiddlers/concepts/Hard and Soft Links.tid index 65eeccc4e..266ad1f87 100644 --- a/editions/tw5.com/tiddlers/concepts/Hard and Soft Links.tid +++ b/editions/tw5.com/tiddlers/concepts/Hard and Soft Links.tid @@ -1,10 +1,10 @@ created: 20150123220237000 -modified: 20150226163104000 +modified: 20240610085736941 tags: Concepts title: Hard and Soft Links type: text/vnd.tiddlywiki -A <<.def "hard link">> is one that can be detected by a superficial examination of WikiText. +A <<.def "hard link">> is a [[link|Linking in WikiText]] that can be detected by a superficial examination of WikiText. A link is <<.def "soft">> if it is: @@ -13,3 +13,5 @@ A link is <<.def "soft">> if it is: * generated by a link widget whose <<.attr to>> attribute is a transclusion, macro or variable <$macrocall $name=".warning" _="""Soft links are not detected by link-related filter operators such as <<.olink backlinks>>, <<.olink links>>, <<.olink all>> and <<.olink is>>."""/> + +This concept is analogous to [[Hard and Soft Transclusions]]. diff --git a/editions/tw5.com/tiddlers/concepts/Hard and Soft Transclusions.tid b/editions/tw5.com/tiddlers/concepts/Hard and Soft Transclusions.tid new file mode 100644 index 000000000..9ede53176 --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/Hard and Soft Transclusions.tid @@ -0,0 +1,16 @@ +created: 20240610085133221 +modified: 20240610085613037 +tags: Concepts +title: Hard and Soft Transclusions + +A <<.def "hard transclusion">> is a [[transclusion|Transclusion]] that can be detected by a superficial examination of WikiText. + +A transclusion is <<.def "soft">> if it is: + +* contained in text [[trancluded|Transclusion]] from elsewhere +* supplied via a [[macro|Macros]], [[procedure|Procedures]] or [[variable|Variables]] +* generated by a [[transclude widget|TranscludeWidget]] whose <<.attr $tiddler>> attribute is a transclusion, macro or variable + +<$macrocall $name=".warning" _="""Soft transclusions are not detected by transclusion-related filter operators <<.olink transcludes>> and <<.olink backtranscludes>>."""/> + +This concept is analogous to [[Hard and Soft Links]]. diff --git a/editions/tw5.com/tiddlers/concepts/Transclusion.tid b/editions/tw5.com/tiddlers/concepts/Transclusion.tid index 94f6015bc..80068b8e5 100644 --- a/editions/tw5.com/tiddlers/concepts/Transclusion.tid +++ b/editions/tw5.com/tiddlers/concepts/Transclusion.tid @@ -1,9 +1,15 @@ created: 20141129194651420 -modified: 20141130195444237 -tags: Concepts +modified: 20240621074019077 +tags: Concepts Definitions title: Transclusion -[[Transclusion|https://en.wikipedia.org/wiki/Transclusion]] is the process of referencing one tiddler "A" from another tiddler "B" such that the content of "A" appears to be a part of "B". +! Definition + +<<< Wikipedia: [[Transclusion|https://en.wikipedia.org/wiki/Transclusion]] +In computer science, transclusion is the inclusion of part or all of an electronic document into one or more other documents by reference via hypertext. +<<< + +In ~TiddlyWiki: ''Transclusion'' is the process of referencing one tiddler "A" from another tiddler "B" such that the content of "A" appears to be a part of "B". Copying and pasting content creates multiple copies of the same content in several different places. With transclusion, there can be a single copy and a special instruction in "B" which indicates the point at which content should be inserted from tiddler "A". @@ -20,3 +26,4 @@ To learn more: * TextReference * TemplateTiddlers * TranscludeWidget +* [[Hard and Soft Transclusions]] diff --git a/editions/tw5.com/tiddlers/filters/backtranscludes.tid b/editions/tw5.com/tiddlers/filters/backtranscludes.tid index d39102a63..48c153017 100644 --- a/editions/tw5.com/tiddlers/filters/backtranscludes.tid +++ b/editions/tw5.com/tiddlers/filters/backtranscludes.tid @@ -1,13 +1,14 @@ +caption: backtranscludes created: 20211002204500000 +modified: 20240610085949413 +op-input: a [[selection of titles|Title Selection]] +op-output: any non-[[system|SystemTiddlers]] titles that [[hard-transclude|Hard and Soft Transclusions]] the input titles +op-parameter: none +op-purpose: find the titles that transclude each input title tags: [[Filter Operators]] title: backtranscludes Operator type: text/vnd.tiddlywiki -caption: backtranscludes -op-purpose: find the titles that transcludes to each input title -op-input: a [[selection of titles|Title Selection]] -op-parameter: none -op-output: any non-[[system|SystemTiddlers]] titles that contain [[transclusion|Transclusion]] to the input titles -<<.from-version 5.3.4>> Similar to [[backlinks|backlinks Operator]]. Each input title is processed in turn. The corresponding tiddler's list of backtranscludes is generated, sorted alphabetically by title, and then [[dominantly appended|Dominant Append]] to the operator's overall output. +<<.from-version 5.3.4>> Each input title is processed in turn. The corresponding tiddler's list of backtransclusions is generated, sorted alphabetically by title, and then [[dominantly appended|Dominant Append]] to the operator's overall output. Analogous to [[backlinks|backlinks Operator]]. <<.operator-examples "backtranscludes">> diff --git a/editions/tw5.com/tiddlers/filters/minlength.tid b/editions/tw5.com/tiddlers/filters/minlength.tid index d450df35f..d36a06cfb 100644 --- a/editions/tw5.com/tiddlers/filters/minlength.tid +++ b/editions/tw5.com/tiddlers/filters/minlength.tid @@ -1,12 +1,12 @@ caption: minlength created: 20161011074235805 -modified: 20161011074235805 +from-version: 5.1.14 +modified: 20240621073052597 op-input: a list of items op-output: those items at least as long as the specified minimum length op-parameter: the minimum length for items op-parameter-name: minlength -op-purpose: filter items shorter than the specified minimum length -from-version: 5.1.14 +op-purpose: filter items whose length is greater than the specified minimum length tags: [[Filter Operators]] title: minlength Operator type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/splitregexp Operator.tid b/editions/tw5.com/tiddlers/filters/splitregexp Operator.tid index 59043e7f8..fe953c81b 100644 --- a/editions/tw5.com/tiddlers/filters/splitregexp Operator.tid +++ b/editions/tw5.com/tiddlers/filters/splitregexp Operator.tid @@ -1,6 +1,6 @@ caption: splitregexp created: 20190613154722705 -modified: 20190613154924724 +modified: 20240606113433618 op-input: a [[selection of titles|Title Selection]] op-output: the input titles split into separate items according to the specified regular expression <<.place R>> op-parameter: The regular expression at which to split each title @@ -13,7 +13,7 @@ type: text/vnd.tiddlywiki <<.from-version "5.1.20">> -Note that in some circumstances the <<.op splitregexp>> operator will include blank items in the list of results. For example, +<<.note """... that in some circumstances the <<.op splitregexp>> operator will include blank items in the list of results. For example, """>> ``` [[the band thethe are the best the]splitregexp[the]] @@ -42,3 +42,21 @@ Syntax errors in the regular expression will cause the filter to return an error <<.operator-example 2 "[[the cat sat on the mat]splitregexp[\]]">> <<.operator-examples "splitregexp">> + +---- + +The <<.op splitregexp>> operator is intended to be used as described above. If the `regexp` contains //capture groups// those groups will be included into the output. + +<<.bad-example """``` +\procedure re() (color)|(colour)ed +\procedure str() Some coloured text +{{{ [<str>splitregexp<re>join[, ]] }}} +```""">> + +Somewhat more useful may be this code. + +``` +\procedure re() (colou?red) +\procedure str() Some coloured text +{{{ [<str>splitregexp<re>join[, ]] }}} +``` \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/transcludes.tid b/editions/tw5.com/tiddlers/filters/transcludes.tid index 29b90eb54..444df0111 100644 --- a/editions/tw5.com/tiddlers/filters/transcludes.tid +++ b/editions/tw5.com/tiddlers/filters/transcludes.tid @@ -1,13 +1,14 @@ +caption: transcludes created: 20211002204500000 +modified: 20240610085927867 +op-input: a [[selection of titles|Title Selection]] +op-output: the titles which the input tiddlers [[hard-transclude|Hard and Soft Transclusions]] +op-parameter: none +op-purpose: find the titles transcluded by each input title tags: [[Filter Operators]] [[Common Operators]] title: transcludes Operator type: text/vnd.tiddlywiki -caption: transcludes -op-purpose: find the titles linked to by each input title -op-input: a [[selection of titles|Title Selection]] -op-parameter: none -op-output: the titles to which the input tiddlers [[transcludes|Transclusion]] -Each input title is processed in turn. The corresponding tiddler's list of transcludes is generated, in the order in which they appear in the tiddler's text, and [[dominantly appended|Dominant Append]] to the operator's overall output. +<<.from-version 5.3.4>> Each input title is processed in turn. The corresponding tiddler's list of transclusions is generated, in the order in which they appear in the tiddler's text, and [[dominantly appended|Dominant Append]] to the operator's overall output. <<.operator-examples "transcludes">> diff --git a/editions/tw5.com/tiddlers/images/Open Collective Logo.tid b/editions/tw5.com/tiddlers/images/Open Collective Logo.tid index 25e91161a..7dec4d62b 100644 --- a/editions/tw5.com/tiddlers/images/Open Collective Logo.tid +++ b/editions/tw5.com/tiddlers/images/Open Collective Logo.tid @@ -1,4 +1,6 @@ -title: Open Collective Logo +created: 20240621075644739 +modified: 20240621075647009 tags: picture +title: Open Collective Logo -<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 28 28"><path d="M25.509 6.026A13.934 13.934 0 0 1 28 14c0 2.963-.92 5.71-2.491 7.974l-3.626-3.627A8.96 8.96 0 0 0 23 14a8.964 8.964 0 0 0-1.117-4.347l3.626-3.627Z"/><path d="m21.974 2.49-3.627 3.628a9 9 0 1 0 0 15.765l3.627 3.626A13.934 13.934 0 0 1 14 27.999C6.268 28 0 21.733 0 14 0 6.269 6.268 0 14 0c2.963 0 5.711.922 7.974 2.492Z"/></svg> \ No newline at end of file +<svg style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 28 28"><path d="M25.509 6.026A13.934 13.934 0 0 1 28 14c0 2.963-.92 5.71-2.491 7.974l-3.626-3.627A8.96 8.96 0 0 0 23 14a8.964 8.964 0 0 0-1.117-4.347l3.626-3.627Z"/><path d="m21.974 2.49-3.627 3.628a9 9 0 1 0 0 15.765l3.627 3.626A13.934 13.934 0 0 1 14 27.999C6.268 28 0 21.733 0 14 0 6.269 6.268 0 14 0c2.963 0 5.711.922 7.974 2.492Z"/></svg> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/macros/LingoMacro.tid b/editions/tw5.com/tiddlers/macros/LingoMacro.tid index 7c222e2df..f91f94c6f 100644 --- a/editions/tw5.com/tiddlers/macros/LingoMacro.tid +++ b/editions/tw5.com/tiddlers/macros/LingoMacro.tid @@ -1,37 +1,16 @@ -caption: lingo created: 20150221154907000 -modified: 20231028123405895 -tags: Macros [[Core Macros]] +modified: 20150221155706000 title: lingo Macro -type: text/vnd.tiddlywiki +tags: Macros [[Core Macros]] +caption: lingo The <<.def lingo>> [[macro|Macros]] relates to the translation of ~TiddlyWiki's user interface into other languages. It returns a piece of text in the user's currently selected language. -Translatable text is supplied by: +Translatable text is supplied by language plugins containing tiddlers with specific titles that start with `$:/language/`. -# Language plugins -# Any l10n (localization) strings outside of the language plugins - -!! Language plugins - -You can directly pass title to `lingo` macro, when there is a language plugin containing a tiddler with such title that start with `$:/language/`. +!! Parameters ;title : The title of the shadow tiddler that contains the text. The prefix `$:/language/` is added automatically -<<.macro-examples "lingo (for language plugin)">> - -!! Any l10n strings - -To translate any text that directly placed in user's wiki, instead of in a language plugin, you can set the `lingo-base` variable to teach <<.def lingo>> macro the place to look for. - -!!! Parameters - -;key -: The last part of title of the tiddler that contains the text. The `<<lingo-base>>` prefix and current language name prefix is added automatically -;lingo-base-fallback -: Optional lingo-base when it is not possible to define `lingo-base` variable (for example, when using this macro in the caption field), you can set the lingo base by passing this parameter - -<<.macro-examples "lingo (for custom base)">> - -{{lingo Macro (file structure)}} +<<.macro-examples "lingo">> diff --git a/editions/tw5.com/tiddlers/macros/examples/lingo Macro (custom base examples).tid b/editions/tw5.com/tiddlers/macros/examples/lingo Macro (custom base examples).tid deleted file mode 100644 index 26f4e0735..000000000 --- a/editions/tw5.com/tiddlers/macros/examples/lingo Macro (custom base examples).tid +++ /dev/null @@ -1,21 +0,0 @@ -created: 20231028120432257 -modified: 20240206113509050 -tags: [[lingo Macro]] [[Macro Examples]] -title: lingo (for custom base) Macro (Examples) -type: text/vnd.tiddlywiki - -\define lingo-base() lingo Macro (custom base examples)/ - -Given the `\define lingo-base() lingo Macro (custom base examples)/`, this example shows the localizaion key `ExampleKey` being translate to the text in [[lingo Macro (custom base examples)/en-GB/ExampleKey]]: - -<$macrocall $name=".example" n="1" eg="""<<lingo ExampleKey>>"""/> - -This example shows the `lingo-base` can be set as second parameter: - -<$macrocall $name=".example" n="2" eg="""<<lingo ExampleKey "lingo Macro (custom base examples)/">>"""/> - -When use lingo macro in a [[Inline Mode WikiText]] like [[list|Lists in WikiText]] or [[title|Headings in WikiText]], the parse mode will be inline, so translated text will be inlined too. - -<$macrocall $name=".example" n="3" eg="""# <<lingo ExampleKey>>"""/> - -<$macrocall $name=".example" n="4" eg="""!! <<lingo ExampleKey>>"""/> diff --git a/editions/tw5.com/tiddlers/macros/examples/lingo Macro (custom base examples)_en-GB_ExampleKey.tid b/editions/tw5.com/tiddlers/macros/examples/lingo Macro (custom base examples)_en-GB_ExampleKey.tid deleted file mode 100644 index d94d1bdee..000000000 --- a/editions/tw5.com/tiddlers/macros/examples/lingo Macro (custom base examples)_en-GB_ExampleKey.tid +++ /dev/null @@ -1,8 +0,0 @@ -created: 20231028120526948 -modified: 20240206113155142 -title: lingo Macro (custom base examples)/en-GB/ExampleKey -type: text/vnd.tiddlywiki - -This is the translated text of key "~ExampleKey" under lingo-base `lingo Macro (custom base examples)/` (don't forget the tailing slash `/`) - -And is multi-line, if it is translated in the block mode by default. (Become single line if set to inline mode.) diff --git a/editions/tw5.com/tiddlers/macros/examples/lingo Macro (file structure).tid b/editions/tw5.com/tiddlers/macros/examples/lingo Macro (file structure).tid deleted file mode 100644 index e653f234b..000000000 --- a/editions/tw5.com/tiddlers/macros/examples/lingo Macro (file structure).tid +++ /dev/null @@ -1,73 +0,0 @@ -created: 20231028120432257 -modified: 20240206122408606 -tags: [[lingo Macro]] [[Macro Examples]] -title: lingo Macro (file structure) - -!! Example file structure for [[TiddlyWiki on Node.js]] - -!!! Suggested file structure - -When developing a plugin, you may want to organize your language files like this on the file system as [[MultiTiddlerFiles]]: - -```tree -├── language -│ ├── en-GB -│ │ ├── Translations.multids -│ │ └── SomeLongText.tid -│ └── zh-Hans -│ ├── Translations.multids -│ └── SomeLongText.tid -├── other files -└── plugin.info -``` - -See [[$:/plugins/tiddlywiki/menubar/tree]] for an example. - -!!! Define Multiple Translations in One Tiddler - -And the content of `language/en-GB/Translations.multids` may looks like this: - -```multids -title: $:/plugins/yourName/pluginName/language/en-GB/ - -OpenInteractiveCard: Open Interactive Card -OpenStaticCard: Open Static Card -``` - -Later you can use it like: - -```tid -title: someTiddler -caption: <<lingo OpenStaticCard "$:/plugins/yourName/pluginName/language/">> - -\define lingo-base() $:/plugins/yourName/pluginName/language/ -\whitespace trim - -<<lingo OpenInteractiveCard>> -``` - -!!! Define Long Text in a regular Tiddler - -You can also use a regular tiddler for long text, like `SomeLongText.tid` in the example above, to store a multi-paragraph long text: - -```tid -title: $:/plugins/yourName/pluginName/language/en-GB/SomeLongText - -!!! SubTitle - -This is a long text. -``` - -Later you can use it like: - -```tid -title: someTiddler - -\define lingo-base() $:/plugins/yourName/pluginName/language/ - -!! <<lingo "OpenInteractiveCard">> - -<<lingo SomeLongText>> -``` - -Note that lingo macro will use the [[parse mode|WikiText Parser Modes]] in the current position where this procedure is invoked. diff --git a/editions/tw5.com/tiddlers/macros/examples/lingo Macro (language plugin examples).tid b/editions/tw5.com/tiddlers/macros/examples/lingo.tid similarity index 90% rename from editions/tw5.com/tiddlers/macros/examples/lingo Macro (language plugin examples).tid rename to editions/tw5.com/tiddlers/macros/examples/lingo.tid index 8b7bceba1..8f0fb9d57 100644 --- a/editions/tw5.com/tiddlers/macros/examples/lingo Macro (language plugin examples).tid +++ b/editions/tw5.com/tiddlers/macros/examples/lingo.tid @@ -1,7 +1,7 @@ created: 20150221151358000 modified: 20150221160113000 tags: [[lingo Macro]] [[Macro Examples]] -title: lingo (for language plugin) Macro (Examples) +title: lingo Macro (Examples) type: text/vnd.tiddlywiki This example shows the text used as the basis for the title of a newly created tiddler: diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Examples.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Examples.tid new file mode 100644 index 000000000..53ea600ca --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Examples.tid @@ -0,0 +1,117 @@ +created: 20240609152203076 +modified: 20240614210714914 +tags: +title: WidgetMessage: tm-http-request Examples +type: text/vnd.tiddlywiki + +<$let store-fetched-output="""\procedure store-fetched-output() +<$action-setfield $tiddler=Output status=<<status>> error=<<error>> data=<<data>> headers=<<headers>>/> +\end +"""> +<$testcase> +<$data title=Description text="Simple tm-http-request GET"/> +<$data title=Narrative text="""Use the oncompletion attribute to store the results of a method="GET" request"""/> +<$data title=Output text=`$(store-fetched-output)$ +\procedure http-get() + <$action-sendmessage + $message="tm-http-request" + url="https://httpbin.org/get" + method="GET" + oncompletion=<<store-fetched-output>> + /> +\end + +<$button actions=<<http-get>>>send HTTP GET</$button>`/> +</$testcase> + +<$testcase> +<$data title=Description text="Simple tm-http-request POST"/> +<$data title=Narrative text="""Use the oncompletion attribute to store the results of a method="POST" request. Use the body attribute to send data"""/> +<$data title=Output text=`$(store-fetched-output)$ +\procedure http-post() + <$action-sendmessage + $message="tm-http-request" + url="https://httpbin.org/post" + method="POST" + body='{"foo": "bar"}' + oncompletion=<<store-fetched-output>> + /> +\end + +<$button actions=<<http-post>>>send HTTP POST</$button>`/> +</$testcase> + +<$testcase> +<$data title=Description text="tm-http-request with delayed response"/> +<$data title=Narrative text="""Use the bind-status and bind-progress attributes to watch the intermediate state of a slow response"""/> +<$data title=Output text=`$(store-fetched-output)$ +\procedure http-get() + <$action-sendmessage + $message="tm-http-request" + url="https://httpbin.org/delay/2" + bind-status=status + bind-progress=progress + method="GET" + oncompletion=<<store-fetched-output>> + /> +\end + +<$button actions=<<http-get>>>send HTTP GET</$button> + +|!status |{{status}}| +|!progress %|{{progress}}|`/> +</$testcase> + +<$testcase> +<$data title=Description text="tm-http-request with dripped response"/> +<$data title=Narrative text="""Use the bind-status and bind-progress attributes to watch progress of data which arrives a little at a time"""/> +<$data title=Output text=`$(store-fetched-output)$ +\procedure http-get() + <$action-sendmessage + $message="tm-http-request" + url="https://httpbin.org/drip?duration=2&numbytes=10&code=200&delay=2" + bind-status=status + bind-progress=progress + method="GET" + oncompletion=<<store-fetched-output>> + /> +\end + +<$button actions=<<http-get>>>send HTTP GET</$button> + +|!status |{{status}}| +|!progress %|{{progress}}|`/> +</$testcase> + +<$testcase> +<$data title=Description text="tm-http-request 504 Bad Gateway error response"/> +<$data title=Narrative text="""Send a request to a url which simulates a 504 HTTP response in order to illustrate what an error response looks like"""/> +<$data title=Output text=`$(store-fetched-output)$ +\procedure http-get() + <$action-sendmessage + $message="tm-http-request" + url="https://httpbin.org/status/504" + method="GET" + oncompletion=<<store-fetched-output>> + /> +\end + +<$button actions=<<http-get>>>send HTTP GET</$button>`/> +</$testcase> + +<$testcase> +<$data title=Description text="tm-http-request 405 Method Not Allowed error response"/> +<$data title=Narrative text="""Another error response example. This one sends a GET to a URL which only allows POST"""/> +<$data title=Output text=`$(store-fetched-output)$ +\procedure http-get() + <$action-sendmessage + $message="tm-http-request" + url="https://httpbin.org/post" + method="GET" + oncompletion=<<store-fetched-output>> + /> +\end + +<$button actions=<<http-get>>>send HTTP GET</$button>`/> +</$testcase> +</$let> diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid index 9006fc7cd..d6efcb27c 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid @@ -1,6 +1,6 @@ caption: tm-http-request created: 20230429161453032 -modified: 20230723215344887 +modified: 20240614204704401 tags: Messages title: WidgetMessage: tm-http-request type: text/vnd.tiddlywiki @@ -54,6 +54,7 @@ Note that the state tiddler $:/state/http-requests contains a number representin !! Examples +* Several simple examples using https://httpbin.org: [[WidgetMessage: tm-http-request Examples]] * [[Zotero's|https://www.zotero.org/]] API for retrieving reference items: [[WidgetMessage: tm-http-request Example - Zotero]] * [[Random Dog's|https://random.dog/]] API for retrieving random pictures of dogs showing how to retrieve binary data: [[WidgetMessage: tm-http-request Example - Random Dog]] * Example of using HTTP Basic Authentication: [[WidgetMessage: tm-http-request Example - Basic Authentication]] diff --git a/editions/tw5.com/tiddlers/procedures/Procedures.tid b/editions/tw5.com/tiddlers/procedures/Procedures.tid index 7bc0f608f..321284f93 100644 --- a/editions/tw5.com/tiddlers/procedures/Procedures.tid +++ b/editions/tw5.com/tiddlers/procedures/Procedures.tid @@ -18,12 +18,13 @@ The name wrapped in double angled [[brackets|Brackets]] is a shorthand way of [[ ``` <<my-procedure>> +<<my-procedure "The parameter">> <<my-procedure parameter:"The parameter">> ``` The parameters that are specified in the procedure call are made available as variables. -<<.tip """If a procedure has more than 1 parameter, it is highly encouraged to use "named parameters", as shown in the second example above. Even if it is more to type, it will pay off in the long run.""">> +<<.tip """If a procedure has more than one parameter, it is highly encouraged to use "named parameters", as shown in the third example above and in contrast to the second example. Even if it is more to type, it will pay off in the long run.""">> !! How Procedures Work diff --git a/editions/tw5.com/tiddlers/releasenotes/Release 5.3.2.tid b/editions/tw5.com/tiddlers/releasenotes/Release 5.3.2.tid index e2f3637cb..17edb4784 100644 --- a/editions/tw5.com/tiddlers/releasenotes/Release 5.3.2.tid +++ b/editions/tw5.com/tiddlers/releasenotes/Release 5.3.2.tid @@ -1,11 +1,11 @@ caption: 5.3.2 created: 20231213080637781 +description: Conditional Shortcut Syntax, ListWidget Improvements modified: 20231213080637781 released: 20231213080637781 tags: ReleaseNotes title: Release 5.3.2 type: text/vnd.tiddlywiki -description: Under development //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.1...v5.3.2]]// diff --git a/editions/tw5.com/tiddlers/releasenotes/Release 5.3.3.tid b/editions/tw5.com/tiddlers/releasenotes/Release 5.3.3.tid index b6d1cc451..5a7c649f9 100644 --- a/editions/tw5.com/tiddlers/releasenotes/Release 5.3.3.tid +++ b/editions/tw5.com/tiddlers/releasenotes/Release 5.3.3.tid @@ -1,11 +1,11 @@ caption: 5.3.3 created: 20231223102201587 +description: Bugfix release for v5.3.2 modified: 20231223102201587 released: 20231223102201587 tags: ReleaseNotes title: Release 5.3.3 type: text/vnd.tiddlywiki -description: Under development //[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.2...v5.3.3]]// diff --git a/editions/tw5.com/tiddlers/saving/Saving with Polly.tid b/editions/tw5.com/tiddlers/saving/Saving with Polly.tid index 103c9e0c7..60ae74087 100644 --- a/editions/tw5.com/tiddlers/saving/Saving with Polly.tid +++ b/editions/tw5.com/tiddlers/saving/Saving with Polly.tid @@ -9,7 +9,6 @@ modified: 20220223160414274 tags: Chrome Firefox [[Internet Explorer]] Linux Mac Opera Safari Saving Windows Edge title: Saving with Polly type: text/vnd.tiddlywiki -ribbon-text: NEW [[Polly|https://github.com/Marxsal/polly]] is a batch file system using Windows //~PowerShell// to restore ~TiddlyWiki files from a specified download directory to their original home directory. diff --git a/editions/tw5.com/tiddlers/saving/TiddlyBucket - Save to AWS or Google Storage.tid b/editions/tw5.com/tiddlers/saving/TiddlyBucket - Save to AWS or Google Storage.tid index d4aefdb0e..272f22bbc 100644 --- a/editions/tw5.com/tiddlers/saving/TiddlyBucket - Save to AWS or Google Storage.tid +++ b/editions/tw5.com/tiddlers/saving/TiddlyBucket - Save to AWS or Google Storage.tid @@ -8,7 +8,6 @@ modified: 20221126192853897 tags: Chrome Firefox [[Internet Explorer]] Linux Mac Opera Safari Saving Windows iOS Edge title: TiddlyBucket - Save to AWS or Google Storage type: text/vnd.tiddlywiki -ribbon-text: NEW ~TiddlyBucket - Save to AWS or Google Storage using Go diff --git a/editions/tw5.com/tiddlers/widgets/ActionDeleteFieldWidget.tid b/editions/tw5.com/tiddlers/widgets/ActionDeleteFieldWidget.tid index 5b797232b..7cbf4fa38 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionDeleteFieldWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionDeleteFieldWidget.tid @@ -1,6 +1,6 @@ caption: action-deletefield created: 20141025120850184 -modified: 20150220162042000 +modified: 20240608151322035 tags: Widgets ActionWidgets title: ActionDeleteFieldWidget type: text/vnd.tiddlywiki @@ -21,26 +21,56 @@ The ''action-deletefield'' widget is invisible. Any content within it is ignored ! Examples -Here is an example of a button that deletes the caption and tags fields of the current tiddler: +<$testcase> +<$data title=Description text="Delete currentTiddler fields using plain attributes"/> +<$data title=Narrative text="""Use the $action-deletefield widget to delete the "caption" and "tags" fields of the current tiddler"""/> +<$data title=Output caption="A caption" tags="tag1 tag2 tag3" text="""Click +<$button actions="<$action-deletefield caption tags/>"> +Delete +</$button> +and watch the "caption" and "tags" field disappear."""/> +</$testcase> -<$macrocall $name='wikitext-example-without-html' -src='<$button> -<$action-deletefield caption tags/> -Delete "caption" and "tags" -</$button>'/> +<$testcase> +<$data title=Description text="Delete fields from a specific tiddler"/> +<$data title=Narrative text="""Use the $action-deletefield widget to delete the "list" and "tags" fields of the tiddler ~HelloThere"""/> +<$data $tiddler="HelloThere"/> +<$data title=Output text="""Click HelloThere, then click +<$button actions='<$action-deletefield $tiddler="HelloThere" list tags/>'> +Delete +</$button> +and watch the "list" and "tags" fields disappear"""/> +</$testcase> -Here is an example of a button that deletes the modified date and tags fields of the tiddler HelloThere: +<$testcase> +<$data title=Description text="Delete field from a specific tiddler"/> +<$data title=Narrative text="""Use the $field attribute of the $action-deletefield widget to delete the "text" field of the tiddler ~HelloThere"""/> +<$data $tiddler="HelloThere"/> +<$data title=Output text="""Click HelloThere, then click +<$button actions='<$action-deletefield $tiddler="HelloThere" $field="text"/>'> +Delete +</$button> +and watch the contents of the "text" field disappear"""/> +</$testcase> -<$macrocall $name='wikitext-example-without-html' -src='<$button> -<$action-deletefield $tiddler="HelloThere" modified tags/> -Delete "modified" and "tags" from ~HelloThere -</$button>'/> +<$testcase> +<$data title=Description text="Delete a variable field name"/> +<$data title=Narrative text="""Use the $field attribute of the $action-deletefield widget to delete a variable field name"""/> +<$data title=Output description="This field will be deleted" text="""<$let fieldName=description> +Click +<$button actions="<$action-deletefield $field=<<fieldName>>/>"> +Delete +</$button> +and watch the "<<fieldName>>" field disappear."""/> +</$let> +</$testcase> -Here is an example of a button that uses the optional $field attribute to delete the text field of the tiddler HelloThere: - -<$macrocall $name='wikitext-example-without-html' -src='<$button> -<$action-deletefield $tiddler="HelloThere" $field="text"/> -Delete text from ~HelloThere -</$button>'/> +<$testcase> +<$data title=Description text="Delete field without updating timestamps"/> +<$data title=Narrative text="""Use the $timestamp attribute of the $action-deletefield widget to prevent creation/change of "modified" and "created" fields"""/> +<$data title=Output description="This field will be deleted" text="""Click +<$button actions='<$action-deletefield $field="description" $timestamp="no"/>'> +Delete +</$button> +and watch the "description" field disappear without the "modified" and "created" fields getting added"""/> +</$testcase> diff --git a/editions/tw5.com/tiddlers/widgets/ActionDeleteTiddlerWidget.tid b/editions/tw5.com/tiddlers/widgets/ActionDeleteTiddlerWidget.tid index b7691206e..9651ed488 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionDeleteTiddlerWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionDeleteTiddlerWidget.tid @@ -1,6 +1,6 @@ caption: action-deletetiddler created: 20141025120850184 -modified: 20141106173455527 +modified: 20240608152211834 tags: Widgets ActionWidgets title: ActionDeleteTiddlerWidget type: text/vnd.tiddlywiki @@ -25,18 +25,20 @@ The ''action-deletetiddler'' widget is invisible. Any content within it is ignor ! Examples -Here is an example of a button that deletes the tiddler HelloThere: - -<$macrocall $name='wikitext-example-without-html' -src='<$button> -<$action-deletetiddler $tiddler="HelloThere"/> +<$testcase> +<$data title=Description text="Delete a specific tiddler"/> +<$data title=Narrative text="""Use the $tiddler attribute of the $action-deletefield widget to delete the "~HelloThere" tiddler"""/> +<$data $tiddler="HelloThere"/> +<$data title=Output text="""<$button actions="<$action-deletetiddler $tiddler=HelloThere/>"> Delete "~HelloThere" -</$button>'/> +</$button>"""/> +</$testcase> -Here is an example of a button that deletes all tiddlers tagged [[TableOfContents]]: - -<$macrocall $name='wikitext-example-without-html' -src='<$button> -<$action-deletetiddler $filter="[tag[TableOfContents]]"/> +<$testcase> +<$data title=Description text="Delete tiddlers matching a filter"/> +<$data title=Narrative text="""Use the $filter attribute of the $action-deletefield widget to delete all tiddlers tagged "~TableOfContents" """/> +<$data $filter="[tag[TableOfContents]]"/> +<$data title=Output text="""<$button actions='<$action-deletetiddler $filter="[tag[TableOfContents]]"/>'> Delete tiddlers tagged "~TableOfContents" -</$button>'/> +</$button>"""/> +</$testcase> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/TranscludeWidget.tid b/editions/tw5.com/tiddlers/widgets/TranscludeWidget.tid index 6bc81de3c..1a71c0581 100644 --- a/editions/tw5.com/tiddlers/widgets/TranscludeWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/TranscludeWidget.tid @@ -1,21 +1,48 @@ caption: transclude created: 20130824142500000 -modified: 20230511022612458 +modified: 20240621073236430 tags: Widgets title: TranscludeWidget type: text/vnd.tiddlywiki ! Introduction -The <<.wlink TranscludeWidget>> widget dynamically includes the content from another tiddler or variable, rendering it as if the transclude widget were replaced by the target content. +Transclusion is the underlying mechanism for many higher level wikitext features, such as ''procedures'', ''functions'', ''custom widgets'' and ''macros''. -The <<.wlink TranscludeWidget>> widget can be used to render content of any type: wikitext, images, videos, etc. +The <<.wid transclude>> widget dynamically includes the content from another ''tiddler'' or ''variable'', rendering it as if the transclude widget were replaced by the target content. -Transclusion is the underlying mechanism for many higher level wikitext features, such as procedures, custom widgets and macros. +The <<.wid transclude>> widget can be used to render content of any type: wikitext, images, videos, etc. + +! Attributes + +| !Attribute |<| !Description | +| !(modern) | !(legacy) |~| +|$variable |- |Name of the variable to transclude. Eg: Name of <<.dlink procedures Procedures>>, <<.dlink functions Functions>>, <<.dlink "custom widgets" Widgets>> and <<.dlink macros Macros>> | +|$tiddler |tiddler |The title of the tiddler to transclude (defaults to the current tiddler) | +|$field |field |The field name of the current tiddler (defaults to "text"; if present takes precedence over the index attribute) | +|$index |index |The index of a property in a [[DataTiddler|DataTiddlers]] | +|$subtiddler |subtiddler |Optional SubTiddler title when the target tiddler is a [[plugin|Plugins]] (see below) | +|$mode |mode |Override the default parsing mode for the transcluded text to "block" or "inline" | +|$type |– |Optional ContentType used when transcluding variables, indexes or fields other than the ''text'' field| +|$output |- |ContentType for the output rendering (defaults to `text/html`, can also be `text/plain` or `text/raw`) | +|$recursionMarker |recursionMarker |Set to ''no'' to prevent creation of [[Legacy Transclusion Recursion Marker]] (defaults to ''yes'') | +|$fillignore |- |Set to ''yes'' to make this transclusion invisible to the <<.attr $depth>> attribute of the <<.wlink SlotWidget>> widget (defaults to ''no'') | +|//{attributes not starting with $}// |– |Any other attributes that do not start with a dollar are used as parameters to the transclusion | +|//{other attributes starting with $}// |– |Other attributes starting with a single dollar sign are ''reserved'' for future use | +|//{attributes starting with $$}// |– |Attributes starting with two dollar signs are used as parameters to the transclusion, but with the name changed to use a single dollar sign | + +! Legacy vs. Modern Mode + +The <<.wid transclude>> widget can be used in two modes: + +* <<.from-version "5.3.0">> ''Modern mode'' offers the full capabilities of the <<.wid transclude>> widget, and incorporates the functionality of the <<.wlink MacroCallWidget>> widget. It is indicated by the presence of at least one attribute starting with a dollar sign `$` +* ''Legacy mode'' offers a more limited set of capabilities. It is indicated by the absence of any attributes starting with a dollar sign `$` + +Modern mode is recommended for use in new applications. ! Example -Here is a complete example showing the important features of the <<.wlink TranscludeWidget>> widget: +Here is a complete example showing the important features of the <<.wid transclude>> widget: ``` \procedure myproc(name,age) @@ -29,36 +56,9 @@ My name is <<name>> and my age is <<age>>. * The content of the procedure refers to the parameters as variables * The <<.wlink TranscludeWidget>> widget specifies the variable to transclude, and values for the parameters. -! Legacy vs. Modern Mode - -The <<.wlink TranscludeWidget>> widget can be used in two modes: - -* <<.from-version "5.3.0">> ''Modern mode'' offers the full capabilities of the <<.wlink TranscludeWidget>> widget, and incorporates the functionality of the <<.wlink MacroCallWidget>> widget. It is indicated by the presence of at least one attribute starting with a dollar sign `$` -* ''Legacy mode'' offers a more limited set of capabilities. It is indicated by the absence of any attributes starting with a dollar sign `$` - -Modern mode is recommended for use in new applications. - -! Attributes - -| !Attribute |<| !Description | -| !(modern) | !(legacy) |~| -|$variable |- |Name of the variable to transclude | -|$tiddler |tiddler |The title of the tiddler to transclude (defaults to the current tiddler) | -|$field |field |The field name of the current tiddler (defaults to "text"; if present takes precedence over the index attribute) | -|$index |index |The index of a property in a [[DataTiddler|DataTiddlers]] | -|$subtiddler |subtiddler |Optional SubTiddler title when the target tiddler is a [[plugin|Plugins]] (see below) | -|$mode |mode |Override the default parsing mode for the transcluded text to "block" or "inline" | -|$type |– |Optional ContentType used when transcluding variables, indexes or fields other than the ''text'' field| -|$output |- |ContentType for the output rendering (defaults to `text/html`, can also be `text/plain` or `text/raw`) | -|$recursionMarker |recursionMarker |Set to ''no'' to prevent creation of [[Legacy Transclusion Recursion Marker]] (defaults to ''yes'') | -|$fillignore |- |Set to ''yes'' to make this transclusion invisible to the <<.attr $depth>> attribute of the <<.wlink SlotWidget>> widget (defaults to ''no'') | -|//{attributes not starting with $}// |– |Any other attributes that do not start with a dollar are used as parameters to the transclusion | -|//{other attributes starting with $}// |– |Other attributes starting with a single dollar sign are reserved for future use | -|//{attributes starting with $$}// |– |Attributes starting with two dollar signs are used as parameters to the transclusion, but with the name changed to use a single dollar sign | - ! Basic Operation -The basic operation of the <<.wlink TranscludeWidget>> widget is as follows: +The basic operation of the <<.wid transclude>> widget is as follows: |`<$transclude/>` |Transcludes the text field of the current tiddler | |`<$transclude $variable="alpha"/>` |Transcludes the variable "alpha" (note that procedures, custom widgets and macros are all special types of variable) | @@ -69,7 +69,7 @@ The basic operation of the <<.wlink TranscludeWidget>> widget is as follows: ! Transclusion Parameters -Named string parameters can be passed to the <<.wlink TranscludeWidget>> widget. They are made available as variables within the transcluded text. Parameters are only supported in modern mode. +Named string parameters can be passed to the <<.wid transclude>> widget. They are made available as variables within the transcluded text. Parameters are only supported in modern mode. When invoking a transclusion, parameters are specified as additional attributes that do not start with a dollar sign `$`: @@ -108,7 +108,7 @@ Parameters are available here as the variables <<firstParameter>> and <<secondPa ! Transclusion Slots -Transcluded content can define special named locations called slots. At the point of transclusion, blocks of wikitext can be passed to the <<.wlink TranscludeWidget>> widget to fill those slots. +Transcluded content can define special named locations called slots. At the point of transclusion, blocks of wikitext can be passed to the <<.wid transclude>> widget to fill those slots. Slots work very similarly to parameters except that they can contain structured wikitext, and not just plain text. The primary advantage of slots over parameters is that the contents do not need to be wrapped in quotation symbols, making it much simpler to pass complex structures. diff --git a/languages/de-DE/Buttons.multids b/languages/de-DE/Buttons.multids index 54bb2dc09..9749aa8f2 100644 --- a/languages/de-DE/Buttons.multids +++ b/languages/de-DE/Buttons.multids @@ -28,6 +28,7 @@ Encryption/ClearPassword/Caption: Verschlüsselung deaktivieren Encryption/ClearPassword/Hint: Lösche das Passwort und speichere ohne Verschlüsselung Encryption/SetPassword/Caption: Verschlüsselung Encryption/SetPassword/Hint: Definiert ein Passwort, um dieses Wiki zu verschlüsseln +EmergencyDownload/Caption: Speichern aller Tiddler als JSON File ExportPage/Caption: Alle exportieren ExportPage/Hint: Alle Tiddler exportieren ExportTiddler/Caption: Exportieren @@ -192,4 +193,4 @@ ToggleSidebar/Hint: Invertiere die "sidebar" Sichtbarkeit Transcludify/Caption: Transklusion Transcludify/Hint: Transklusion - Den selektierten Text in geschwungene Klammern setzen Underline/Caption: Unterstreichen -Underline/Hint: Ausgewählten Text unterstrichen darstellen +Underline/Hint: Ausgewählten Text unterstrichen darstellen \ No newline at end of file diff --git a/languages/de-DE/ControlPanel.multids b/languages/de-DE/ControlPanel.multids index c713e34d7..bfac26d5b 100644 --- a/languages/de-DE/ControlPanel.multids +++ b/languages/de-DE/ControlPanel.multids @@ -206,6 +206,12 @@ Stylesheets/Caption: Stylesheets Stylesheets/Expand/Caption: Alle erweitern Stylesheets/Hint: Hier wird der "erweiterte" CSS Code dargestellt. Die Reihenfolge, kann in der "Tag-Liste" <<tag "$:/tags/Stylesheet">> mit "Drag & Drop" angepasst werden! Stylesheets/Restore/Caption: Alle zurücksetzen +TestCases/Caption: Test Beispiele +TestCases/Hint: Test Beispiele sind eigenständige Beispiele zum testen und lernen einzelner Funktionen +TestCases/All/Caption: Alle Beispiele +TestCases/All/Hint: Alle Test Beispiele +TestCases/Failed/Caption: Test Nicht Bestehenden +TestCases/Failed/Hint: Nicht bestandene Tests - Übersicht Theme/Caption: Theme Theme/Prompt: Ausgewähltes Theme: TiddlerFields/Caption: Tiddler Felder @@ -228,4 +234,4 @@ Tools/Download/Full/Caption: Herunterladen des ''gesamten Wikis'' ViewTemplateBody/Caption: View Template Text ViewTemplateBody/Hint: Diese Filter-Kaskade wird vom "View Template" dazu verwendet, um die Vorlage für den Tiddler Textbereich auszuwählen. ViewTemplateTitle/Caption: View Template Titel -ViewTemplateTitle/Hint: Diese Filter-Kaskade wird vom "View Template" dazu verwendet, um die Vorlage für den Tiddler Titel auszuwählen. +ViewTemplateTitle/Hint: Diese Filter-Kaskade wird vom "View Template" dazu verwendet, um die Vorlage für den Tiddler Titel auszuwählen. \ No newline at end of file diff --git a/languages/de-DE/Dates.multids b/languages/de-DE/Dates.multids index ff028f0f6..d6526e752 100644 --- a/languages/de-DE/Dates.multids +++ b/languages/de-DE/Dates.multids @@ -84,4 +84,4 @@ RelativeDate/Past/Minutes: vor <<period>> Minuten RelativeDate/Past/Months: vor <<period>> Monaten RelativeDate/Past/Second: vor einer Sekunde RelativeDate/Past/Seconds: vor <<period>> Sekunden -RelativeDate/Past/Years: vor <<period>> Jahren +RelativeDate/Past/Years: vor <<period>> Jahren \ No newline at end of file diff --git a/languages/de-DE/Docs/ModuleTypes.multids b/languages/de-DE/Docs/ModuleTypes.multids index 5b7738d84..730c58777 100644 --- a/languages/de-DE/Docs/ModuleTypes.multids +++ b/languages/de-DE/Docs/ModuleTypes.multids @@ -9,7 +9,7 @@ config: Daten, die in `$tw.config` eingefügt werden. filteroperator: Individuelle Funktionen für den Filter-Operator. global: Globale Daten, die in `$tw` eingefügt werden. info: Veröffentlicht System-Informationen mit dem Pseudo-plugin: [[$:/temp/info-plugin]] -isfilteroperator: Operanden für den Filter-Operator: ''is'' +isfilteroperator: Parameter für den Filter-Operator: ''is'' library: Allgemeiner Modultyp, für JavaScript Module. macro: Globale Makro-Definitionen in JavaScript. parser: Parser für verschiedene Tiddler Typen. @@ -27,4 +27,4 @@ utils-browser: Browser-spezifische Methoden werden zu `$tw.utils` hinzugefügt. utils-node: Erweitert `$tw.utils` mit Methoden aus node.js. widget: Widgets verarbeiten das Rendern und Aktualisieren der Anzeige in der DOM. wikimethod: Methoden werden zu `$tw.Wiki` hinzugefügt. -wikirule: Enthält die individuellen Parser Regeln für den WikiText-Parser. +wikirule: Enthält die individuellen Parser Regeln für den WikiText-Parser. \ No newline at end of file diff --git a/languages/de-DE/Docs/PaletteColours.multids b/languages/de-DE/Docs/PaletteColours.multids index 036f002ad..5710b2b29 100644 --- a/languages/de-DE/Docs/PaletteColours.multids +++ b/languages/de-DE/Docs/PaletteColours.multids @@ -67,6 +67,9 @@ sidebar-tiddler-link-foreground-hover: Seitenleiste Tiddler Link Vordergrund (ho sidebar-tiddler-link-foreground: Seitenleiste Tiddler Link Vordergrund site-title-foreground: Wiki Titel Vordergrund static-alert-foreground: Statische Warnung Vordergrund +testcase-accent-level-1: Test Beispiel Akzent Farbe nicht "verschachtelt" - Ebene 1 +testcase-accent-level-2: Test Beispiel Akzent Farbe with Ebene 2 +testcase-accent-level-3: Test Beispiel Akzent Farbe with Ebene 3 tab-background-selected: Reiter Hintergrund für selektierte Reiter tab-background: Reiter Hintergrund tab-border-selected: Reiter Rahmen für selektierte Reiter @@ -106,4 +109,4 @@ toolbar-delete-button: Werkzeugleiste 'Löschen' Button Vordergrund toolbar-cancel-button: Werkzeugleiste 'Abbruch' Button Vordergrund toolbar-done-button: Werkzeugleiste 'Fertig' Button Vordergrund untagged-background: (untagged) Pille Hintergrund -very-muted-foreground: Stark abgedunkelter Vordergrund +very-muted-foreground: Stark abgedunkelter Vordergrund \ No newline at end of file diff --git a/languages/de-DE/EditTemplate.multids b/languages/de-DE/EditTemplate.multids index 4482435e2..f28f120e4 100644 --- a/languages/de-DE/EditTemplate.multids +++ b/languages/de-DE/EditTemplate.multids @@ -35,4 +35,4 @@ Title/References/Prompt: Die folgenden Referenz-Links zu diesem Tiddler werden N Type/Delete/Caption: Lösche Inhalts Typ Type/Delete/Hint: Lösche Inhalts Typ Type/Placeholder: Tiddler Format -Type/Prompt: Typ: +Type/Prompt: Typ: \ No newline at end of file diff --git a/languages/de-DE/Exporters.multids b/languages/de-DE/Exporters.multids index 6663dd17b..73c4e6280 100644 --- a/languages/de-DE/Exporters.multids +++ b/languages/de-DE/Exporters.multids @@ -3,4 +3,4 @@ title: $:/language/Exporters/ StaticRiver: HTML - Statisch JsonFile: JSON - Format CsvFile: CSV - Format -TidFile: TID - Text Format +TidFile: TID - Text Format \ No newline at end of file diff --git a/languages/de-DE/Fields.multids b/languages/de-DE/Fields.multids index d1f773053..79aa97483 100755 --- a/languages/de-DE/Fields.multids +++ b/languages/de-DE/Fields.multids @@ -4,6 +4,7 @@ _canonical_uri: Die komplette URI eines externen Foto Tiddlers. URI = Uniform Re author: Name des Plugin-Authors bag: Der Name eines ~TiddlyWeb "bags" von dem der Tiddler kam. caption: Der Text, der auf "Tab-Buttons" angezeigt wird. +class: Die CSS Klasse, die angewendet wird, wenn ein Tiddler ausgegeben wird. Siehe: [[Custom styles by user-class]]. Wird auch verwended für: [[Modals]] code-body: Das "View Template" wird den Tiddler Text als "Code" anzeigen, wenn dieses Feld auf: ''"yes"'' gesetzt wird. color: Der CSS Farbwert, der mit einem Tiddler assoziiert wird. component: Der Name einer Komponente, die für eine [[Alarm Anzeige|AlertMechanism]] verantwortlich ist. @@ -31,6 +32,7 @@ plugin-priority: Ein numerischer Wert, der die Priorität eines "plugins" festle plugin-type: Der Typ eines "plugins". revision: Die Revisionsnummer eines Tiddlers. Wird von einem Server vergeben. released: Datum der ~TiddlyWiki Ausgabe. +stability: Entwicklungs Status: "deprecated"=abgekündigt, "experimental"=experimentell, "stable"=stabil, "legacy"=Altlast. source: Eine Quelltext URL, verbunden mit diesem Tiddler. subtitle: Der Untertitel für einen "~Wizard-Dialog". tags: Eine Liste von "Tags" für diesen Tiddler. @@ -40,4 +42,4 @@ title: Ein individueller einmaliger Name eines Tiddlers. toc-link: Unterdrückt die Anzeige als Link, wenn der Wert auf ''"no"'' gesetzt wird type: Legt den Typ eines Tiddlers fest (aka MIME-type). version: Versions-Information eines "plugins". -_is_skinny: Wenn es existiert, zeigt diese Feld an, dass das "Text-Feld" dynamisch vom Server geladen wird. +_is_skinny: Wenn es existiert, zeigt diese Feld an, dass das "Text-Feld" dynamisch vom Server geladen wird. \ No newline at end of file diff --git a/languages/de-DE/Help/build.tid b/languages/de-DE/Help/build.tid index acc9428d0..7fe8e4bbb 100644 --- a/languages/de-DE/Help/build.tid +++ b/languages/de-DE/Help/build.tid @@ -1,7 +1,7 @@ title: $:/language/Help/build description: Ausführen, von vorkonfigurierten Befehlen. -Dieser Befehl erstellt die vorkonfigurierten Ziele, der aktuellen Wiki Edition. Sind keine Ziele spezifiziert, dann werden all konfigurierten Ziele erstellt. +Dieser Befehl erstellt eine Zielversion, der aktuellen Wiki Edition. Sind keine Ziele spezifiziert, dann werden all konfigurierten Ziele erstellt. ``` --build <target> [<target> ...] diff --git a/languages/de-DE/Help/clearpassword.tid b/languages/de-DE/Help/clearpassword.tid index a6542b847..8dd656a75 100644 --- a/languages/de-DE/Help/clearpassword.tid +++ b/languages/de-DE/Help/clearpassword.tid @@ -1,7 +1,7 @@ title: $:/language/Help/clearpassword -description: Lösche das Passwort, das für die vorhergehenen Verschlüsselungen verwendet wurde. +description: Lösche das Passwort, das für die vorhergehenden Verschlüsselungen verwendet wurde. -Lösche das Passwort, das für die vorhergehenen Verschlüsselungen verwendet wurde. +Lösche das Passwort, das für die vorhergehenden Verschlüsselungen verwendet wurde. ``` --clearpassword diff --git a/languages/de-DE/Help/commands.tid b/languages/de-DE/Help/commands.tid index 55aefa16e..11cf698ee 100644 --- a/languages/de-DE/Help/commands.tid +++ b/languages/de-DE/Help/commands.tid @@ -1,7 +1,7 @@ title: $:/language/Help/commands -description: Ausführen von Befehlen aus einem Tiddler +description: Ausführen von Befehlen aus einem Filter -Sequentielle Abarbeitung von Befehlen aus einem Tiddler. +Sequentielle Abarbeitung von Befehlen aus einem Filter. ``` --commands <filter> diff --git a/languages/de-DE/Help/editions.tid b/languages/de-DE/Help/editions.tid index 1e997b1e1..83ab3238a 100644 --- a/languages/de-DE/Help/editions.tid +++ b/languages/de-DE/Help/editions.tid @@ -7,4 +7,4 @@ Listet alle verfügbaren TiddlyWiki Editionen auf. --editions ``` -Sie können ein neues Wiki mit dem `--init` Kommando erstellen. Dabei wird eine der angezeigten Editionen "geklont". +Sie können ein neues Wiki mit dem `--init` Befehl erstellen. Dabei wird eine der angezeigten Editionen "geklont". diff --git a/languages/de-DE/Help/fetch.tid b/languages/de-DE/Help/fetch.tid index 8b628965d..2c2517d59 100644 --- a/languages/de-DE/Help/fetch.tid +++ b/languages/de-DE/Help/fetch.tid @@ -1,7 +1,7 @@ title: $:/language/Help/fetch -description: Fetch tiddlers from wiki by URL +description: Laden mehrerer Tiddler über eine URL -Abrufen eines oder mehrerer Dateien über HTTP/HTTPS. Importieren der tiddler, die dem Filter entsprechen. Umwandeln der ankommenden Titel, wenn nötig. +Abrufen eines oder mehrerer Tiddler über HTTP/HTTPS. Importieren der tiddler, die dem Filter entsprechen. Umwandeln der ankommenden Titel, wenn nötig. ``` --fetch file <url> <import-filter> <transform-filter> @@ -10,11 +10,11 @@ Abrufen eines oder mehrerer Dateien über HTTP/HTTPS. Importieren der tiddler, d --fetch raw-files <url-filter> <transform-filter> ``` -Wird der `file` Parameter verwendet, wird nur eine einzelne Datei geholt. Der erste Parameter ist die URL von der die Datei ''importiert'' werden soll. +Wird der `file` oder `raw-file` Parameter verwendet, wird nur eine einzelne Datei geladen. Der erste Parameter ist die URL von der die Datei ''importiert'' werden soll. -Wird der `files` Parameter verwendet, werden mehrere Dateien geholt. In diesem Fall ist der erste Parameter ein Filter, der eine Liste von URLs ergibt, von denen die Dateien gelesen werden sollen. Zum Beispiel: Mehrere Tiddler sind getagged mit: `remote-server` und enthalten ein Feld: `url`. ... Der Filter `[tag[remote-server]get[url]]` wird alle verfügbaren URLs ansprechen. +Wird der `files` Parameter verwendet, werden mehrere Dateien geholt. In diesem Fall ist der erste Parameter ein Filter, der eine Liste von URLs ergibt, von denen die Dateien gelesen werden sollen. Zum Beispiel: Mehrere Tiddler sind getaggt mit: `remote-server` und enthalten ein Feld: `url`. ... Der Filter `[tag[remote-server]get[url]]` wird alle verfügbaren URLs ansprechen. -Werden die `raw-file` oder `raw-files` Varianten verwendet, wird der Klartext der Datei importiert. Es wird nicht versucht die Import-logik anzuwenden. +Werden die `raw-file` oder `raw-files` Varianten verwendet, wird der Klartext der Datei importiert. Es wird nicht versucht die Import-Logik anzuwenden. Der `<import-filter>` Parameter spezifiziert jene Tiddler, die importiert werden sollen. Ohne diesen Parameter wird standardmäßig `[all[tiddlers]]` als Filter verwendet. @@ -22,7 +22,7 @@ Der `<transform-filter>` Parameter, spezifiziert einen Filter, mit dem der Tiddl Wird `--verbose` vor dem `--fetch` Befehl benutzt, dann werden erweiterte Diagnose Infos ausgegeben. -Hinweis: ~TiddlyWiki wird ''keine'' veralteten plugins importieren. +Hinweis: TiddlyWiki wird ''keine'' veraltete Plugins importieren. Das folgende Beispiel wird alle "nicht-system" Tiddler von https://tiddlywiki.com holen und in ein `JSON` file speichern. diff --git a/languages/de-DE/Help/import.tid b/languages/de-DE/Help/import.tid index 395f196f5..79b4fe223 100644 --- a/languages/de-DE/Help/import.tid +++ b/languages/de-DE/Help/import.tid @@ -1,13 +1,13 @@ title: $:/language/Help/import -description: Importiert mehrere Tiddler aus einer Datei +description: Importiert mehrere Tiddler aus einer Datei. Dieser Befehl importiert / extrahiert Tiddler aus folgenden Dateien: -* ~TiddlyWiki `*.html` +* TiddlyWiki `*.html` * `*.tiddler` * `*.tid` * `*.json` -* oder andere lokale `text` Dateien +* oder andere lokale `.text` Dateien Der `<deserializer>` Parameter muss angegeben werden. Anders als beim `--load` Befehl, der diese Information aus der Dateiendung ableiten kann. @@ -27,6 +27,6 @@ TiddlyWiki enthält folgende `deserializer` Standard-Typen: Der Tiddler-Titel entspricht nach dem Import, dem Dateinamen. -Die Zeichenkodierung ist auf `utf8` eingestellt. Sie kann aber auf `base64` für binäre Daten geändert werden. +Die Zeichenkodierung ist auf "utf8" eingestellt. Sie kann aber auf "base64" für binäre Daten geändert werden. -Hinweis: ~TiddlyWiki importiert nur neuere Plugins, als jene, die bereits geladen sind. +Hinweis: TiddlyWiki importiert nur neuere Plugins, als jene, die bereits geladen sind. diff --git a/languages/de-DE/Help/init.tid b/languages/de-DE/Help/init.tid index 5549f2d21..a3bcceba4 100644 --- a/languages/de-DE/Help/init.tid +++ b/languages/de-DE/Help/init.tid @@ -18,7 +18,7 @@ Anmerkung: * Das Wiki Verzeichnis wird angelegt, wenn es nicht existiert. * Der <edition> Parameter ist standardmäßig: ''empty''. * Der --init Befehl bricht ab, wenn das angegebene Verzeichnis nicht leer ist. -* Der --init Befehl löscht alle `includeWikis` Definitionen aus der neuen `tiddlywiki.info` Datei +* Der --init Befehl löscht alle `includeWikis` Definitionen aus der neuen `tiddlywiki.info` Datei. * Wenn mehrere Editionen importiert werden, wird die zuletzt importierte `tidlywiki.info` Datei aktiv sein. Alle anderen weden überschrieben. * `--editions` listet alle verfügbaren Editionen auf. diff --git a/languages/de-DE/Help/listen.tid b/languages/de-DE/Help/listen.tid index 764386359..4f5060ef4 100644 --- a/languages/de-DE/Help/listen.tid +++ b/languages/de-DE/Help/listen.tid @@ -1,20 +1,20 @@ title: $:/language/Help/listen description: Definiert das HTTP-Server Interface für Tiddlywiki -Stellt das Wiki über einen HTTP-Server zur Verfügung. +Stellt das Wiki mit einem HTTP-Server zur Verfügung. -Die "listen" Parameter werden wie folgt verwendet: +Der "listen" Parameter wird wie folgt verwendet: ``` --listen [<name>=<wert>]... ``` -Alle Parameter sind optional, die Reihenfolge ist beliebig und es werden "sichere" standard parametern verwendet. +Alle Parameter sind optional, die Reihenfolge ist beliebig und es werden "sichere" standard Parameter verwendet. Mögliche Parameter: -* ''host'' - Host-Name, von dem übertragen wird. (Standard: "127.0.0.1" aka "localhost") -* ''path-prefix'' - Prefix, der auf alle Pfade angewendet wird +* ''host'' - Host-Name, von dem übertragen wird. (Standard: "127.0.0.1" alias "localhost") +* ''path-prefix'' - Pfad-prefix, der auf alle Pfade angewendet wird * ''port'' - Port Nummer, die überwacht werden soll; Nicht-numerische Werte werden als System Umgebungs-Variable interpretiert. (Standard: 8080) * ''credentials'' - Pfad zur Authentifizierungsdatei im CSV-format. Angabe ist relativ zum Wiki-Verzeichnis * ''anon-username'' - Name, der für anonymer Benutzer verwendet wird, um bearbeitete Tiddler zu markieren @@ -23,12 +23,12 @@ Mögliche Parameter: * ''authenticated-user-header'' - Optionaler HTTP Header-Name für vertrauenswürdige, authentifizierte Benutzer * ''readers'' - Komma-separierte Liste für Benutzer, mit Schreiberlaubnis * ''writers'' - Komma-separierte Liste für Benutzer, mit Leseerlaubnis -* ''csrf-disable'' - "yes" bedeutet, dass CSRF checks deaktiviert sind. (Standard: "no") +* ''csrf-disable'' - "yes" bedeutet, dass CSRF Überprüfungen deaktiviert sind. (Standard: "no") * ''root-tiddler'' - Tiddler, der für den "Root-Pfad" verwendet wird. (Standard: "$:/core/save/all") * ''root-render-type'' - Darstellungs-Type, die für den Root-Tiddler verwendet wird. (Standard: "text/plain") * ''root-serve-type'' - Inhalts-Type, die für den Root-Tiddler verwendet wird. (Standard: "text/html") -* ''tls-cert'' - Pfad zur "TLS certificate" Datei (relativ zum Wiki Verzeichnis) -* ''tls-key'' - Pfad zur "TLS key" Datei (relativ zum Wiki Verzeichnis) +* ''tls-cert'' - Pfad zur "TLS Zertifikat" Datei (relativ zum Wiki Verzeichnis) +* ''tls-key'' - Pfad zur "TLS Schlüssel" Datei (relativ zum Wiki Verzeichnis) * ''debug-level'' - "debug" bewikt eine detailierte Anzeige der HTTP Anfrage-Parameter. (Standard: "none") * ''gzip'' - Wenn auf "yes" gesetzt, dann wird gzip Kompression aktiviert. (Standard: "no") * ''use-browser-cache'' - Ist dieser Parameter auf "yes" gesetzt kann der Browser Inhalte zwischenspeichern um Übertragungsbandbreite zu sparen. (Standard: "no") diff --git a/languages/de-DE/Help/load.tid b/languages/de-DE/Help/load.tid index 079855a32..a4302a504 100644 --- a/languages/de-DE/Help/load.tid +++ b/languages/de-DE/Help/load.tid @@ -3,7 +3,7 @@ description: Lade Tiddler von einer Datei. Lade Tiddler aus einer TiddlyWiki `.html`, `.tiddler`, `.tid`, `.json` oder anderen lokalen Datei. -Die Umsetzung der geladenen Datei wird anhand der Datei-Erweiterung bestimmt. Verwenden sie den alternativen `import` Befehl, wenn sie den Umsetzungstyp ändern möchten. +Die Verarbeitung der geladenen Datei wird anhand der Datei-Erweiterung bestimmt. Verwenden sie den alternativen `import` Befehl, wenn sie die verarbeitungsweise ändern möchten. ``` @@ -11,14 +11,14 @@ Die Umsetzung der geladenen Datei wird anhand der Datei-Erweiterung bestimmt. Ve --load <dirpath> [noerror] ``` -Der "load" Befehl erzeugt eine Fehlermeldung, wenn keine Tiddler gefunden werden. Diese Verhalten kann mit dem Parameter "noerror" unterdrückt werden. +Der "load" Befehl erzeugt eine Fehlermeldung, wenn keine Tiddler gefunden werden. Dieses Verhalten kann mit dem Parameter "noerror" unterdrückt werden. Um Daten aus einer verschlüsselten TiddlyWiki Datei zu laden, muss zuerst mit dem "password" Parameter ein Passwort definiert werden. Beispiel: ``` -tiddlywiki ./MyWiki --password pa55w0rd --load my_encrypted_wiki.html +tiddlywiki ./MyWiki --password hier-sicheres-passwort-verwenden --load my_encrypted_wiki.html ``` Hinweis: TiddlyWiki wird nur neuere Versionen eines bestehenden Plugins laden! diff --git a/languages/de-DE/Help/makelibrary.tid b/languages/de-DE/Help/makelibrary.tid index ee1bd8616..7508d0522 100644 --- a/languages/de-DE/Help/makelibrary.tid +++ b/languages/de-DE/Help/makelibrary.tid @@ -1,7 +1,7 @@ title: $:/language/Help/makelibrary -description: Erstellt die "Upgrade Bibliothek", die vom upgrade Prozess benötigt wird +description: Erstellt die "Upgrade Bibliothek", die vom "upgrade" Prozess benötigt wird -Erstellt den tiddler: `$:/UpgradeLibrary`, der vom upgrade Prozess benötigt wird. +Erstellt den tiddler: `$:/UpgradeLibrary`, der vom "upgrade" Prozess benötigt wird. Die "Upgrade Bibliothek" ist ein "normales" Plugin, vom Typ: `library`. Es enthält eine Kopie jedes Plugins, Themas und Sprachpacketes, das im TiddlyWiki Archiv enthalten ist. diff --git a/languages/de-DE/Help/output.tid b/languages/de-DE/Help/output.tid index 7fd9df10d..0138cd5f0 100644 --- a/languages/de-DE/Help/output.tid +++ b/languages/de-DE/Help/output.tid @@ -1,7 +1,7 @@ title: $:/language/Help/output -description: Setzt das Basis Ausgabeverzeichnis für die folgenden Befehle. +description: Setzt das Basis Ausgabeverzeichnis für alle folgenden Befehle. -Setzt das Basis Ausgabeverzeichnis für die folgenden Befehle. Das Standard Verzeichnis heißt: `output` und ist ein Unterverzeichnis des `edition` Verzeichnisses. +Setzt das Basis Ausgabeverzeichnis für alle folgenden Befehle. Das Standard Verzeichnis heißt: "output" und ist ein Unterverzeichnis des "edition" Verzeichnisses. ``` --output <pathname> diff --git a/languages/de-DE/Help/password.tid b/languages/de-DE/Help/password.tid index 07212963a..7e590ba93 100644 --- a/languages/de-DE/Help/password.tid +++ b/languages/de-DE/Help/password.tid @@ -7,4 +7,4 @@ Setzen eines Passwortes für Verschlüsselungsoperationen --password <password> ``` -Hinweis: Diese Option kann nicht verwendet werden, um ein "Server Passwort" festzulegen! Informationen zum Server Passwort siehe "--server" Kommando. +Hinweis: Diese Option kann nicht verwendet werden, um ein "Server Passwort" festzulegen! Informationen zum Server Passwort siehe [[ServerCommand]]. diff --git a/languages/de-DE/Help/render.tid b/languages/de-DE/Help/render.tid index cc8bdedef..67a4343a1 100644 --- a/languages/de-DE/Help/render.tid +++ b/languages/de-DE/Help/render.tid @@ -1,9 +1,9 @@ title: $:/language/Help/render description: Ausgabe individueller Tiddler in Dateien -Individuelle Tiddler werden anhand von Filtern spezifiziert, gelesen und in Dateien umgesetzt. +Individuelle Tiddler werden anhand von Filtern spezifiziert, gelesen und in Dateien umgewandelt. -Optionell kann eine Template-Datei angegeben werden. In diesem Fall wird nicht der Inhalt des Tiddlers, sondern des Templates umgesetzt. Die `currentTiddler` Variable wird auf den Titel, des auszugebenden, Tiddlers gesetzt. +Optionell kann eine Template-Datei angegeben werden. In diesem Fall wird nicht der Inhalt des Tiddlers, sondern des Templates übersetzt. Die `currentTiddler` Variable wird auf den Titel, des auszugebenden, Tiddlers gesetzt. Es können noch zusätzliche Variablen per Name und Wert gesetzt werden. @@ -11,9 +11,9 @@ Es können noch zusätzliche Variablen per Name und Wert gesetzt werden. --render <tiddler-filter> [<filename-filter>] [<render-type>] [<template>] [ [<name>] [<value>] ]* ``` -* ''tiddler-filter'': Ein Filter, der die Auszugebenden Tiddler eindeutig spezifiziert. -* ''filename-filter'': [Option] Filter, der aus Tiddler Titeln, Pfadnamen extrahiert. Wenn weggelassen, dann wird der Standard verwendet: `[is[tiddler]addsuffix[.html]]`, welcher den Titel als Dateiname verwendet. -* ''render-type'': [Option] Ausgabe Type: `text/html` (Standard) generiert HTML Text und `text/plain` gibt den "reinen" Text Inhalt zurück. `text/plain` ignoriert HTML Marker und andere "nicht-druckbare" Zeichen. +* ''tiddler-filter'': Ein Filter, der die Auszugebenden Tiddler eindeutig spezifiziert. +* ''filename-filter'': [Option] Filter, der aus Tiddler Titeln, Pfadnamen generiert. Wenn weggelassen, dann wird der Standard verwendet: `[is[tiddler]addsuffix[.html]]`, welcher den Titel als Dateiname verwendet. +* ''render-type'': [Option] Ausgabe Typ: `text/html` (Standard) generiert HTML Text und `text/plain` gibt den "reinen" Text Inhalt zurück. `text/plain` ignoriert HTML Marker und andere "nicht-druckbare" Zeichen. * ''template'': [Option] Template, das verwendet werden soll * ''name'': [Option] Name einer zusätzlichen Variablen. * ''value'': [Option] Wert dieser zusätzlichen Variablen. @@ -27,7 +27,7 @@ Wichtig: * Das `output` Verzeichnis wird nicht gelöscht, bevor neue Dateien geschrieben werden. * Verzeichnisse und Dateien werden automatisch angelegt, sollten sie nicht vorhanden sein. * Wenn eine Datei Leerzeichen enthält, dann muss dies ''doppelt'' angezeigt werden. Für TiddlyWiki mit eckigen Klammern `[[]]` und für die Kommandozeile mit Hochkomma "". Zum Beispiel: `--render "[[Motovun Jack.jpg]]"` -* Dateinamens-Filter zeigen immer auf den Titel, des gerade umzusetzenden Tiddlers. Das erlaubt uns, diesen als Basis für den Dateinamen zu verwenden. zB: `[encodeuricomponent[]addprefix[static/]]` ... Verwendet eine URI-Enkodierung für jeden Dateinamen und stellt das Wort `static/` als Pfadname voran. +* Dateinamens-Filter zeigen immer auf den Titel, des gerade bearbeiteten Tiddlers. Das erlaubt uns, diesen als Basis für den Dateinamen zu verwenden. zB: `[encodeuricomponent[]addprefix[static/]]` ... Verwendet eine URI-Enkodierung für jeden Dateinamen und stellt das Wort `static/` als Pfadname voran. * Es können mehrere ''name/value'' Paare verwendet werden. * Der `--render` Befehl ist flexibler und ersetzt daher `--rendertiddler` und `--rendertiddlers`, welche mit V5.1.15 auslaufen! diff --git a/languages/de-DE/Help/save.tid b/languages/de-DE/Help/save.tid index 3d0f15027..121b6978a 100644 --- a/languages/de-DE/Help/save.tid +++ b/languages/de-DE/Help/save.tid @@ -1,14 +1,13 @@ title: $:/language/Help/save description: Speichert Klartext Tiddler als Dateien -Speichert einzelne oder mehrere Klartext Tiddler als Text oder im Binärformat in Dateien. Die zu speichernden Tiddler werden über Filter spezifiziert. - +Speichert einzelne oder mehrere Klartext Tiddler als Text oder im Binärformat in Dateien. Die zu speichernden Tiddler werden über Filter spezifiziert. ``` --save <tiddler-filter> <filename-filter> ``` -* ''tiddler-filter'': Ein Filter, der die zu speichernden Tiddler anzeigt. +* ''tiddler-filter'': Ein Filter, der die zu speichernden Tiddler anzeigt. * ''filename-filter'': [Option] Ein Filter, der die Tiddler Titel in Verzeichnis Namen aufspaltet. Wenn nicht spezifiziert, dann wird: `[is[tiddler]]` verwendet. `[is[tiddler]]` übernimmt den Tiddler Titel unverändert. Standardmäßig sind die Dateinamen "relativ" zum `output` Verzeichnis, des `edition` Verzeichnisses. @@ -20,7 +19,7 @@ Hinweise: * Das `output` Verzeichnis wird nicht gelöscht, bevor neue Dateien geschrieben werden. * Verzeichnisse und Dateien werden automatisch angelegt, sollten sie nicht vorhanden sein. * Wenn eine Datei Leerzeichen enthält, dann muss dies ''doppelt'' angezeigt werden. Für TiddlyWiki mit eckigen Klammern `[[]]` und für die Kommandozeile mit Hochkomma "". Zum Beispiel: `--render "[[Motovun Jack.jpg]]"` -* Dateinamens-Filter zeigen immer auf den Titel, des gerade umzusetzenden Tiddlers. Das erlaubt uns, diesen als Basis für den Dateinamen zu verwenden. zB: `[encodeuricomponent[]addprefix[static/]]` ... Verwendet eine URI-Enkodierung für jeden Dateinamen und stellt das Wort `static/` als Pfadname voran. +* Dateinamens-Filter zeigen immer auf den Titel, des gerade umzusetzenden Tiddlers. Das erlaubt uns, diesen als Basis für den Dateinamen zu verwenden. zB: `[encodeuricomponent[]addprefix[static/]]` ... Verwendet eine URI-Enkodierung für jeden Dateinamen und stellt das Wort `static/` als Pfadname voran. * Der `--save` Befehl ist flexibler und ersetzt daher `--savetiddler` und `--savetiddlers`, welche mit V5.1.15 auslaufen! Beispiel: diff --git a/languages/de-DE/Help/server.tid b/languages/de-DE/Help/server.tid index 2bfbbdb47..00991f1a3 100644 --- a/languages/de-DE/Help/server.tid +++ b/languages/de-DE/Help/server.tid @@ -1,6 +1,11 @@ title: $:/language/Help/server description: (Dieser Befehl ist abgekündigt! - Neu ist: "listen") -- Stellt einen HTTP server für TiddlyWiki zur Verfügung. +''WICHTIG:'' + +* Dieser Befehl ist abgekündigt! +* Wird durch: "listen" ersetzt. + TiddlyWiki bringt einen einfachen Web-Server mit. Der Server kann spezifische Tiddler im angegebenen Format anzeigen (rendern). Zudem können einzelne, oder mehrere Tiddler im JSON Format übertragen werden. Die unterstützten HTTP Funktionen sind: `GET`, `PUT` und `DELETE` diff --git a/languages/de-DE/Help/setfield.tid b/languages/de-DE/Help/setfield.tid index 9ba1632ed..a3d89c3e9 100644 --- a/languages/de-DE/Help/setfield.tid +++ b/languages/de-DE/Help/setfield.tid @@ -3,7 +3,7 @@ description: Experimentell - Setzt ein Tiddler "field" auf einen bestimmten Wert //Wichtig! Dieser Befehl is experimentell und kann während der Betaphase geändert oder ersetzt werden!// -Setzt ein spezifiziertes Feld, für eine Gruppe von Tiddlern. Ein Template wird "wikifiziert" und das Ergebnis in das Feld geschrieben. Die `currentTiddler` Variable wird auf den jeweiligen Tiddler gesetzt. +Setzt ein spezifiziertes Feld, für eine Gruppe von Tiddlern. Ein Template wird "wikifiziert" und das Ergebnis in das Feld geschrieben. Die `currentTiddler` Variable wird auf den jeweiligen Tiddler gesetzt. ``` --setfield <filter> <fieldname> <templatetitle> <rendertype> diff --git a/languages/de-DE/Import.multids b/languages/de-DE/Import.multids index a7895e184..82a1171fe 100644 --- a/languages/de-DE/Import.multids +++ b/languages/de-DE/Import.multids @@ -31,4 +31,4 @@ Upgrader/System/Alert: Sie sind dabei einen Tiddler zu importieren, der einen "C Upgrader/ThemeTweaks/Created: Migrieren der "theme tweaks" von: <$text text=<<from>>/>. Upgrader/Tiddler/Disabled: Deaktivierter Tiddler. Upgrader/Tiddler/Selected: Ausgewählter Tiddler. -Upgrader/Tiddler/Unselected: Auswahl aufgehoben. +Upgrader/Tiddler/Unselected: Auswahl aufgehoben. \ No newline at end of file diff --git a/languages/de-DE/Misc.multids b/languages/de-DE/Misc.multids index 2b2b60c41..4026c7ac0 100644 --- a/languages/de-DE/Misc.multids +++ b/languages/de-DE/Misc.multids @@ -25,13 +25,13 @@ Encryption/RepeatPassword: Passwort wiederholen Encryption/PasswordNoMatch: Passwörter stimmen nicht überein Encryption/SetPassword: Passwort setzen Error/Caption: Fehler -Error/DeserializeOperator/MissingOperand: Filter Fehler: Fehlender Operand für 'deserialize' Operator -Error/DeserializeOperator/UnknownDeserializer: Filter Fehler: Unbekannter "deserializer" als Operand für 'deserialize' Operator verwendet +Error/DeserializeOperator/MissingOperand: Filter Fehler: Fehlender Parameter für 'deserialize' Operator +Error/DeserializeOperator/UnknownDeserializer: Filter Fehler: Unbekannter "deserializer" als Parameter für 'deserialize' Operator verwendet Error/Filter: Filter Fehler Error/FilterSyntax: Syntax Fehler im Filter-Ausdruck Error/FilterRunPrefix: Filter Fehler: Unbekanntes Prefix für Filter lauf -Error/IsFilterOperator: Filter Fehler: Unbekannter Operand für den 'is' Filter Operator -Error/FormatFilterOperator: Filter Fehler: Unbekannter Operand für den 'format' Filter Operator +Error/IsFilterOperator: Filter Fehler: Unbekannter Parameter für den 'is' Filter Operator +Error/FormatFilterOperator: Filter Fehler: Unbekannter Parameter für den 'format' Filter Operator Error/LoadingPluginLibrary: Fehler beim Laden der "plugin library" Error/NetworkErrorAlert: `<h2>''Netzwerk Fehler''</h2>Es scheint, die Verbindung zum Server ist ausgefallen. Das weist auf Probleme mit der Netzwerkverbindung hin. Bitte versuchen Sie die Verbingung wider herzustellen, bevor Sie weitermachen.<br><br>''Nicht gespeicherte Änderungen werden automatich synchronisiert, sobald die Verbindung wider hergestellt ist. Error/PutEditConflict: Datei am Server verändert @@ -70,7 +70,7 @@ No: Nein OfficialPluginLibrary: Offizielles ~TiddlyWiki Plugin-Verzeichnis OfficialPluginLibrary/Hint: Offizielles ~TiddlyWiki Plugin-Verzeichnis auf tiddlywiki.com. Plugin, Themes und Sprach Dateien werden vom "core team" gewartet. PageTemplate/Description: das Standard ~TiddlyWiki Layout -PageTemplate/Name: Standard ~PageTemplate +PageTemplate/Name: Standard Layout PluginReloadWarning: Das Wiki muss gespeichert {{$:/core/ui/Buttons/save-wiki}} und neu gladen {{$:/core/ui/Buttons/refresh}} werden, damit die ~JavaScript Plugins ausgeführt werden. RecentChanges/DateFormat: YYYY MMM DD Shortcuts/Input/AdvancedSearch/Hint: Öffne den ~AdvancedSearch Tiddler vom "Suchmenü" aus @@ -96,4 +96,4 @@ TagManager/Info/Heading: Info TagManager/Tag/Heading: Tag Tiddler/DateFormat: DDth MMM YYYY um 0hh:0mm UnsavedChangesWarning: ~TiddlyWiki wurde geändert, aber noch nicht gespeichert! -Yes: Ja +Yes: Ja \ No newline at end of file diff --git a/languages/de-DE/Modals/Download.tid b/languages/de-DE/Modals/Download.tid index 57b853af3..a6122b4cf 100644 --- a/languages/de-DE/Modals/Download.tid +++ b/languages/de-DE/Modals/Download.tid @@ -1,5 +1,4 @@ title: $:/language/Modals/Download -type: text/vnd.tiddlywiki subtitle: Änderungen Speichern footer: <$button message="tm-close-tiddler">Schließen</$button> help: https://tiddlywiki.com/static/DownloadingChanges.html diff --git a/languages/de-DE/NewJournal.multids b/languages/de-DE/NewJournal.multids index b82834420..e52db9711 100644 --- a/languages/de-DE/NewJournal.multids +++ b/languages/de-DE/NewJournal.multids @@ -1,4 +1,4 @@ title: $:/config/NewJournal/ Title: YYYY MMM 0DD -Text: +Text: \ No newline at end of file diff --git a/languages/de-DE/Notifications.multids b/languages/de-DE/Notifications.multids index d4d995a3d..0b0de20b4 100644 --- a/languages/de-DE/Notifications.multids +++ b/languages/de-DE/Notifications.multids @@ -3,4 +3,4 @@ title: $:/language/Notifications/ Save/Done: Wiki gespeichert! Save/Starting: Wiki zum Speichern vorbereiten! CopiedToClipboard/Succeeded: Kopiert! -CopiedToClipboard/Failed: Fehler, beim kopieren in die Zwischenablage! +CopiedToClipboard/Failed: Fehler, beim kopieren in die Zwischenablage! \ No newline at end of file diff --git a/languages/de-DE/Search.multids b/languages/de-DE/Search.multids index a689f449c..a711d3a35 100644 --- a/languages/de-DE/Search.multids +++ b/languages/de-DE/Search.multids @@ -17,4 +17,4 @@ Standard/Hint: Suche in Standard-Tiddlern. Standard/Matches: //<small><<resultCount>> matches</small>// System/Caption: System System/Hint: Suche in System-Tiddlern. -System/Matches: //<small><<resultCount>> Treffer</small>// +System/Matches: //<small><<resultCount>> Treffer</small>// \ No newline at end of file diff --git a/languages/de-DE/SideBar.multids b/languages/de-DE/SideBar.multids index a32faaf22..82fb54238 100644 --- a/languages/de-DE/SideBar.multids +++ b/languages/de-DE/SideBar.multids @@ -15,4 +15,4 @@ System/Caption: System Tags/Caption: Tags Tags/Untagged/Caption: untagged Tools/Caption: Tools -Types/Caption: Typen +Types/Caption: Typen \ No newline at end of file diff --git a/languages/de-DE/SiteSubtitle.tid b/languages/de-DE/SiteSubtitle.tid index 12b838045..72e79a166 100644 --- a/languages/de-DE/SiteSubtitle.tid +++ b/languages/de-DE/SiteSubtitle.tid @@ -1,3 +1,3 @@ title: $:/SiteSubtitle -ein persönliches nicht-lineares Web-Notizbuch +ein persönliches nicht-lineares Web-Notizbuch \ No newline at end of file diff --git a/languages/de-DE/ThemeTweaks.multids b/languages/de-DE/ThemeTweaks.multids index e4341e2d7..8944c7a1e 100644 --- a/languages/de-DE/ThemeTweaks.multids +++ b/languages/de-DE/ThemeTweaks.multids @@ -39,4 +39,4 @@ Metrics/TiddlerWidth/Hint: im "story river" Metrics/SidebarBreakpoint: Seitenleiste "breakpoint" Metrics/SidebarBreakpoint/Hint: Minimum Fensterbreite, bei der die Seitenleiste an den Anfang der Seite verschoben wird. Metrics/SidebarWidth: Seitenleiste Breite -Metrics/SidebarWidth/Hint: Die Breite der Leiste bei variabler/fixer Darstellung +Metrics/SidebarWidth/Hint: Die Breite der Leiste bei variabler/fixer Darstellung \ No newline at end of file diff --git a/languages/de-DE/TiddlerInfo.multids b/languages/de-DE/TiddlerInfo.multids index b425d6459..b28229f9e 100755 --- a/languages/de-DE/TiddlerInfo.multids +++ b/languages/de-DE/TiddlerInfo.multids @@ -18,4 +18,4 @@ References/Caption: Rückverweise References/Empty: Kein Tiddler linkt zu diesem Tiddler. Tagging/Caption: Tagging Tagging/Empty: Kein Tiddler ist mit diesem Tiddler "getaggt". -Tools/Caption: Tools +Tools/Caption: Tools \ No newline at end of file diff --git a/languages/zh-Hans/Docs/PaletteColours.multids b/languages/zh-Hans/Docs/PaletteColours.multids index 51ec7a3b5..a45797815 100644 --- a/languages/zh-Hans/Docs/PaletteColours.multids +++ b/languages/zh-Hans/Docs/PaletteColours.multids @@ -65,6 +65,10 @@ sidebar-tab-foreground-selected: 侧边栏选定页签前景 sidebar-tab-foreground: 侧边栏页签前景 sidebar-tiddler-link-foreground-hover: 侧边栏悬停条目链结前景 sidebar-tiddler-link-foreground: 侧边栏条目链结前景 +stability-stable: 稳定性等级 "stable" 的徽章 +stability-experimental: 稳定性等级 "experimental" 的徽章 +stability-deprecated: 稳定性等级 "deprecated" 的徽章 +stability-legacy: 稳定性等级 "legacy" 的徽章 testcase-accent-level-1: 无嵌套的测试案例强调色 testcase-accent-level-2: 第二级嵌套的测试案例强调色 testcase-accent-level-3: 第三级或更高级别嵌套的测试案例强调色 diff --git a/languages/zh-Hant/Docs/PaletteColours.multids b/languages/zh-Hant/Docs/PaletteColours.multids index a09aa3115..21e88952d 100644 --- a/languages/zh-Hant/Docs/PaletteColours.multids +++ b/languages/zh-Hant/Docs/PaletteColours.multids @@ -65,6 +65,10 @@ sidebar-tab-foreground-selected: 側邊欄選定頁籤前景 sidebar-tab-foreground: 側邊欄頁籤前景 sidebar-tiddler-link-foreground-hover: 側邊欄懸停條目鏈結前景 sidebar-tiddler-link-foreground: 側邊欄條目鏈結前景 +stability-stable: 穩定性等級 "stable" 的徽章 +stability-experimental: 穩定性等級 "experimental" 的徽章 +stability-deprecated: 穩定性等級 "deprecated" 的徽章 +stability-legacy: 穩定性等級 "legacy" 的徽章 testcase-accent-level-1: 無嵌套的測試案例強調色 testcase-accent-level-2: 第二級嵌套的測試案例強調色 testcase-accent-level-3: 第三級或更高級別嵌套的測試案例強調色 diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md index 48d5ed04d..78610047c 100644 --- a/licenses/cla-individual.md +++ b/licenses/cla-individual.md @@ -571,3 +571,5 @@ Anders Jarmund, @andjar, 2024/04/05 @sarna, 2024/04/28 Fokzo Kat, @CyberFoxar, 2024/05/20 + +Andrei Rybak, @rybak, 2024/06/09 diff --git a/plugins/tiddlywiki/confetti/confetti-manager.js b/plugins/tiddlywiki/confetti/confetti-manager.js index 98384bf32..0ddd6139f 100644 --- a/plugins/tiddlywiki/confetti/confetti-manager.js +++ b/plugins/tiddlywiki/confetti/confetti-manager.js @@ -33,7 +33,7 @@ ConfettiManager.prototype.launch = function (delay,options) { self.outstandingTimers.splice(p,1); } else { console.log("Confetti Manager Error: Cannot find previously stored timer ID"); - debugger; + // debugger; } confetti(options); },delay); diff --git a/plugins/tiddlywiki/confetti/examples/staggered.tid b/plugins/tiddlywiki/confetti/examples/staggered.tid index 8b45ceef4..f9351c9e0 100644 --- a/plugins/tiddlywiki/confetti/examples/staggered.tid +++ b/plugins/tiddlywiki/confetti/examples/staggered.tid @@ -3,7 +3,8 @@ tags: $:/tags/ConfettiExample <$button> <$action-sendmessage $message="tm-confetti-launch"/> -<$action-sendmessage $message="tm-confetti-launch" originY=0.6 spread=70 delay=300/> -<$action-sendmessage $message="tm-confetti-launch" originY=0.55 spread=30 delay=600/> -Launch three staggered rounds of confetti +<$action-sendmessage $message="tm-confetti-launch" delay=300 originY=0.6 spread=100 scalar=1.5/> +<$action-sendmessage $message="tm-confetti-launch" delay=400 originY=0.55 spread=130/> +<$action-sendmessage $message="tm-confetti-launch" delay=500 originY=0.55 spread=170 scalar=2/> +Launch four staggered rounds of confetti </$button> diff --git a/plugins/tiddlywiki/confetti/examples/typing-trigger.tid b/plugins/tiddlywiki/confetti/examples/typing-trigger.tid index d4362bb63..5765fdf94 100644 --- a/plugins/tiddlywiki/confetti/examples/typing-trigger.tid +++ b/plugins/tiddlywiki/confetti/examples/typing-trigger.tid @@ -6,5 +6,5 @@ Type the word "launch": <$edit-text tiddler="$:/temp/confetti/launchstatus" tag= <$list filter="[{$:/temp/confetti/launchstatus}match:caseinsensitive[launch]]" variable="ignore"> Launched! <$confetti particleCount=100/> -<$confetti particleCount=100 delay=300/> +<$confetti particleCount=100 spread=170 delay=300/> </$list> diff --git a/plugins/tiddlywiki/dynannotate/modules/element-spotlight.js b/plugins/tiddlywiki/dynannotate/modules/element-spotlight.js index cbf4e4679..7b581e28d 100644 --- a/plugins/tiddlywiki/dynannotate/modules/element-spotlight.js +++ b/plugins/tiddlywiki/dynannotate/modules/element-spotlight.js @@ -66,7 +66,7 @@ ElementSpotlight.prototype.querySelectorSafe = function(selector) { ElementSpotlight.prototype.positionSpotlight = function(x,y,innerRadius,outerRadius,opacity) { this.spotlightElement.style.display = "block"; - this.spotlightElement.style.backgroundImage = "radial-gradient(circle at " + (x / window.innerWidth * 100) + "% " + (y / window.innerHeight * 100) + "%, transparent " + innerRadius + "px, rgba(0, 0, 0, " + opacity + ") " + outerRadius + "px)"; + this.spotlightElement.style.backgroundImage = "radial-gradient(circle at " + (x / document.documentElement.clientWidth * 100) + "% " + (y / document.documentElement.clientHeight * 100) + "%, transparent " + innerRadius + "px, rgba(0, 0, 0, " + opacity + ") " + outerRadius + "px)"; }; ElementSpotlight.prototype.easeInOut = function(v) { diff --git a/plugins/tiddlywiki/geospatial/docs/geomap.tid b/plugins/tiddlywiki/geospatial/docs/geomap.tid index 20c0d426e..44bc67c88 100644 --- a/plugins/tiddlywiki/geospatial/docs/geomap.tid +++ b/plugins/tiddlywiki/geospatial/docs/geomap.tid @@ -10,7 +10,7 @@ The following attributes are supported: |!Attribute |!Description | |''state'' |The title of a state tiddler used to track the state of the map in the `zoom`, `long` and `lat` fields | -|''startPosition'' |Optional starting position for the map: "world" (the default) shows the entire map, "bounds" zooms to the bounds of the loaded layes | +|''startPosition'' |Optional keyword representing the starting position for the map: "world" (the default) shows the entire map, "bounds" zooms to the bounds of the loaded layers | |''layersPanel'' |Optional starting status for the layers panel: "collapsed" (the default) causes the layers panel to initially be shown collapsed, "open" causes the layers panel to initially be shown opened | If no base layers are defined by `<$geobaselayer>` widgets within the `<$geomap>` widget then all the available base layers will be loaded by the equivalent of the following code: diff --git a/plugins/tiddlywiki/geospatial/widgets/geomap.js b/plugins/tiddlywiki/geospatial/widgets/geomap.js index 15e027a4a..d316ddd8d 100644 --- a/plugins/tiddlywiki/geospatial/widgets/geomap.js +++ b/plugins/tiddlywiki/geospatial/widgets/geomap.js @@ -54,7 +54,7 @@ GeomapWidget.prototype.render = function(parent,nextSibling) { parent.insertBefore(this.domNode,nextSibling); this.domNodes.push(this.domNode); // Render the map - if($tw.browser) { + if($tw.browser && !this.domNode.isTiddlyWikiFakeDom) { this.renderMap(); this.refreshMap(); } diff --git a/plugins/tiddlywiki/menubar/config.tid b/plugins/tiddlywiki/menubar/config.tid index 056575fbd..abcb8fcea 100644 --- a/plugins/tiddlywiki/menubar/config.tid +++ b/plugins/tiddlywiki/menubar/config.tid @@ -3,13 +3,12 @@ tags: $:/tags/ControlPanel/Toolbars caption: Menu Bar \define config-base() $:/config/plugins/menubar/MenuItems/Visibility/ -\define lingo-base() $:/plugins/tiddlywiki/menubar/language/ -! <<lingo Config/Heading1>> +! Menu Bar Configuration -!! <<lingo Config/MenuItems/Heading>> +!! Menu Items -<<lingo Config/MenuItems/Description>> +Select which menu items will be shown. You can also drag items to reorder them. <$set name="tv-config-toolbar-icons" value="yes"> @@ -21,18 +20,18 @@ caption: Menu Bar </$set> -!! <<lingo Config/BreakpointPosition/Heading>> +!! Breakpoint Position -<<lingo Config/BreakpointPosition/Description>> +The breakpoint position between narrow and wide screens. Should include CSS units (eg. `400px`). <$edit-text tiddler="$:/config/plugins/menubar/breakpoint" default="" tag="input"/> -!! <<lingo Config/ContentsTag/Heading>> +!! Contents Tag -<<lingo Config/ContentsTag/Description>> +The tag for the ~TableOfContents used in the Contents dropdown <$edit-text tiddler="$:/config/plugins/menubar/TableOfContents/Tag" default="" tag="input"/> -!! <<lingo Config/MenuBarColours/Heading>> +!! Menu Bar Colours -<<lingo Config/MenuBarColours/Description>> +To change the colour of the menu bar, define the colours `menubar-foreground` and `menubar-background` in the currently selected palette diff --git a/plugins/tiddlywiki/menubar/items/contents.tid b/plugins/tiddlywiki/menubar/items/contents.tid index 56bd134b7..f4fbdb2c2 100644 --- a/plugins/tiddlywiki/menubar/items/contents.tid +++ b/plugins/tiddlywiki/menubar/items/contents.tid @@ -1,6 +1,6 @@ title: $:/plugins/tiddlywiki/menubar/items/contents -caption: <<lingo Items/TOC/Name $:/plugins/tiddlywiki/menubar/language/>> -description: <<lingo Items/TOC/Description $:/plugins/tiddlywiki/menubar/language/>> +caption: Contents +description: Table of Contents is-dropdown: yes tags: $:/tags/MenuBar diff --git a/plugins/tiddlywiki/menubar/items/hamburger.tid b/plugins/tiddlywiki/menubar/items/hamburger.tid index 363b5e5d0..cbacb5a26 100644 --- a/plugins/tiddlywiki/menubar/items/hamburger.tid +++ b/plugins/tiddlywiki/menubar/items/hamburger.tid @@ -1,7 +1,7 @@ title: $:/plugins/tiddlywiki/menubar/items/hamburger tags: $:/tags/MenuBar -caption: <<lingo Items/Hamburger/Name $:/plugins/tiddlywiki/menubar/language/>> -description: <<lingo Items/Hamburger/Description $:/plugins/tiddlywiki/menubar/language/>> +caption: Hamburger +description: Show the full menu bar on a narrow screen custom-menu-content: {{$:/plugins/tiddlywiki/menubar/items/hamburger}} show-when: narrow diff --git a/plugins/tiddlywiki/menubar/items/pagecontrols.tid b/plugins/tiddlywiki/menubar/items/pagecontrols.tid index ea91141b3..af4026664 100644 --- a/plugins/tiddlywiki/menubar/items/pagecontrols.tid +++ b/plugins/tiddlywiki/menubar/items/pagecontrols.tid @@ -1,7 +1,7 @@ title: $:/plugins/tiddlywiki/menubar/items/pagecontrols tags: $:/tags/MenuBar -description: <<lingo Items/PageControls/Name $:/plugins/tiddlywiki/menubar/language/>> -caption: <<lingo Items/PageControls/Name $:/plugins/tiddlywiki/menubar/language/>> +description: Page controls from the sidebar +caption: Page controls custom-menu-content: <$transclude tiddler="$:/plugins/tiddlywiki/menubar/items/pagecontrols" mode="inline"/> \whitespace trim diff --git a/plugins/tiddlywiki/menubar/items/search.tid b/plugins/tiddlywiki/menubar/items/search.tid index 280330214..e40f27ab5 100644 --- a/plugins/tiddlywiki/menubar/items/search.tid +++ b/plugins/tiddlywiki/menubar/items/search.tid @@ -1,7 +1,7 @@ title: $:/plugins/tiddlywiki/menubar/items/search custom-menu-content: {{$:/plugins/tiddlywiki/menubar/items/search}} -description: <<lingo Items/Search/Name $:/plugins/tiddlywiki/menubar/language/>> -caption: <<lingo Items/Search/Name $:/plugins/tiddlywiki/menubar/language/>> +description: Search +caption: Search tags: $:/tags/MenuBar \define cancel-search-actions() diff --git a/plugins/tiddlywiki/menubar/items/server.tid b/plugins/tiddlywiki/menubar/items/server.tid index a2cf2c457..0f0e438ad 100644 --- a/plugins/tiddlywiki/menubar/items/server.tid +++ b/plugins/tiddlywiki/menubar/items/server.tid @@ -1,7 +1,7 @@ title: $:/plugins/tiddlywiki/menubar/items/server tags: $:/tags/MenuBar -description: <<lingo Items/Server/Description $:/plugins/tiddlywiki/menubar/language/>> -caption: <<lingo Items/Server/Name $:/plugins/tiddlywiki/menubar/language/>> +description: Server options +caption: Server custom-menu-content: <$transclude tiddler="$:/plugins/tiddlywiki/menubar/items/server" mode="inline"/> <$list filter="[[$:/status/IsLoggedIn]get[text]else[no]match[yes]]" variable="ignore"> diff --git a/plugins/tiddlywiki/menubar/items/sidebar.tid b/plugins/tiddlywiki/menubar/items/sidebar.tid index c5e81c79e..616195a6a 100644 --- a/plugins/tiddlywiki/menubar/items/sidebar.tid +++ b/plugins/tiddlywiki/menubar/items/sidebar.tid @@ -1,6 +1,6 @@ title: $:/plugins/tiddlywiki/menubar/items/sidebar -caption: <<lingo Items/Sidebar/Name $:/plugins/tiddlywiki/menubar/language/>> -description: <<lingo Items/Sidebar/Name $:/plugins/tiddlywiki/menubar/language/>> +caption: Sidebar +description: Sidebar is-dropdown: yes tags: $:/tags/MenuBar diff --git a/plugins/tiddlywiki/menubar/items/topleftbar.tid b/plugins/tiddlywiki/menubar/items/topleftbar.tid index d25c19f08..2743848a6 100644 --- a/plugins/tiddlywiki/menubar/items/topleftbar.tid +++ b/plugins/tiddlywiki/menubar/items/topleftbar.tid @@ -1,7 +1,7 @@ title: $:/plugins/tiddlywiki/menubar/items/topleftbar tags: $:/tags/MenuBar -description: <<lingo Items/TopLeftBar/Description $:/plugins/tiddlywiki/menubar/language/>> -caption: <<lingo Items/TopLeftBar/Name $:/plugins/tiddlywiki/menubar/language/>> +description: Items from $:/tags/TopLeftBar +caption: Legacy Top Left Bar custom-menu-content: <$transclude tiddler="$:/plugins/tiddlywiki/menubar/items/topleftbar" mode="inline"/> <$list filter="[all[shadows+tiddlers]tag[$:/tags/TopLeftBar]!has[draft.of]]" variable="listItem" storyview="pop"> diff --git a/plugins/tiddlywiki/menubar/items/toprightbar.tid b/plugins/tiddlywiki/menubar/items/toprightbar.tid index e6bb842e4..ae59e759b 100644 --- a/plugins/tiddlywiki/menubar/items/toprightbar.tid +++ b/plugins/tiddlywiki/menubar/items/toprightbar.tid @@ -1,7 +1,7 @@ title: $:/plugins/tiddlywiki/menubar/items/toprightbar tags: $:/tags/MenuBar -description: <<lingo Items/TopRightBar/Description $:/plugins/tiddlywiki/menubar/language/>> -caption: <<lingo Items/TopRightBar/Name $:/plugins/tiddlywiki/menubar/language/>> +description: Items from $:/tags/TopRightBar +caption: Legacy Top Right Bar custom-menu-content: <$transclude tiddler="$:/plugins/tiddlywiki/menubar/items/toprightbar" mode="inline"/> custom-menu-styles-wide: float: right; diff --git a/plugins/tiddlywiki/menubar/language/en-GB/Translations.multids b/plugins/tiddlywiki/menubar/language/en-GB/Translations.multids deleted file mode 100644 index 443acbbd5..000000000 --- a/plugins/tiddlywiki/menubar/language/en-GB/Translations.multids +++ /dev/null @@ -1,25 +0,0 @@ -title: $:/plugins/tiddlywiki/menubar/language/en-GB/ - -Config/Heading1: Menu Bar Configuration -Config/MenuItems/Heading: Menu Items -Config/MenuItems/Description: Select which menu items will be shown. You can also drag items to reorder them. -Config/BreakpointPosition/Heading: Breakpoint Position -Config/BreakpointPosition/Description: The breakpoint position between narrow and wide screens. Should include CSS units (eg. `400px`). -Config/ContentsTag/Heading: Contents Tag -Config/ContentsTag/Description: The tag for the ~TableOfContents used in the Contents dropdown -Config/MenuBarColours/Heading: Menu Bar Colours -Config/MenuBarColours/Description: To change the colour of the menu bar, define the colours `menubar-foreground` and `menubar-background` in the currently selected palette -Items/TOC/Name: Contents -Items/TOC/Description: Table of Contents -Items/Hamburger/Name: Hamburger -Items/Hamburger/Description: Show the full menu bar on a narrow screen -Items/PageControls/Name: Page controls -Items/PageControls/Description: Page controls from the sidebar -Items/Search/Name: Search -Items/Server/Name: Server -Items/Server/Description: Server options -Items/Sidebar/Name: Sidebar -Items/TopLeftBar/Name: Legacy Top Left Bar -Items/TopLeftBar/Description: Items from $:/tags/TopLeftBar -Items/TopRightBar/Name: Legacy Top Right Bar -Items/TopRightBar/Description: Items from $:/tags/TopRightBar \ No newline at end of file diff --git a/plugins/tiddlywiki/menubar/language/en-GB/readme.tid b/plugins/tiddlywiki/menubar/language/en-GB/readme.tid deleted file mode 100644 index 0cbb781cd..000000000 --- a/plugins/tiddlywiki/menubar/language/en-GB/readme.tid +++ /dev/null @@ -1,30 +0,0 @@ -title: $:/plugins/tiddlywiki/menubar/language/en-GB/readme - -!! Introduction - -This plugin provides a menu bar with the following features: - -* Menu items take the form of simple text links, dropdowns, or entirely custom content -* Menu items can be individually enabled via the control panel -* Responds to reduced screen width by abbreviating the menu items to a "hamburger" dropdown - -!! Menu Item Tiddlers - -Menu items are tagged <<tag $:/tags/MenuBar>>. The following fields are used by this plugin: - -|!Field Name |!Purpose | -|title |Each menu item must have a unique title (not shown to the user) | -|description |Description for use in listings | -|tags |Must contain `$:/tags/MenuBar` | -|caption |The text that is displayed for the menu item. Avoid links, using `~` to suppress CamelCase links if required | -|target |For simple link menu items specifies a tiddler title as the target of the link | -|is-dropdown |Set to `yes` to indicate a dropdown menu item | -|dropdown-position |Optional position for the dropdown (can be ''left'', ''above'', ''aboveleft'', ''aboveright'', ''right'', ''belowleft'', ''belowright'' or ''below'') | -|text |For dropdown menu items, specifies the body of the dropdown | -|custom-menu-content |Optional wikitext to be displayed in place of the caption | -|custom-menu-styles-wide |Optional string of styles to be applied to menu item when the menubar is wide | -|custom-menu-styles-narrow |Optional string of styles to be applied to menu item when the menubar is narrow | - -Custom menu items should make sure that the clickable link or button is an immediate child, and not wrapped in another element. - -Note that menu items can be pushed to the right of the menu bar setting the ''custom-menu-styles'' field to `float: right;`. diff --git a/plugins/tiddlywiki/menubar/language/zh-Hans/Translations.multids b/plugins/tiddlywiki/menubar/language/zh-Hans/Translations.multids deleted file mode 100644 index 2c7574dd8..000000000 --- a/plugins/tiddlywiki/menubar/language/zh-Hans/Translations.multids +++ /dev/null @@ -1,25 +0,0 @@ -title: $:/plugins/tiddlywiki/menubar/language/zh-Hans/ - -Config/Heading1: 菜单栏配置 -Config/MenuItems/Heading: 菜单项 -Config/MenuItems/Description: 选择要显示的菜单项。您还可以通过拖动项目来重新排序。 -Config/BreakpointPosition/Heading: 响应式断点位置 -Config/BreakpointPosition/Description: 窄屏和宽屏之间的分界点位置。应包含 CSS 单位(如 `400px`)。 -Config/ContentsTag/Heading: 内容标签 -Config/ContentsTag/Description: 内容下拉菜单中使用的 TOC 目录标签 -Config/MenuBarColours/Heading: 菜单栏颜色 -Config/MenuBarColours/Description: 要更改菜单栏的颜色,请在当前选定的调色板中定义颜色 `menubar-foreground` 和 `menubar-background`。 -Items/TOC/Name: 内容 -Items/TOC/Description: 目录 -Items/Hamburger/Name: 抽屉 -Items/Hamburger/Description: 在窄屏幕上显示完整的菜单栏 -Items/PageControls/Name: 页面控件 -Items/PageControls/Description: 来自侧边栏的页面控件 -Items/Search/Name: 搜索 -Items/Server/Name: 服务器 -Items/Server/Description: 服务器选项 -Items/Sidebar/Name: 侧边栏 -Items/TopLeftBar/Name: 旧版左上角栏 -Items/TopLeftBar/Description: 来自 $:/tags/TopLeftBar 的项目 -Items/TopRightBar/Name: 旧版右上角栏 -Items/TopRightBar/Description: 来自 $:/tags/TopRightBar 的项目 \ No newline at end of file diff --git a/plugins/tiddlywiki/menubar/language/zh-Hans/readme.tid b/plugins/tiddlywiki/menubar/language/zh-Hans/readme.tid deleted file mode 100644 index 1f4a536ac..000000000 --- a/plugins/tiddlywiki/menubar/language/zh-Hans/readme.tid +++ /dev/null @@ -1,30 +0,0 @@ -title: $:/plugins/tiddlywiki/menubar/language/zh-Hans/readme - -!! 简介 - -该插件提供的菜单栏具有以下功能: - -* 菜单项的形式可以是简单的文本链接、下拉菜单或完全自定义的内容 -* 可通过控制面板单独启用菜单项 -* 通过将菜单项缩减为抽屉式导航(也叫"汉堡包"下拉菜单)来应对屏幕宽度减小的情况 - -!! 菜单项标记 - -菜单项被标记为 <<tag $:/tags/MenuBar>>。本插件使用以下字段: - -|!字段名称 |!用途 | -|title |每个菜单项必须有一个唯一的标题(不显示给用户)| -|description |在列表中使用的描述 | -|tags |必须包含 `$:/tags/MenuBar` | -|caption |菜单项显示的文本。避免使用链接,必要时使用 `~` 来抑制 CamelCase 链接 | -|target |对于简单链接菜单项,指定一个 tiddler 标题作为链接的目标 | -|is-dropdown |设置为 `yes` 表示下拉菜单项 | -|dropdown-position |下拉位置(可选 "左"、"上"、"左上" 等,需要使用英文 ''left'', ''above'', ''aboveleft'', ''aboveright'', ''right'', ''belowleft'', ''belowright'', ''below'') | -|text |对于下拉菜单项,指定下拉菜单的正文 | -|custom-menu-content |可选显示的维基文本,以代替标题 | -|custom-menu-styles-wide |当菜单栏是宽模式时,应用于菜单项的样式字符串选项 | -|custom-menu-styles-narrow |当菜单栏是窄模式时,应用于菜单项的样式的可选字符串 | - -自定义菜单项应确保可点击链接或按钮是直接子元素,而不是包裹在其他元素中。 - -请注意,菜单项可以通过将 ''custom-menu-styles'' 字段设置为 `float: right;` 而推到菜单栏的右侧。 diff --git a/plugins/tiddlywiki/menubar/readme.tid b/plugins/tiddlywiki/menubar/readme.tid index c9b75abbe..4282654bd 100644 --- a/plugins/tiddlywiki/menubar/readme.tid +++ b/plugins/tiddlywiki/menubar/readme.tid @@ -1,5 +1,30 @@ title: $:/plugins/tiddlywiki/menubar/readme -\define lingo-base() $:/plugins/tiddlywiki/menubar/language/ +!! Introduction -<<lingo readme>> +This plugin provides a menu bar with the following features: + +* Menu items take the form of simple text links, dropdowns, or entirely custom content +* Menu items can be individually enabled via the control panel +* Responds to reduced screen width by abbreviating the menu items to a "hamburger" dropdown + +!! Menu Item Tiddlers + +Menu items are tagged <<tag $:/tags/MenuBar>>. The following fields are used by this plugin: + +|!Field Name |!Purpose | +|title |Each menu item must have a unique title (not shown to the user) | +|description |Description for use in listings | +|tags |Must contain `$:/tags/MenuBar` | +|caption |The text that is displayed for the menu item. Avoid links, using `~` to suppress CamelCase links if required | +|target |For simple link menu items specifies a tiddler title as the target of the link | +|is-dropdown |Set to `yes` to indicate a dropdown menu item | +|dropdown-position |Optional position for the dropdown (can be ''left'', ''above'', ''aboveleft'', ''aboveright'', ''right'', ''belowleft'', ''belowright'' or ''below'') | +|text |For dropdown menu items, specifies the body of the dropdown | +|custom-menu-content |Optional wikitext to be displayed in place of the caption | +|custom-menu-styles-wide |Optional string of styles to be applied to menu item when the menubar is wide | +|custom-menu-styles-narrow |Optional string of styles to be applied to menu item when the menubar is narrow | + +Custom menu items should make sure that the clickable link or button is an immediate child, and not wrapped in another element. + +Note that menu items can be pushed to the right of the menu bar setting the ''custom-menu-styles'' field to `float: right;`. diff --git a/plugins/tiddlywiki/menubar/tree.tid b/plugins/tiddlywiki/menubar/tree.tid deleted file mode 100644 index f818ca78e..000000000 --- a/plugins/tiddlywiki/menubar/tree.tid +++ /dev/null @@ -1,4 +0,0 @@ -title: $:/plugins/tiddlywiki/menubar/tree -type: text/vnd.tiddlywiki - -<<tree prefix:"$:/plugins/tiddlywiki/menubar/">> \ No newline at end of file diff --git a/plugins/tiddlywiki/tiddlyweb/GettingStarted.tid b/plugins/tiddlywiki/tiddlyweb/GettingStarted.tid index 012dce8aa..08df08c07 100644 --- a/plugins/tiddlywiki/tiddlyweb/GettingStarted.tid +++ b/plugins/tiddlywiki/tiddlyweb/GettingStarted.tid @@ -1,7 +1,16 @@ title: GettingStarted tags: $:/tags/GettingStarted -caption: <<lingo GettingStartedStep1 "$:/plugins/tiddlywiki/tiddlyweb/language/">> +caption: Step 1<br>Syncing -\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/ +Welcome to ~TiddlyWiki and the ~TiddlyWiki community -<<lingo GettingStarted>> +Visit https://tiddlywiki.com/ to find out more about ~TiddlyWiki and what it can do. + +! Syncing Changes to the Server + +Before you can start storing important information in ~TiddlyWiki it is important to make sure that your changes are being reliably saved by the server. + +# Create a new tiddler using the {{$:/core/images/new-button}} button in the sidebar on the right +# Click the {{$:/core/images/done-button}} button at the top right of the new tiddler +# Check the ~TiddlyWiki command line for a message confirming the tiddler has been saved +# Refresh the page in the browser to and verify that the new tiddler has been correctly saved diff --git a/plugins/tiddlywiki/tiddlyweb/configOfficialPluginLibrary.tid b/plugins/tiddlywiki/tiddlyweb/configOfficialPluginLibrary.tid index dc5b3ae7e..d2a07991a 100644 --- a/plugins/tiddlywiki/tiddlyweb/configOfficialPluginLibrary.tid +++ b/plugins/tiddlywiki/tiddlyweb/configOfficialPluginLibrary.tid @@ -4,6 +4,4 @@ url: https://tiddlywiki.com/library/v5.1.23/index.html caption: {{$:/language/OfficialPluginLibrary}} enabled: no -\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/ - -<<lingo ConfigOfficialPluginLibrary>> +The official plugin library is disabled when using the client-server configuration. Instead, plugins should be installed via the `tiddlywiki.info` file, as described [[here|https://tiddlywiki.com/#Installing%20a%20plugin%20from%20the%20plugin%20library]]. \ No newline at end of file diff --git a/plugins/tiddlywiki/tiddlyweb/language/en-GB/GettingStarted.tid b/plugins/tiddlywiki/tiddlyweb/language/en-GB/GettingStarted.tid deleted file mode 100644 index 990b02f81..000000000 --- a/plugins/tiddlywiki/tiddlyweb/language/en-GB/GettingStarted.tid +++ /dev/null @@ -1,14 +0,0 @@ -title: $:/plugins/tiddlywiki/tiddlyweb/language/en-GB/GettingStarted - -Welcome to ~TiddlyWiki and the ~TiddlyWiki community - -Visit https://tiddlywiki.com/ to find out more about ~TiddlyWiki and what it can do. - -! Syncing Changes to the Server - -Before you can start storing important information in ~TiddlyWiki it is important to make sure that your changes are being reliably saved by the server. - -# Create a new tiddler using the {{$:/core/images/new-button}} button in the sidebar on the right -# Click the {{$:/core/images/done-button}} button at the top right of the new tiddler -# Check the ~TiddlyWiki command line for a message confirming the tiddler has been saved -# Refresh the page in the browser to and verify that the new tiddler has been correctly saved diff --git a/plugins/tiddlywiki/tiddlyweb/language/en-GB/Translations.multids b/plugins/tiddlywiki/tiddlyweb/language/en-GB/Translations.multids deleted file mode 100644 index c03684ad7..000000000 --- a/plugins/tiddlywiki/tiddlyweb/language/en-GB/Translations.multids +++ /dev/null @@ -1,12 +0,0 @@ -title: $:/plugins/tiddlywiki/tiddlyweb/language/en-GB/ - -ConfigOfficialPluginLibrary: The official plugin library is disabled when using the client-server configuration. Instead, plugins should be installed via the `tiddlywiki.info` file, as described [[here|https://tiddlywiki.com/#Installing%20a%20plugin%20from%20the%20plugin%20library]]. -GettingStartedStep1: Step 1<br>Syncing -CopySyncerLogs: Copy syncer logs to clipboard -LoginAs: You are logged in<$reveal state="$:/status/UserName" type="nomatch" text="" default=""> as <strong><$text text={{$:/status/UserName}}/></strong></$reveal> -Readonly: <$reveal state="$:/status/IsReadOnly" type="match" text="yes" default="no"> (read-only)</$reveal> -Login: Login -Logout: Logout -SaveSnapshot: Save snapshot for offline use -Refresh/Label: Refresh from server -Refresh/Button: Get latest changes from the server \ No newline at end of file diff --git a/plugins/tiddlywiki/tiddlyweb/language/en-GB/readme.tid b/plugins/tiddlywiki/tiddlyweb/language/en-GB/readme.tid deleted file mode 100644 index 63a487e80..000000000 --- a/plugins/tiddlywiki/tiddlyweb/language/en-GB/readme.tid +++ /dev/null @@ -1,7 +0,0 @@ -title: $:/plugins/tiddlywiki/tiddlyweb/language/en-GB/readme - -This plugin runs in the browser to synchronise tiddler changes to and from a TiddlyWeb-compatible server (including TiddlyWiki 5 itself, running on Node.js). It is inert when run under Node.js. Disabling this plugin via the browser can not be undone via the browser since this plugin provides the mechanism to synchronize settings with the server. - -Changes made while offline are saved in memory and automatically synchonised with the server when the connection is re-established. However, if the browser tab is closed or another URL is loaded, the in-memory changes will be lost. The [[https://tiddlywiki.com/#BrowserStorage Plugin]] may be added to provide temporary filesystem storage of tiddler changes made while offline and enable them to be synchronised with the server the next time the wiki is loaded in the same browser. - -[[Source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/tiddlyweb]] diff --git a/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/GettingStarted.tid b/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/GettingStarted.tid deleted file mode 100644 index 814f8b9c9..000000000 --- a/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/GettingStarted.tid +++ /dev/null @@ -1,14 +0,0 @@ -title: $:/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/GettingStarted - -欢迎来到太微和太微社区 - -访问 https://tiddlywiki.com/ 了解太微的细节和了解它能做什么。 - -! 同步更改到服务器 - -在你开始在太微中存储重要信息之前,确保你的修改被服务器可靠地保存是非常重要的。 - -# 使用右侧边栏的 {{$:/core/images/new-button}} 按钮创建一个新条目 -# 点击新条目右上方的 {{$:/core/images/done-button}} 按钮 -# 检查太微命令行是否有确认条目已保存的信息 -# 刷新浏览器页面,确认新条目已正确保存 diff --git a/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/Translations.multids b/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/Translations.multids deleted file mode 100644 index 142e872c4..000000000 --- a/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/Translations.multids +++ /dev/null @@ -1,12 +0,0 @@ -title: $:/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/ - -ConfigOfficialPluginLibrary: 使用客户端-服务器配置时,官方插件库将被禁用。取而代之的是,应按照[[here|https://tiddlywiki.com/#Installing%20a%20plugin%20from%20the%20plugin%20library]]所述,通过 "tiddlywiki.info" 文件安装插件。 -GettingStartedStep1: 第一步<br>同步 -CopySyncerLogs: 将同步器日志复制到剪贴板 -LoginAs: 您目前已登录<$reveal state="$:/status/UserName" type="nomatch" text="" default="">为<strong><$text text={{$:/status/UserName}}/></strong></$reveal> -Readonly: <$reveal state="$:/status/IsReadOnly" type="match" text="yes" default="no">(只读)</$reveal> -Login: 登录 -Logout: 登出 -SaveSnapshot: 保存快照以供离线使用 -Refresh/Label: 从服务器刷新 -Refresh/Button: 从服务器获取最新变更 \ No newline at end of file diff --git a/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/readme.tid b/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/readme.tid deleted file mode 100644 index b60ef77e2..000000000 --- a/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/readme.tid +++ /dev/null @@ -1,7 +0,0 @@ -title: $:/plugins/tiddlywiki/tiddlyweb/language/zh-Hans/readme - -该插件在浏览器中运行,用于双向同步更改的条目到与 TiddlyWeb 兼容的服务器上(包括在 Node.js 上运行的 TiddlyWiki 5 本身)。在 Node.js 上运行时,它是无法自救的:由于就是该插件提供了与服务器同步设置和插件的机制,因此通过浏览器禁用该插件后,是无法撤销对自己的禁用的。 - -离线时所作的更改会保存在内存中,并在重新建立连接时自动与服务器同步。不过,如果关闭浏览器标签页或加载另一个 URL,内存中的更改就会丢失。可以添加[[https://tiddlywiki.com/#BrowserStorage Plugin]],为离线时的条目更改提供临时文件系统存储,并使其在下次在同一浏览器中加载知识库时与服务器同步。 - -[[源代码|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/tiddlyweb]] diff --git a/plugins/tiddlywiki/tiddlyweb/readme.tid b/plugins/tiddlywiki/tiddlyweb/readme.tid index ac3991be6..ee30a2dd4 100644 --- a/plugins/tiddlywiki/tiddlyweb/readme.tid +++ b/plugins/tiddlywiki/tiddlyweb/readme.tid @@ -1,5 +1,7 @@ title: $:/plugins/tiddlywiki/tiddlyweb/readme -\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/ +This plugin runs in the browser to synchronise tiddler changes to and from a TiddlyWeb-compatible server (including TiddlyWiki 5 itself, running on Node.js). It is inert when run under Node.js. Disabling this plugin via the browser can not be undone via the browser since this plugin provides the mechanism to synchronize settings with the server. -<<lingo readme>> +Changes made while offline are saved in memory and automatically synchonised with the server when the connection is re-established. However, if the browser tab is closed or another URL is loaded, the in-memory changes will be lost. The [[https://tiddlywiki.com/#BrowserStorage Plugin]] may be added to provide temporary filesystem storage of tiddler changes made while offline and enable them to be synchronised with the server the next time the wiki is loaded in the same browser. + +[[Source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/tiddlyweb]] diff --git a/plugins/tiddlywiki/tiddlyweb/syncer-actions-copy-logs.tid b/plugins/tiddlywiki/tiddlyweb/syncer-actions-copy-logs.tid index 6a8539028..b141670e6 100644 --- a/plugins/tiddlywiki/tiddlyweb/syncer-actions-copy-logs.tid +++ b/plugins/tiddlywiki/tiddlyweb/syncer-actions-copy-logs.tid @@ -1,8 +1,6 @@ title: $:/plugins/tiddlywiki/tiddlyweb/syncer-actions/copy-logs tags: $:/tags/SyncerDropdown -\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/ - <$button message="tm-copy-syncer-logs-to-clipboard" class="tc-btn-invisible"> -{{$:/core/images/copy-clipboard}} <<lingo CopySyncerLogs>> +{{$:/core/images/copy-clipboard}} Copy syncer logs to clipboard </$button> diff --git a/plugins/tiddlywiki/tiddlyweb/syncer-actions-login-status.tid b/plugins/tiddlywiki/tiddlyweb/syncer-actions-login-status.tid index e87c87516..11816f1b4 100644 --- a/plugins/tiddlywiki/tiddlyweb/syncer-actions-login-status.tid +++ b/plugins/tiddlywiki/tiddlyweb/syncer-actions-login-status.tid @@ -1,11 +1,9 @@ title: $:/plugins/tiddlywiki/tiddlyweb/syncer-actions/login-status tags: $:/tags/SyncerDropdown -\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/ - <$reveal state="$:/status/IsLoggedIn" type="match" text="yes"> <div class="tc-drop-down-info"> -<<lingo LoginAs>><<lingo Readonly>> +You are logged in<$reveal state="$:/status/UserName" type="nomatch" text="" default=""> as <strong><$text text={{$:/status/UserName}}/></strong></$reveal><$reveal state="$:/status/IsReadOnly" type="match" text="yes" default="no"> (read-only)</$reveal> </div> <hr/> </$reveal> diff --git a/plugins/tiddlywiki/tiddlyweb/syncer-actions-login.tid b/plugins/tiddlywiki/tiddlyweb/syncer-actions-login.tid index f0648c70c..cdd95f5a6 100644 --- a/plugins/tiddlywiki/tiddlyweb/syncer-actions-login.tid +++ b/plugins/tiddlywiki/tiddlyweb/syncer-actions-login.tid @@ -1,10 +1,8 @@ title: $:/plugins/tiddlywiki/tiddlyweb/syncer-actions/login tags: $:/tags/SyncerDropdown -\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/ - <$reveal state="$:/status/IsLoggedIn" type="nomatch" text="yes"> <$button message="tm-login" class="tc-btn-invisible"> -{{$:/core/images/unlocked-padlock}} <<lingo Login>> +{{$:/core/images/unlocked-padlock}} Login </$button> </$reveal> diff --git a/plugins/tiddlywiki/tiddlyweb/syncer-actions-logout.tid b/plugins/tiddlywiki/tiddlyweb/syncer-actions-logout.tid index 861007f2b..358944d1a 100644 --- a/plugins/tiddlywiki/tiddlyweb/syncer-actions-logout.tid +++ b/plugins/tiddlywiki/tiddlyweb/syncer-actions-logout.tid @@ -1,10 +1,8 @@ title: $:/plugins/tiddlywiki/tiddlyweb/syncer-actions/logout tags: $:/tags/SyncerDropdown -\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/ - <$reveal state="$:/status/IsLoggedIn" type="match" text="yes"> <$button message="tm-logout" class="tc-btn-invisible"> -{{$:/core/images/cancel-button}} <<lingo Logout>> +{{$:/core/images/cancel-button}} Logout </$button> </$reveal> diff --git a/plugins/tiddlywiki/tiddlyweb/syncer-actions-refresh.tid b/plugins/tiddlywiki/tiddlyweb/syncer-actions-refresh.tid index 2cb2ffd82..c397badc5 100644 --- a/plugins/tiddlywiki/tiddlyweb/syncer-actions-refresh.tid +++ b/plugins/tiddlywiki/tiddlyweb/syncer-actions-refresh.tid @@ -1,17 +1,9 @@ title: $:/plugins/tiddlywiki/tiddlyweb/syncer-actions/refresh tags: $:/tags/SyncerDropdown -\whitespace trim -<$let lingo-base="$:/plugins/tiddlywiki/tiddlyweb/language/"> - <$wikify name=buttonText text="<<lingo Refresh/Button>>"> - <$wikify name=ariaLabel text="<<lingo Refresh/Label>>"> - <$reveal state="$:/status/IsLoggedIn" type="match" text="yes"> - <$button tooltip=<<ariaLabel>> aria-label=<<ariaLabel>> class="tc-btn-invisible"> - <$action-sendmessage $message="tm-server-refresh"/> - {{$:/core/images/refresh-button}} - <span class="tc-btn-text"><<buttonText>></span> - </$button> - </$reveal> - </$wikify> - </$wikify> -</$let> +<$reveal state="$:/status/IsLoggedIn" type="match" text="yes"> +<$button tooltip="Get latest changes from the server" aria-label="Refresh from server" class="tc-btn-invisible"> +<$action-sendmessage $message="tm-server-refresh"/> +{{$:/core/images/refresh-button}}<span class="tc-btn-text"><$text text="Get latest changes from the server"/></span> +</$button> +</$reveal> diff --git a/plugins/tiddlywiki/tiddlyweb/syncer-actions-save-snapshot.tid b/plugins/tiddlywiki/tiddlyweb/syncer-actions-save-snapshot.tid index e0eea1994..23bb4c914 100644 --- a/plugins/tiddlywiki/tiddlyweb/syncer-actions-save-snapshot.tid +++ b/plugins/tiddlywiki/tiddlyweb/syncer-actions-save-snapshot.tid @@ -1,11 +1,9 @@ title: $:/plugins/tiddlywiki/tiddlyweb/syncer-actions/save-snapshot tags: $:/tags/SyncerDropdown -\define lingo-base() $:/plugins/tiddlywiki/tiddlyweb/language/ - <$button class="tc-btn-invisible"> <$wikify name="site-title" text={{$:/config/SaveWikiButton/Filename}}> <$action-sendmessage $message="tm-download-file" $param={{$:/config/SaveWikiButton/Template}} filename=<<site-title>>/> </$wikify> -{{$:/core/images/download-button}} <<lingo SaveSnapshot>> +{{$:/core/images/download-button}} Save snapshot for offline use </$button> diff --git a/plugins/tiddlywiki/tiddlyweb/tree.tid b/plugins/tiddlywiki/tiddlyweb/tree.tid deleted file mode 100644 index cc7ef97ba..000000000 --- a/plugins/tiddlywiki/tiddlyweb/tree.tid +++ /dev/null @@ -1,4 +0,0 @@ -title: $:/plugins/tiddlywiki/tiddlyweb/tree -type: text/vnd.tiddlywiki - -<<tree prefix:"$:/plugins/tiddlywiki/tiddlyweb/">> \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/styles.tid b/plugins/tiddlywiki/tour/styles.tid index 2cd28bc93..81de705ce 100644 --- a/plugins/tiddlywiki/tour/styles.tid +++ b/plugins/tiddlywiki/tour/styles.tid @@ -136,16 +136,16 @@ tags: $:/tags/Stylesheet .tc-tour-panel-fullscreen .tc-tour-panel-banner-image { display: block; - width: 200px; + width: 100px; float: right; margin: 4em 2em 2em 2em; } .tc-tour-panel-fullscreen .tc-tour-panel-inner { width: 30%; - min-width: 400px; + min-width: 350px; height: 30%; - margin: 20% auto; + margin: 10em auto 0 auto; } .tc-tour-panel .tc-tour-panel-inner .tc-tiddler-frame { diff --git a/plugins/tiddlywiki/tour/tour-panel.tid b/plugins/tiddlywiki/tour/tour-panel.tid index 63a23f6e6..7e9949290 100644 --- a/plugins/tiddlywiki/tour/tour-panel.tid +++ b/plugins/tiddlywiki/tour/tour-panel.tid @@ -20,11 +20,9 @@ tags: $:/tags/PageTemplate <%endif%> <%if [function[tour-is-last-step]] %> <$confetti/> - <$confetti delay=100/> - <$confetti delay=200/> - <$confetti delay=300/> - <$confetti delay=400/> - <$confetti delay=500/> + <$confetti delay=300 originY=0.6 spread=100 scalar=1.5/> + <$confetti delay=400 originY=0.55 spread=130/> + <$confetti delay=500 originY=0.55 spread=170 scalar=2/> <%endif%> </div> \end diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/finished.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/finished.tid index 16cdd6509..98dc3058e 100644 --- a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/finished.tid +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/finished.tid @@ -4,6 +4,10 @@ tags: $:/tags/Tour/IntroductionToTiddlyWiki You have completed the tour. +<%if [all[shadows+tiddlers]tag[$:/tags/Tour]] -[<currentTour>] %> + You can choose to take another tour: <<tour-chooser filter:"[all[shadows+tiddlers]tag[$:/tags/Tour]] -[<currentTour>]">> + +<%endif%> diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/search.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/search.tid index 44b153785..a6cf89a76 100644 --- a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/search.tid +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/search.tid @@ -2,8 +2,8 @@ title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/search caption: Searching tags: $:/tags/Tour/IntroductionToTiddlyWiki hint-selector: .tc-sidebar-search .tc-popup-handle -step-success-filter: [{$:/temp/search}match[help]] +step-success-filter: [{$:/temp/search}match[home]] -<<tour-task "Search for the phrase 'help'">> +<<tour-task "Search for the phrase 'home'">> Type the phrase into the text box labelled "search" in the sidebar at the right. diff --git a/plugins/tiddlywiki/tour/tours/using-tags/finished.tid b/plugins/tiddlywiki/tour/tours/using-tags/finished.tid deleted file mode 100644 index 6d8a9e4f9..000000000 --- a/plugins/tiddlywiki/tour/tours/using-tags/finished.tid +++ /dev/null @@ -1,5 +0,0 @@ -title: $:/plugins/tiddlywiki/tour/using-tags/finished -caption: Congratulations -tags: $:/tags/Tour/UsingTags - -<<tour-chooser filter:"[all[shadows+tiddlers]tag[$:/tags/Tour]] -[<currentTour>]">> diff --git a/plugins/tiddlywiki/tour/tours/using-tags/tags-tour-logo.svg b/plugins/tiddlywiki/tour/tours/using-tags/tags-tour-logo.svg deleted file mode 100644 index 0773e0f00..000000000 --- a/plugins/tiddlywiki/tour/tours/using-tags/tags-tour-logo.svg +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg width="100%" height="100%" viewBox="0 0 500 335" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> - <g transform="matrix(0.488281,0,0,0.436198,0,0)"> - <rect id="Artboard1" x="0" y="0" width="1024" height="768" style="fill:none;"/> - <clipPath id="_clip1"> - <rect id="Artboard11" serif:id="Artboard1" x="0" y="0" width="1024" height="768"/> - </clipPath> - <g clip-path="url(#_clip1)"> - <g transform="matrix(3.66495,0,0,4.10256,0,0.218772)"> - <g transform="matrix(1,0,0,1,-59.5095,-391.468)"> - <path d="M320.725,420.421C326.96,417.788 332.843,414.256 338.913,411.253C338.882,411.406 338.722,411.458 338.626,411.561C328.964,419.375 327.614,432.589 328.751,444.808C329.174,451.149 327.382,458.033 325.167,464.525C321.022,475.102 313.017,486.251 303.726,485.68C300.214,485.568 298.174,483.58 295.563,481.456C295.057,485.757 293.067,489.595 291.148,493.398C286.718,501.831 275.14,505.548 264.419,514.553C253.699,523.558 267.849,555.718 271.28,561.578C274.711,567.439 284.287,569.583 280.571,574.872C279.434,576.618 277.696,577.243 275.838,577.921L273.318,578.249C262.308,577.938 257.466,577.965 251.859,568.744L247.489,568.87C242.402,568.644 244.522,568.746 241.129,568.577C235.455,568.356 236.364,562.965 235.366,560.117C233.769,550.449 237.478,540.73 237.361,531.06C237.32,527.627 232.462,515.476 230.727,511.132C225.287,512.156 219.817,512.351 214.298,512.626C201.576,512.595 188.94,511.037 176.396,509.059C173.952,519.157 166.686,533.291 172.692,543.554C179.982,554.17 185.098,557.111 193.028,557.751C200.957,558.39 202.748,567.343 200.829,570.541C199.131,572.751 196.147,573.152 193.611,573.687L188.539,573.925C184.548,573.791 180.98,572.714 177.424,571.052C171.485,567.736 165.351,560.844 160.793,555.895C161.854,557.871 162.487,561.729 161.525,563.524C158.83,567.341 147.176,567.318 141.839,564.946C135.776,562.252 121.125,543.335 118.86,529.168C124.886,517.772 133.665,507.845 138.106,495.437C128.425,489.26 123.24,479.204 123.913,467.813L124.156,466.494C114.631,468.277 119.57,467.614 109.323,468.389C76.689,468.289 47.99,446.162 64.15,411.773C65.201,409.737 66.201,407.885 67.982,408.77C69.412,409.479 69.207,412.325 68.487,415.481C59.25,456.572 104.396,456.886 132.149,449.282C134.903,448.528 140.381,443.444 144.176,441.759C150.379,439.004 157.111,437.887 163.793,437.082C180.411,435.188 200.384,443.943 210.533,444.228C220.681,444.514 235.118,441.798 243.98,442.37C250.41,442.664 256.724,443.825 262.928,445.478C266.944,425.911 267.228,411.489 276.748,408.151C281.18,408.851 284.806,413.787 287.706,417.829L287.706,423.746C287.706,428.653 295.104,432.636 304.216,432.636C313.328,432.636 320.725,428.653 320.725,423.746L320.725,420.421ZM151.046,554.19L152.645,554.662C154.654,553.763 158.693,555.152 160.836,555.832C156.89,551.458 150.947,545.035 146.664,540.986C145.259,536.084 145.859,531.152 146.161,526.148L146.222,525.734C144.534,529.74 142.391,533.634 141.24,537.85C139.893,543.539 147.228,549.677 150.073,553.194L151.046,554.19Z" fill="red"/> - </g> - <g transform="matrix(2.12347,0,0,2.12347,219.225,-7.42467)"> - <g transform="matrix(1,0,0,0.666667,-0.185118,3.43957)"> - <path d="M0.667,9.362C0.576,9.293 0.518,9.153 0.518,9C0.518,8.847 0.576,8.707 0.667,8.638C2.756,7.072 10.971,0.911 12.065,0.09C12.14,0.033 12.23,0.033 12.306,0.09C13.399,0.911 21.614,7.072 23.703,8.638C23.794,8.707 23.852,8.847 23.852,9C23.852,9.153 23.794,9.293 23.703,9.362C21.614,10.928 13.399,17.089 12.306,17.91C12.23,17.967 12.14,17.967 12.065,17.91C10.971,17.089 2.756,10.928 0.667,9.362Z"/> - </g> - <g transform="matrix(1,0,0,1,1.77636e-15,4.43957)"> - <path d="M18.5,8.75L18.5,13.744C18.5,15.675 15.587,17.244 12,17.244C8.413,17.244 5.5,15.675 5.5,13.744L5.5,8.75L11.951,11.975C11.982,11.991 12.018,11.991 12.049,11.975L18.5,8.75Z"/> - </g> - <g transform="matrix(1,0,0,0.648293,19.2746,5.5086)"> - <path d="M2,6L2.207,11L1.526,14C1.526,14 1.524,14.709 2.5,14.717C3.421,14.724 3.5,14 3.5,14L2.707,11L3,6L2,6Z"/> - </g> - </g> - </g> - </g> - </g> -</svg> diff --git a/plugins/tiddlywiki/tour/tours/using-tags/tags-tour-logo.svg.meta b/plugins/tiddlywiki/tour/tours/using-tags/tags-tour-logo.svg.meta deleted file mode 100644 index 29d308fc0..000000000 --- a/plugins/tiddlywiki/tour/tours/using-tags/tags-tour-logo.svg.meta +++ /dev/null @@ -1,2 +0,0 @@ -title: $:/plugins/tiddlywiki/tour/tags-tour-logo -type: image/svg+xml diff --git a/plugins/tiddlywiki/tour/tours/using-tags/tagsTourUsingTags.tid b/plugins/tiddlywiki/tour/tours/using-tags/tagsTourUsingTags.tid deleted file mode 100644 index 30681ca24..000000000 --- a/plugins/tiddlywiki/tour/tours/using-tags/tagsTourUsingTags.tid +++ /dev/null @@ -1,2 +0,0 @@ -title: $:/tags/Tour/UsingTags -list: $:/plugins/tiddlywiki/tour/using-tags/welcome $:/plugins/tiddlywiki/tour/using-tags/finished diff --git a/plugins/tiddlywiki/tour/tours/using-tags/using-tags.tid b/plugins/tiddlywiki/tour/tours/using-tags/using-tags.tid deleted file mode 100644 index 31c2f4b78..000000000 --- a/plugins/tiddlywiki/tour/tours/using-tags/using-tags.tid +++ /dev/null @@ -1,7 +0,0 @@ -title: $:/plugins/tiddlywiki/tour/using-tags -tags: $:/tags/Tour -tour-tag: $:/tags/Tour/UsingTags -logo: $:/plugins/tiddlywiki/tour/tags-tour-logo -description: Using Tags in ~TiddlyWiki - -An introduction to using tags in ~TiddlyWiki \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/tours/using-tags/welcome.tid b/plugins/tiddlywiki/tour/tours/using-tags/welcome.tid deleted file mode 100644 index 852273629..000000000 --- a/plugins/tiddlywiki/tour/tours/using-tags/welcome.tid +++ /dev/null @@ -1,5 +0,0 @@ -title: $:/plugins/tiddlywiki/tour/using-tags/welcome -caption: Welcome -tags: $:/tags/Tour/UsingTags - -!! An introduction to using tags in ~TiddlyWiki diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index bb658650a..b1000539c 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -2513,6 +2513,10 @@ html body.tc-body.tc-single-tiddler-window { width: 100%; } +.tc-control-panel-setting { + border-top: 1px solid <<colour blockquote-bar>>; +} + .tc-plugin-info { display: flex; text-shadow: none; @@ -2601,23 +2605,23 @@ a.tc-tiddlylink.tc-plugin-info:hover > .tc-plugin-info-chunk > svg { } .tc-plugin-info-chunk .tc-plugin-info-stability-stable { - border: 1px solid green; - color: green; + border: 1px solid <<colour stability-stable>>; + color: <<colour stability-stable>>; } .tc-plugin-info-chunk .tc-plugin-info-stability-experimental { - border: 1px solid #c07c00; - color: #c07c00; + border: 1px solid <<colour stability-experimental>>; + color: <<colour stability-experimental>>; } .tc-plugin-info-chunk .tc-plugin-info-stability-deprecated { - border: 1px solid red; - color: red; + border: 1px solid <<colour stability-deprecated>>; + color: <<colour stability-deprecated>>; } .tc-plugin-info-chunk .tc-plugin-info-stability-legacy { - border: 1px solid blue; - color: blue; + border: 1px solid <<colour stability-legacy>>; + color: <<colour stability-legacy>>; } .tc-plugin-info-chunk.tc-plugin-info-buttons {