mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-24 11:54:41 +00:00
Compare commits
31 Commits
fix-list-w
...
coalesce-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74a18c39ab | ||
|
|
7b32f02cb3 | ||
|
|
575d80dfe9 | ||
|
|
bc3d64f4b8 | ||
|
|
aa4aeb187c | ||
|
|
fb85e91f82 | ||
|
|
100eaeff30 | ||
|
|
518c5d3ef6 | ||
|
|
38187d26f4 | ||
|
|
8ac4a448ef | ||
|
|
83dfec471d | ||
|
|
1015a1605d | ||
|
|
f08d3d6030 | ||
|
|
232afb4249 | ||
|
|
22f7af05de | ||
|
|
17665233a2 | ||
|
|
a8f477a3ab | ||
|
|
9d10e2b3a7 | ||
|
|
907aed3eab | ||
|
|
83220be7d9 | ||
|
|
a3cba681e0 | ||
|
|
4f01a53917 | ||
|
|
5cb31b7adb | ||
|
|
6a9dc9dcd5 | ||
|
|
46a22ef585 | ||
|
|
3d712127ad | ||
|
|
a3e5ace458 | ||
|
|
6fa81feeba | ||
|
|
95e270a8a6 | ||
|
|
e2d4388c48 | ||
|
|
f68fa89a29 |
@@ -4,7 +4,7 @@ type: text/plain
|
||||
TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)
|
||||
|
||||
Copyright (c) 2004-2007, Jeremy Ruston
|
||||
Copyright (c) 2007-2023, UnaMesa Association
|
||||
Copyright (c) 2007-2024, UnaMesa Association
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -4,6 +4,7 @@ _canonical_uri: The full URI of an external image tiddler
|
||||
author: Name of the author of a plugin
|
||||
bag: The name of the bag from which a tiddler came
|
||||
caption: The text to be displayed on a tab or button
|
||||
class: The CSS class applied to a tiddler when rendering it - see [[Custom styles by user-class]]. Also used for [[Modals]]
|
||||
code-body: The view template will display the tiddler as code if set to ''yes''
|
||||
color: The CSS color value associated with a tiddler
|
||||
component: The name of the component responsible for an [[alert tiddler|AlertMechanism]]
|
||||
|
||||
@@ -49,11 +49,11 @@ exports.parse = function() {
|
||||
if(this.match[3]) {
|
||||
params = $tw.utils.parseParameterDefinition(this.match[4]);
|
||||
}
|
||||
// Is this a multiline definition?
|
||||
// Is the remainder of the line blank after the parameter close paren?
|
||||
var reEnd;
|
||||
if(this.match[5]) {
|
||||
// If so, the end of the body is marked with \end
|
||||
reEnd = new RegExp("(\\r?\\n[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg");
|
||||
// If so, it is a multiline definition and the end of the body is marked with \end
|
||||
reEnd = new RegExp("((:?^|\\r?\\n)[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg");
|
||||
} else {
|
||||
// Otherwise, the end of the definition is marked by the end of the line
|
||||
reEnd = /($|\r?\n)/mg;
|
||||
|
||||
@@ -54,11 +54,11 @@ exports.parse = function() {
|
||||
paramMatch = reParam.exec(paramString);
|
||||
}
|
||||
}
|
||||
// Is this a multiline definition?
|
||||
// Is the remainder of the \define line blank after the parameter close paren?
|
||||
var reEnd;
|
||||
if(this.match[3]) {
|
||||
// If so, the end of the body is marked with \end
|
||||
reEnd = new RegExp("(\\r?\\n[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
|
||||
// If so, it is a multiline definition and the end of the body is marked with \end
|
||||
reEnd = new RegExp("((?:^|\\r?\\n)[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
|
||||
} else {
|
||||
// Otherwise, the end of the definition is marked by the end of the line
|
||||
reEnd = /($|\r?\n)/mg;
|
||||
|
||||
@@ -216,6 +216,8 @@ WikiParser.prototype.parsePragmas = function() {
|
||||
subTree[0].children = [];
|
||||
currentTreeBranch = subTree[0].children;
|
||||
}
|
||||
// Skip whitespace after the pragma
|
||||
this.skipWhitespace();
|
||||
}
|
||||
return currentTreeBranch;
|
||||
};
|
||||
|
||||
@@ -90,7 +90,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
EditWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
// Refresh if an attribute has changed, or the type associated with the target tiddler has changed
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (changedTiddlers[this.editTitle] && this.getEditorType() !== this.editorType)) {
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (this.getEditorType() !== this.editorType)) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -217,7 +217,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
LinkWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if($tw.utils.count(changedAttributes) > 0) {
|
||||
if($tw.utils.count(changedAttributes) > 0 || changedTiddlers[this.to]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -42,31 +42,24 @@ Compute the internal state of the widget
|
||||
*/
|
||||
ParametersWidget.prototype.execute = function() {
|
||||
var self = this;
|
||||
this.parametersDepth = Math.max(parseInt(this.getAttribute("$depth","1"),10) || 1,1);
|
||||
// Find the parent transclusions
|
||||
var pointer = this.parentWidget,
|
||||
depth = this.parametersDepth;
|
||||
while(pointer) {
|
||||
if(pointer instanceof TranscludeWidget) {
|
||||
depth--;
|
||||
if(depth <= 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
pointer = pointer.parentWidget;
|
||||
}
|
||||
var pointer = this.getContainingTransclude();
|
||||
// Process each parameter
|
||||
if(pointer instanceof TranscludeWidget) {
|
||||
if(pointer) {
|
||||
// It's important to remember this, because when we refresh, we'll need to make sure this widget is starting at the same index.
|
||||
this.initialParameterIndex = pointer.parameterIndex;
|
||||
// Get the value for each defined parameter
|
||||
$tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(self.parseTreeNode),function(attr,index) {
|
||||
$tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(self.parseTreeNode),function(attr) {
|
||||
var name = attr.name;
|
||||
// If the attribute name starts with $$ then reduce to a single dollar
|
||||
if(name.substr(0,2) === "$$") {
|
||||
name = name.substr(1);
|
||||
}
|
||||
var value = pointer.getTransclusionParameter(name,index,self.getAttribute(attr.name,""));
|
||||
var value = pointer.getTransclusionParameter(name,self.getAttribute(attr.name,""));
|
||||
self.setVariable(name,value);
|
||||
});
|
||||
// We remember where we left the unnamed parameter index.
|
||||
this.finalParameterIndex = pointer.parameterIndex;
|
||||
// Assign any metaparameters
|
||||
$tw.utils.each(pointer.getTransclusionMetaParameters(),function(getValue,name) {
|
||||
var variableName = self.getAttribute("$" + name);
|
||||
@@ -84,13 +77,29 @@ Refresh the widget by ensuring our attributes are up to date
|
||||
*/
|
||||
ParametersWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(Object.keys(changedAttributes).length) {
|
||||
var pointer = this.getContainingTransclude();
|
||||
var currentParameterIndex;
|
||||
if(pointer) {
|
||||
currentParameterIndex = pointer.parameterIndex;
|
||||
}
|
||||
if(Object.keys(changedAttributes).length || currentParameterIndex !== this.initialParameterIndex) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else if(pointer) {
|
||||
// We set the index for unnamed parameters for our $transclude widget in case any later $parameters show up. They need to be able to confirm their indices are starting in the right place, because if not, they need to refresh.
|
||||
pointer.parameterIndex = this.finalParameterIndex;
|
||||
}
|
||||
return this.refreshChildren(changedTiddlers);
|
||||
};
|
||||
|
||||
ParametersWidget.prototype.getContainingTransclude = function() {
|
||||
var pointer = this.parentWidget;
|
||||
while(pointer && !(pointer instanceof TranscludeWidget)) {
|
||||
pointer = pointer.parentWidget;
|
||||
}
|
||||
return pointer;
|
||||
};
|
||||
|
||||
exports.parameters = ParametersWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -43,7 +43,7 @@ SelectWidget.prototype.render = function(parent,nextSibling) {
|
||||
//Create element
|
||||
var domNode = this.document.createElement("select");
|
||||
if(this.selectClass) {
|
||||
domNode.classname = this.selectClass;
|
||||
domNode.className = this.selectClass;
|
||||
}
|
||||
// Assign data- attributes
|
||||
this.assignAttributes(domNode,{
|
||||
@@ -62,8 +62,8 @@ SelectWidget.prototype.render = function(parent,nextSibling) {
|
||||
if(this.selectTooltip) {
|
||||
domNode.setAttribute("title",this.selectTooltip);
|
||||
}
|
||||
this.renderChildren(domNode,nextSibling);
|
||||
this.parentDomNode.insertBefore(domNode,nextSibling);
|
||||
this.renderChildren(domNode,null);
|
||||
this.domNodes.push(domNode);
|
||||
this.setSelectValue();
|
||||
if(this.selectFocus == "yes") {
|
||||
|
||||
@@ -358,14 +358,26 @@ TranscludeWidget.prototype.getOrderedTransclusionParameters = function() {
|
||||
};
|
||||
|
||||
/*
|
||||
Fetch the value of a parameter
|
||||
The parameter index indicates is used by internal $parameter widgets to sequentially assign unnamed parameters.
|
||||
*/
|
||||
TranscludeWidget.prototype.getTransclusionParameter = function(name,index,defaultValue) {
|
||||
Object.defineProperty(TranscludeWidget.prototype, 'parameterIndex', {
|
||||
get: function() { return this.claimedIndices || 0; },
|
||||
set: function(value) { this.claimedIndices = value; }
|
||||
});
|
||||
|
||||
/*
|
||||
Fetch the value of a parameter given either its name or index
|
||||
*/
|
||||
TranscludeWidget.prototype.getTransclusionParameter = function(name,defaultValue) {
|
||||
if(name in this.stringParametersByName) {
|
||||
return this.stringParametersByName[name];
|
||||
} else {
|
||||
// Let's see if this name was already assigned an index
|
||||
var index = this.parameterIndex;
|
||||
var name = "" + index;
|
||||
if(name in this.stringParametersByName) {
|
||||
// This parameter now corresponds to this index. No other parameters may correspond to it.
|
||||
this.claimedIndices = index + 1;
|
||||
return this.stringParametersByName[name];
|
||||
}
|
||||
}
|
||||
@@ -448,6 +460,8 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
TranscludeWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
// Reset the parameter index so that internal $parameter widgets can double-check their unnamed parameter indices.
|
||||
this.parameterIndex = 0;
|
||||
if(($tw.utils.count(changedAttributes) > 0) || (this.transcludeVariableIsFunction && this.functionNeedsRefresh()) || (!this.transcludeVariable && changedTiddlers[this.transcludeTitle] && this.parserNeedsRefresh())) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
|
||||
@@ -153,7 +153,7 @@ Widget.prototype.getVariableInfo = function(name,options) {
|
||||
} else if(variable.isFunctionDefinition) {
|
||||
// Function evaluations
|
||||
params = self.resolveVariableParameters(variable.params,actualParams);
|
||||
var variables = Object.create(null);
|
||||
var variables = options.variables || Object.create(null);
|
||||
// Apply default parameter values
|
||||
$tw.utils.each(variable.params,function(param,index) {
|
||||
if(param["default"]) {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
title: $:/core/templates/html-json-skinny-tiddler
|
||||
|
||||
<$jsontiddler tiddler=<<currentTiddler>> exclude="text" escapeUnsafeScriptChars="yes"/>
|
||||
<$text text=<<join>>/><$jsontiddler tiddler=<<currentTiddler>> exclude="text" escapeUnsafeScriptChars="yes"/>
|
||||
|
||||
@@ -9,9 +9,7 @@ title: $:/core/templates/store.area.template.html
|
||||
<$let newline={{{ [charcode[10]] }}} join=`,$(newline)$`>
|
||||
<$text text=<<newline>>/>
|
||||
<$list filter=<<saveTiddlerFilter>> join=<<join>> template="$:/core/templates/html-json-tiddler"/>
|
||||
<$vars numTiddlers={{{ [subfilter<saveTiddlerFilter>count[]] }}}>
|
||||
<$list filter={{{ [<skinnySaveTiddlerFilter>] }}} join=<<join>> template="$:/core/templates/html-json-skinny-tiddler"/>
|
||||
</$vars>
|
||||
<$list filter="[subfilter<skinnySaveTiddlerFilter>]" template="$:/core/templates/html-json-skinny-tiddler"/>
|
||||
<$text text=<<newline>>/>
|
||||
</$let>
|
||||
`]</script>`
|
||||
@@ -22,8 +20,8 @@ title: $:/core/templates/store.area.template.html
|
||||
<!-- Old-style DIV/PRE-based store area -->
|
||||
<$reveal type="nomatch" state="$:/isEncrypted" text="yes">
|
||||
`<div id="storeArea" style="display:none;">`
|
||||
<$list filter=<<saveTiddlerFilter>> template="$:/core/templates/html-div-tiddler"/>
|
||||
<$list filter={{{ [<skinnySaveTiddlerFilter>] }}} template="$:/core/templates/html-div-skinny-tiddler"/>
|
||||
<$list filter={{{ [<saveTiddlerFilter>] }}} template="$:/core/templates/html-div-tiddler"/>
|
||||
<$list filter="[subfilter<skinnySaveTiddlerFilter>]" template="$:/core/templates/html-div-skinny-tiddler"/>
|
||||
`</div>`
|
||||
</$reveal>
|
||||
</$list>
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
title: $:/core/ui/EditTemplate/body/default
|
||||
|
||||
\function edit-preview-state()
|
||||
[{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] +[get[text]] :else[[no]]
|
||||
\end
|
||||
|
||||
\define config-visibility-title()
|
||||
$:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
||||
\end
|
||||
@@ -14,15 +10,16 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
||||
|
||||
\whitespace trim
|
||||
<$let
|
||||
editPreviewStateTiddler={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}
|
||||
importTitle=<<qualify $:/ImportImage>>
|
||||
importState=<<qualify $:/state/ImportImage>> >
|
||||
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> >
|
||||
<div>
|
||||
<div class={{{ [function[edit-preview-state]match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}>
|
||||
<div class={{{ [<editPreviewStateTiddler>get[text]match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}>
|
||||
|
||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
||||
|
||||
<$list filter="[function[edit-preview-state]match[yes]]" variable="ignore">
|
||||
<$list filter="[<editPreviewStateTiddler>get[text]match[yes]]" variable="ignore">
|
||||
|
||||
<div class="tc-tiddler-preview-preview" data-tiddler-title={{!!draft.title}} data-tags={{!!tags}}>
|
||||
|
||||
|
||||
@@ -9,17 +9,8 @@ button-classes: tc-text-editor-toolbar-item-start-group
|
||||
shortcuts: ((preview))
|
||||
|
||||
\whitespace trim
|
||||
<$let
|
||||
edit-preview-state={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}
|
||||
>
|
||||
<$reveal state=<<edit-preview-state>> type="match" text="yes" tag="span">
|
||||
{{$:/core/images/preview-open}}
|
||||
<$action-setfield $tiddler=<<edit-preview-state>> $value="no"/>
|
||||
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>
|
||||
</$reveal>
|
||||
<$reveal state=<<edit-preview-state>> type="nomatch" text="yes" tag="span">
|
||||
{{$:/core/images/preview-closed}}
|
||||
<$action-setfield $tiddler=<<edit-preview-state>> $value="yes"/>
|
||||
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>
|
||||
</$reveal>
|
||||
</$let>
|
||||
<span>
|
||||
<$transclude $tiddler={{{ [<editPreviewStateTiddler>get[text]match[yes]then[$:/core/images/preview-open]else[$:/core/images/preview-closed]] }}} />
|
||||
</span>
|
||||
<$action-setfield $tiddler=<<editPreviewStateTiddler>> $value={{{ [<editPreviewStateTiddler>get[text]toggle[yes],[no]] }}} />
|
||||
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>
|
||||
@@ -1,12 +1,15 @@
|
||||
caption: 5.3.3
|
||||
created: 20231213080754563
|
||||
modified: 20231213080754563
|
||||
caption: 5.3.4
|
||||
created: 20231223102229103
|
||||
modified: 20231223102229103
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.3.3
|
||||
title: Release 5.3.4
|
||||
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...master]]//
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.3...master]]//
|
||||
|
||||
! Major Improvements
|
||||
|
||||
|
||||
! Translation improvements
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
title: Functions/FunctionFilterrunVariables
|
||||
description: Functions in filter runs that set variables
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Idiosyncrasy
|
||||
caption: Idiosyncrasy Caption Field
|
||||
|
||||
+
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
\procedure demo-subfilter() [<currentTiddler>]
|
||||
\function .demo-function() [<currentTiddler>]
|
||||
|
||||
<$let currentTiddler="Idiosyncrasy">
|
||||
<$text text={{{ [<currentTiddler>get[caption]!is[blank]else<currentTiddler>] :map[subfilter<demo-subfilter>] }}}/>,
|
||||
<$text text={{{ [<currentTiddler>get[caption]!is[blank]else<currentTiddler>] :map[.demo-function[]] }}}/>
|
||||
</$let>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Idiosyncrasy Caption Field,Idiosyncrasy Caption Field</p>
|
||||
@@ -0,0 +1,20 @@
|
||||
title: Functions/FunctionFilterrunVariables2
|
||||
description: Functions in filter runs that set variables
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Apple
|
||||
cost: 5
|
||||
|
||||
+
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
\function .doublecost() [<currentTiddler>get[cost]multiply[2]]
|
||||
|
||||
<$text text={{{ [[Apple]] :map[.doublecost[]] }}}/>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
10
|
||||
16
editions/test/tiddlers/tests/data/macros/EndInBody.tid
Normal file
16
editions/test/tiddlers/tests/data/macros/EndInBody.tid
Normal file
@@ -0,0 +1,16 @@
|
||||
title: Macros/EndInBody
|
||||
description: \end line starting with non-whitespace is part of macro body
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define hello()
|
||||
hello \end
|
||||
\end
|
||||
|
||||
Out: <<hello>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Out: hello \end</p>
|
||||
16
editions/test/tiddlers/tests/data/macros/IndentedEnd.tid
Normal file
16
editions/test/tiddlers/tests/data/macros/IndentedEnd.tid
Normal file
@@ -0,0 +1,16 @@
|
||||
title: Macros/IndentedEnd
|
||||
description: \end line starting with whitespace ends a macro body
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define hello()
|
||||
hello \end
|
||||
\end
|
||||
|
||||
Out: <<hello>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Out: hello \end</p>
|
||||
@@ -0,0 +1,16 @@
|
||||
title: Macros/MismatchedNamedEnd
|
||||
description: Mismatched named end is part of the body
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define hello()
|
||||
\end goodbye
|
||||
\end
|
||||
|
||||
Out: <<hello>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Out: \end goodbye</p>
|
||||
@@ -0,0 +1,18 @@
|
||||
title: Macros/WhitespaceOnlyWithEnd
|
||||
description: The /end should be detected when macro definition contains only whitespace
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define max()
|
||||
\end
|
||||
Nothing
|
||||
\end
|
||||
|
||||
Out: <<max>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Nothing
|
||||
\end</p><p>Out: </p>
|
||||
@@ -0,0 +1,15 @@
|
||||
title: Macros/WhitespaceOnlyWithEnd2
|
||||
description: Line with \end can start with whitespace
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define empty()
|
||||
\end
|
||||
|
||||
Out: <<empty>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Out: </p>
|
||||
@@ -0,0 +1,64 @@
|
||||
title: Pragmas/WhitespaceAfterPragma
|
||||
description: parsermode pragma
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
<$wikify name="parsetree" text={{Text}} mode="inline" output="parsetree">
|
||||
<$text text=<<parsetree>>/>
|
||||
</$wikify>
|
||||
+
|
||||
title: Text
|
||||
|
||||
\procedure this-is-a-definition() Something
|
||||
|
||||
|
||||
|
||||
|
||||
Now!
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>
|
||||
[
|
||||
{
|
||||
"type": "set",
|
||||
"attributes": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "this-is-a-definition"
|
||||
},
|
||||
"value": {
|
||||
"name": "value",
|
||||
"type": "string",
|
||||
"value": "Something"
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Now!\n",
|
||||
"start": 48,
|
||||
"end": 53
|
||||
}
|
||||
],
|
||||
"params": [],
|
||||
"orderedAttributes": [
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"value": "this-is-a-definition"
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": "string",
|
||||
"value": "Something"
|
||||
}
|
||||
],
|
||||
"isProcedureDefinition": true
|
||||
}
|
||||
]
|
||||
</p>
|
||||
@@ -0,0 +1,32 @@
|
||||
title: Pragmas/WhitespaceNoPragma
|
||||
description: parsermode pragma
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
<$wikify name="parsetree" text={{Text}} mode="inline" output="parsetree">
|
||||
<$text text=<<parsetree>>/>
|
||||
</$wikify>
|
||||
+
|
||||
title: Text
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Now!
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>
|
||||
[
|
||||
{
|
||||
"type": "text",
|
||||
"text": "\n\n\n\nNow!\n",
|
||||
"start": 0,
|
||||
"end": 9
|
||||
}
|
||||
]
|
||||
</p>
|
||||
16
editions/test/tiddlers/tests/data/procedures/EndInBody.tid
Normal file
16
editions/test/tiddlers/tests/data/procedures/EndInBody.tid
Normal file
@@ -0,0 +1,16 @@
|
||||
title: Procedures/EndInBody
|
||||
description: \end line starting with non-whitespace is part of procedure body
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\procedure hello()
|
||||
hello \end
|
||||
\end
|
||||
|
||||
Out: <<hello>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Out: hello \end</p>
|
||||
16
editions/test/tiddlers/tests/data/procedures/IndentedEnd.tid
Normal file
16
editions/test/tiddlers/tests/data/procedures/IndentedEnd.tid
Normal file
@@ -0,0 +1,16 @@
|
||||
title: Procedures/IndentedEnd
|
||||
description: \end line starting with whitespace ends a procedure body
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\procedure hello()
|
||||
hello \end
|
||||
\end
|
||||
|
||||
Out: <<hello>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Out: hello \end</p>
|
||||
@@ -0,0 +1,16 @@
|
||||
title: Procedures/MismatchedNamedEnd
|
||||
description: Mismatched named end is part of the body
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\procedure hello()
|
||||
\end goodbye
|
||||
\end
|
||||
|
||||
Out: <<hello>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Out: \end goodbye</p>
|
||||
@@ -0,0 +1,18 @@
|
||||
title: Procedures/WhitespaceOnlyWithEnd
|
||||
description: The /end should be detected when procedure definition contains only whitespace
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\procedure max()
|
||||
\end
|
||||
Nothing
|
||||
\end
|
||||
|
||||
Out: <<max>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Nothing
|
||||
\end</p><p>Out: </p>
|
||||
@@ -0,0 +1,15 @@
|
||||
title: Procedures/WhitespaceOnlyWithEnd2
|
||||
description: Line with \end can start with whitespace
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\procedure empty()
|
||||
\end
|
||||
|
||||
Out: <<empty>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Out: </p>
|
||||
@@ -0,0 +1,38 @@
|
||||
title: Transclude/Parameterised/ConditionalParameters/Refreshed
|
||||
description: Parameterised transclusion when conditional parameters are changed by a refresh
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
\procedure elephant(filler)
|
||||
<$let name={{Canary}}>
|
||||
<% if [<name>match[yes]] %>
|
||||
<$parameters A=defaultA>
|
||||
A/<$text text=<<filler>>/>/<$text text=<<A>>/>/<$text text=<<B>>/>
|
||||
</$parameters>
|
||||
<% else %>
|
||||
<$parameters B=defaultB>
|
||||
B/<$text text=<<filler>>/>/<$text text=<<A>>/>/<$text text=<<B>>/>
|
||||
</$parameters>
|
||||
<% endif %>
|
||||
\end elephant
|
||||
|
||||
-
|
||||
<<elephant ignore A:myA B:myB>>
|
||||
  
|
||||
<<elephant ignore myA myB>>
|
||||
|
||||
+
|
||||
title: Canary
|
||||
|
||||
no
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$action-setfield $tiddler="Canary" text="yes"/>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>-A/ignore/myA/ A/ignore/myA/</p>
|
||||
@@ -0,0 +1,30 @@
|
||||
title: Transclude/Parameterised/ConditionalParameters
|
||||
description: Parameterised transclusion with conditional parameters
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\procedure elephant(filler)
|
||||
\whitespace trim
|
||||
<% if [[no]match[yes]] %>
|
||||
<$parameters A=defaultA>
|
||||
A/<$text text=<<filler>>/>/<$text text=<<A>>/>/<$text text=<<B>>/>
|
||||
</$parameters>
|
||||
<% else %>
|
||||
<$parameters B=defaultB>
|
||||
B/<$text text=<<filler>>/>/<$text text=<<A>>/>/<$text text=<<B>>/>
|
||||
</$parameters>
|
||||
<% endif %>
|
||||
\end elephant
|
||||
\whitespace trim
|
||||
|
||||
-
|
||||
<<elephant ignore A:myA B:myB>>
|
||||
  
|
||||
<<elephant ignore myB not-used>>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>-B/ignore//myB B/ignore//myB</p>
|
||||
@@ -1,34 +0,0 @@
|
||||
title: Transclude/Parameterised/Depth
|
||||
description: Parameterised transclusion using the $depth attribute
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$transclude $tiddler='TiddlerOne' one='Ferret'/>
|
||||
|
|
||||
<$transclude $tiddler='TiddlerOne'/>
|
||||
|
|
||||
<$transclude $tiddler='TiddlerOne' one='Ferret' $$two="Osprey"/>
|
||||
|
|
||||
<$transclude $tiddler='TiddlerOne' $$two="Falcon"/>
|
||||
+
|
||||
title: TiddlerOne
|
||||
|
||||
\whitespace trim
|
||||
{{TiddlerTwo}}
|
||||
+
|
||||
title: TiddlerTwo
|
||||
|
||||
\whitespace trim
|
||||
<$parameters one='Jaguar' $$two='Piranha' $depth="2">
|
||||
<$text text=<<one>>/>:<$text text=<<$two>>/>
|
||||
</$parameters>
|
||||
<$parameters one='Leopard' $$two='Coelacanth'>
|
||||
(<$text text=<<one>>/>|<$text text=<<$two>>/>)
|
||||
</$parameters>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Ferret:Piranha(Leopard|Coelacanth)|Jaguar:Piranha(Leopard|Coelacanth)|Ferret:Osprey(Leopard|Coelacanth)|Jaguar:Falcon(Leopard|Coelacanth)</p>
|
||||
@@ -0,0 +1,38 @@
|
||||
title: Transclude/Parameterised/GenesisChangingCount
|
||||
description: Parameterised transclusion using genesis can handle refreshes that change number of parameters
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\procedure elephant(filler)
|
||||
\whitespace trim
|
||||
<$text text=<<filler>>/>-
|
||||
<$let args={{Canary}}>
|
||||
<$genesis $type=$parameters $names="[enlist<args>]" $values="[enlist<args>addsuffix[-default]]">
|
||||
<$text text=`($(argA)$-$(argB)$-$(argC)$)` />
|
||||
</$genesis>
|
||||
</$let>
|
||||
<$parameters other=other-default>
|
||||
-<$text text=<<other>>/>
|
||||
\end elephant
|
||||
|
||||
-
|
||||
<<elephant filler argA:myA argB:myB argC:myC other:myOther>>
|
||||
<<elephant filler myA myB myC myOther>>
|
||||
|
||||
+
|
||||
title: Canary
|
||||
|
||||
argA argB
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$action-setfield $tiddler="Canary" text="argA argB argC"/>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>-
|
||||
filler-(myA-myB-myC)-myOther
|
||||
filler-(myA-myB-myC)-myOther
|
||||
</p>
|
||||
@@ -0,0 +1,34 @@
|
||||
title: Transclude/Parameterised/GenesisChangingNames
|
||||
description: Parameterised transclusion using genesis can handle refreshes that change parameter names
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\procedure elephant(filler)
|
||||
\whitespace trim
|
||||
<$let name={{Canary}}>
|
||||
<$genesis $type=$parameters $names="[<name>]" $values="default">
|
||||
<$text text=<<First>>/>/<$text text=<<Second>>/>
|
||||
</$genesis>
|
||||
</$let>
|
||||
\end elephant
|
||||
\whitespace trim
|
||||
|
||||
-
|
||||
<<elephant ignore First:init Second:var>>
|
||||
-
|
||||
<<elephant ignore var>>
|
||||
|
||||
+
|
||||
title: Canary
|
||||
|
||||
First
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$action-setfield $tiddler="Canary" text="Second"/>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>-/var-/var</p>
|
||||
@@ -0,0 +1,44 @@
|
||||
title: Transclude/Parameterised/NestedParameters/Refreshed
|
||||
description: Parameterised transclusion with nested parameter widgets and a refresh cycle
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\procedure elephant(first:"one",second:"two")
|
||||
\whitespace trim
|
||||
\parameters (third:"three")
|
||||
<$let variable={{Canary}}>
|
||||
<$parameters fourth=four>
|
||||
<$text text=<<first>>/>/<$text text=<<second>>/>/<$text text=<<third>>/>/<$text text=<<fourth>>/>
|
||||
</$parameters>
|
||||
</$let>
|
||||
\end elephant
|
||||
|
||||
Begin
|
||||
<<elephant>>
|
||||
<<elephant "a" "b" "c" "d">>
|
||||
<<elephant second:named a c d>>
|
||||
<<elephant third:3rd second:2nd a d>>
|
||||
<<elephant fourth:4th>>
|
||||
<<elephant a fourth:4th>>
|
||||
|
||||
+
|
||||
title: Canary
|
||||
|
||||
Else
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$action-setfield $tiddler="Canary" text="Something"/>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Begin
|
||||
one/two/three/four
|
||||
a/b/c/d
|
||||
a/named/c/d
|
||||
a/2nd/3rd/d
|
||||
one/two/three/4th
|
||||
a/two/three/4th
|
||||
</p>
|
||||
@@ -0,0 +1,34 @@
|
||||
title: Transclude/Parameterised/NestedParameters
|
||||
description: Parameterised transclusion with nested parameter widgets
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\procedure elephant(first:"one",second:"two")
|
||||
\whitespace trim
|
||||
\parameters (third:"three")
|
||||
<$parameters fourth=four>
|
||||
<$text text=<<first>>/>/<$text text=<<second>>/>/<$text text=<<third>>/>/<$text text=<<fourth>>/>
|
||||
</$parameters>
|
||||
\end elephant
|
||||
|
||||
Begin
|
||||
<<elephant>>
|
||||
<<elephant "a" "b" "c" "d">>
|
||||
<<elephant second:named a c d>>
|
||||
<<elephant third:3rd second:2nd a d>>
|
||||
<<elephant fourth:4th>>
|
||||
<<elephant a fourth:4th>>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Begin
|
||||
one/two/three/four
|
||||
a/b/c/d
|
||||
a/named/c/d
|
||||
a/2nd/3rd/d
|
||||
one/two/three/4th
|
||||
a/two/three/4th
|
||||
</p>
|
||||
@@ -6,7 +6,7 @@ tags: [[$:/tags/wiki-test-spec]]
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$select tiddler='New Tiddler' field='text' default='Choose a new text' data-title={{Temp}} style.color={{{ [[Temp]get[color]] }}} onclick="clicked">
|
||||
<$select tiddler='New Tiddler' class="myclass" field='text' default='Choose a new text' data-title={{Temp}} style.color={{{ [[Temp]get[color]] }}} onclick="clicked">
|
||||
<option disabled>Choose a new text</option>
|
||||
<option>A Tale of Two Cities</option>
|
||||
<option>A New Kind of Science</option>
|
||||
@@ -24,4 +24,4 @@ Title1
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p><select data-title="Title2" value="Choose a new text" style="color:red;"><option disabled="true">Choose a new text</option><option>A Tale of Two Cities</option><option>A New Kind of Science</option><option>The Dice Man</option></select></p>
|
||||
<p><select class="myclass" data-title="Title2" value="Choose a new text" style="color:red;"><option disabled="true">Choose a new text</option><option>A Tale of Two Cities</option><option>A New Kind of Science</option><option>The Dice Man</option></select></p>
|
||||
@@ -24,7 +24,7 @@ The standard fields are:
|
||||
Other fields used by the core are:
|
||||
|
||||
|!Field Name |!Description |
|
||||
|`class` |<<lingo class>> |
|
||||
|`class` |<<.from-version "5.1.16">> <<lingo class>> |
|
||||
|`code-body` |<<.from-version "5.2.1">> <<lingo code-body>> |
|
||||
|`color` |<<lingo color>> |
|
||||
|`description` |<<lingo description>> |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
created: 20130822170200000
|
||||
list: [[A Gentle Guide to TiddlyWiki]] [[Discover TiddlyWiki]] [[Some of the things you can do with TiddlyWiki]] [[Ten reasons to switch to TiddlyWiki]] Examples [[What happened to the original TiddlyWiki?]]
|
||||
modified: 20231213080637781
|
||||
modified: 20231223102201587
|
||||
tags: TableOfContents
|
||||
title: HelloThere
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 102 KiB |
@@ -67,20 +67,8 @@ This is <<name>> demonstrates <<desc>>.
|
||||
<<myproc>>
|
||||
""">>
|
||||
|
||||
!! Caution in Using Positional Parameters
|
||||
Procedures are a shortcut syntax for the SetVariableWidget with an implicit ParametersWidget, so generally there is no reason to have multiple parameters widgets within a definition. In the below example when passing `x` to `myproc`, it will also be set to `a`:
|
||||
|
||||
<<wikitext-example-without-html
|
||||
src:"""\procedure myproc(x:10)
|
||||
\parameters (a:100, b:200)
|
||||
|
||||
x=<<x>>, a=<<a>>, b=<<b>>
|
||||
\end
|
||||
|
||||
<<myproc 50>>
|
||||
""">>
|
||||
|
||||
The reason for that result is clearer if we consider an equivalent with explicit parameters widgets.
|
||||
!! When Using Positional Parameters
|
||||
It is uncommon to require multiple parameters pragma in a definition, but if you do so, the positions for parameters are assigned sequentially in the order of discovery. In the below example, `a` is the second positional parameter, because it comes after `x`:
|
||||
|
||||
<$macrocall $name=wikitext-example-without-html
|
||||
src='<$let myprog="""
|
||||
@@ -89,16 +77,26 @@ src='<$let myprog="""
|
||||
|
||||
x=<<x>>, a=<<a>>, b=<<b>>
|
||||
""">
|
||||
<<myprog 50>>
|
||||
<<myprog 50 73>>
|
||||
</$let>'
|
||||
/>
|
||||
|
||||
This is because those two parameters widgets are entirely independent. They are both processed as if the other parameter widget is not there.
|
||||
This behavior is the same when parameters are defined in the procedure's declaration.
|
||||
|
||||
<<wikitext-example-without-html
|
||||
src:"""\procedure myproc(x:10)
|
||||
\parameters (a:100, b:200)
|
||||
|
||||
x=<<x>>, a=<<a>>, b=<<b>>
|
||||
\end
|
||||
|
||||
<<myproc 50 73>>
|
||||
""">>
|
||||
|
||||
This is because a procedures are a shortcut syntax for the <<.wlink SetWidget>> widget with an implicit <<.wlink ParametersWidget>> widget.
|
||||
|
||||
<<.tip "The positional parameters are only required when using the parameterised transclusion shortcut syntax, and that in other cases it is generally clearer to use named parameters.">>
|
||||
|
||||
To prevent such situation of above example, pass parameters by name as below.
|
||||
|
||||
<<wikitext-example-without-html
|
||||
src:"""\procedure myproc(x:10)
|
||||
\parameters (a:100, b:200)
|
||||
@@ -106,5 +104,5 @@ src:"""\procedure myproc(x:10)
|
||||
x=<<x>>, a=<<a>>, b=<<b>>
|
||||
\end
|
||||
|
||||
<<myproc x:50>>
|
||||
""">>
|
||||
<<myproc a:73>>
|
||||
""">>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
created: 20131109105400007
|
||||
modified: 20211117230125737
|
||||
modified: 20231220113054682
|
||||
tags: Releases BetaReleaseNotes
|
||||
title: BetaReleases
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Here are the details of the beta releases of TiddlyWiki5. See [[TiddlyWiki5 Versioning]] for details of how releases are named.
|
||||
|
||||
<<tabs "[tag[BetaReleaseNotes]!sort[created]]" "Release 5.0.18-beta" "$:/state/tab2" "tc-vertical" "ReleaseTemplate">>
|
||||
<<tabs "[tag[BetaReleaseNotes]!sort[created]] -[<currentTiddler>]" "Release 5.0.18-beta" "$:/state/tab2" "tc-vertical" "ReleaseTemplate">>
|
||||
|
||||
30
editions/tw5.com/tiddlers/releasenotes/Release 5.3.3.tid
Normal file
30
editions/tw5.com/tiddlers/releasenotes/Release 5.3.3.tid
Normal file
@@ -0,0 +1,30 @@
|
||||
caption: 5.3.3
|
||||
created: 20231223102201587
|
||||
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]]//
|
||||
|
||||
<<.banner-credits
|
||||
credit:"""Congratulations to [[catter-fly|https://talk.tiddlywiki.org/u/catter-fly]] for their winning design for the banner for this release (here is the [[competition thread|https://talk.tiddlywiki.org/t/banner-image-competition-for-v5-3-2/8569]]).
|
||||
"""
|
||||
url:"https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/5cb31b7adb0a6b226c0c215ddbed62e297ce89e1/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png"
|
||||
>>
|
||||
|
||||
This is a bug fix release to address a number of bugs that were introduced with [[Release 5.3.2]].
|
||||
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7903">> handling of a list widget with an empty paragraph as inline template
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7900">> broken per-tiddler previews
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7897">> missing comma before skinny tiddlers in JSON store area
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7895">> handling of whitespace immediately after pragmas
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7905">> SelectWidget handling of classes and rendering typo
|
||||
|
||||
Since v5.3.3 replaces v5.3.2 after only a couple of weeks, here is the release note for v5.3.2.
|
||||
|
||||
! Release Note for v5.3.2
|
||||
|
||||
{{Release 5.3.2}}
|
||||
@@ -1,9 +1,9 @@
|
||||
created: 20131109105400007
|
||||
modified: 20211117225858830
|
||||
modified: 20231220113044942
|
||||
tags: Releases AlphaReleaseNotes
|
||||
title: AlphaReleases
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Here are the details of the alpha releases of TiddlyWiki5. See [[TiddlyWiki5 Versioning]] for details of how releases are named.
|
||||
|
||||
<<tabs "[tag[AlphaReleaseNotes]!sort[created]]" "Release 5.0.1-alpha" "$:/state/tab2" "tc-vertical" "ReleaseTemplate">>
|
||||
<<tabs "[tag[AlphaReleaseNotes]!sort[created]] -[<currentTiddler>]" "Release 5.0.1-alpha" "$:/state/tab2" "tc-vertical" "ReleaseTemplate">>
|
||||
|
||||
@@ -13,17 +13,13 @@ There are shortcuts for common scenarios that can often make it unnecessary to u
|
||||
* the [[Pragma: \procedure]] for declaring procedure
|
||||
* the [[Pragma: \widget]] for declaring custom widgets
|
||||
|
||||
The <<.wlink ParametersWidget>> widget must be used directly in the following situations:
|
||||
|
||||
* When the default value of a parameter must be computed dynamically
|
||||
* When the `$depth` attribute is used to retrieve parameters from a parent transclusion (see below)
|
||||
The <<.wlink ParametersWidget>> widget must be used directly when the default value of a parameter must be computed dynamically.
|
||||
|
||||
! Content and Attributes
|
||||
|
||||
The content of the <<.wlink ParametersWidget>> widget is the scope within which the values of the parameters can be accessed as ordinary variables.
|
||||
|
||||
|!Attribute |!Description |
|
||||
|$depth |The index of the parent transclusion from which to obtain the parameters (defaults to 1). See below |
|
||||
|$parseMode |Optional name of a variable in which is made available the parse mode of the content of the parent transclusion (the parse mode can be "inline" or "block") |
|
||||
|$parseTreeNodes |Optional name of a variable in which is made available the JSON representation of the parse tree nodes contained within the parent transclusion |
|
||||
|$slotFillParseTreeNodes |Optional name of a variable in which is made available the JSON representation of the parse tree nodes corresponding to each fill widget contained within the parent transclusion (as an object where the keys are the slot names and the values are the parse tree nodes) |
|
||||
@@ -34,9 +30,6 @@ The content of the <<.wlink ParametersWidget>> widget is the scope within which
|
||||
|
||||
<<.note "Note the special treatment required for parameters names that start with a `$`; this can be avoided by using one of the pragmas">>
|
||||
|
||||
!! `$depth` Attribute
|
||||
|
||||
By default, the <<.wlink ParametersWidget>> widget retrieves parameters from the immediate parent transclusion. The `$depth` attribute permits access to the parameters of parent transclusions by specifying an index to the parent to be inspected ("1" is the immediate parent, "2" is the parent of that parent, etc.). This is useful in some situations where an intervening transclusion prevents immediate access to desired parameters.
|
||||
|
||||
!! `$parseMode`, `$parseTreeNodes`, `$slotFillParseTreeNodes` and `$params` Attributes
|
||||
|
||||
|
||||
@@ -60,6 +60,16 @@ This wiki text shows how to display a list within the scrollable widget:
|
||||
Set current scroll position to 100,100
|
||||
</$button>
|
||||
|
||||
<$button>
|
||||
<$action-setfield $tiddler="$:/my-scroll-position" scroll-top={{{ [{$:/my-scroll-position!!scroll-top}subtract[10]] }}}/>
|
||||
Scroll up by 10 pixels
|
||||
</$button>
|
||||
|
||||
<$button>
|
||||
<$action-setfield $tiddler="$:/my-scroll-position" scroll-top={{{ [{$:/my-scroll-position!!scroll-top}add[10]] }}}/>
|
||||
Scroll down by 10 pixels
|
||||
</$button>
|
||||
|
||||
<<wikitext-example-without-html "<$scrollable class='tc-scrollable-demo' bind='$:/my-scroll-position'>
|
||||
<$list filter='[tag[Reference]]'>
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@ In this simple form, parameters passed by position not by name. So the first val
|
||||
''Remarks''
|
||||
|
||||
# Passing parameter by name is good practice and is recommended for clarity. So for parameterized transclusions, the use of <<.wid transclude>> is recommended over simple form transclusion.
|
||||
# When passing parameters value by position, you cannot pass the second parameter while the first one has not been passed.
|
||||
|
||||
# However, if parameter values are passed by position, parameters get assigned sequentially based on the order <<.wlink ParametersWidget>> widgets are discovered.
|
||||
|
||||
''Example iv'': Here the <<.wlink ParametersWidget>> widget is used to declare a parameter whose default value is transcluded from another tiddler.
|
||||
|
||||
@@ -36,4 +35,17 @@ My name is <<name>> and my age is <<age>>.
|
||||
\end
|
||||
|
||||
<$transclude $variable="myproc" age="19"/>
|
||||
"""/>
|
||||
"""/>
|
||||
|
||||
''Example v'': Here the <<.wlink ParametersWidget>> widget is used in addition to other parameter declarations, because later parameters depend on the value of earlier parameters. Positional values are assigned sequentially.
|
||||
|
||||
<$macrocall $name=".example" n="5" eg="""\procedure myproc(age: 22)
|
||||
<$parameters acceptable-age={{{ [<age>divide[2]add[7]] }}} >
|
||||
If you're <<age>>, you can date a <<acceptable-age>>-year-old and it's not weird.
|
||||
</$parameters>
|
||||
\end
|
||||
|
||||
<<myproc>>
|
||||
<<myproc 30>>
|
||||
<<myproc 35 70>>
|
||||
""" />
|
||||
|
||||
@@ -5,6 +5,7 @@ author: 一个插件作者的姓名
|
||||
bag: 条目的来源集的名称
|
||||
caption: 显示于页签或按钮上的标题文字
|
||||
code-body: 若设置为 ''yes'',视图模板将以程式码形式显示条目
|
||||
class: 渲染条目时,套用到条目的 CSS 类别 - 请参阅[[依自订类别的自订样式|Custom styles by user-class]]。也适用于[[互动窗口|Modals]]
|
||||
color: 条目的 CSS 颜色值
|
||||
component: 负责[[提醒条目|AlertMechanism]]的组件名称
|
||||
core-version: 对于一个插件,表示与其兼容的 TiddlyWiki 版本
|
||||
|
||||
@@ -4,6 +4,7 @@ _canonical_uri: 外部圖片條目的完整的 URI
|
||||
author: 一個插件作者的姓名
|
||||
bag: 條目的來源集的名稱
|
||||
caption: 顯示於頁籤或按鈕上的標題文字
|
||||
class: 渲染條目時,套用到條目的 CSS 類別 - 請參閱[[依自訂類別的自訂樣式|Custom styles by user-class]]。也適用於[[互動視窗|Modals]]
|
||||
code-body: 若設定為 ''yes'',檢視範本將以程式碼形式顯示條目
|
||||
color: 條目的 CSS 顏色值
|
||||
component: 負責[[警示條目|AlertMechanism]]的元件名稱
|
||||
|
||||
2
license
2
license
@@ -1,7 +1,7 @@
|
||||
TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)
|
||||
|
||||
Copyright (c) 2004-2007, Jeremy Ruston
|
||||
Copyright (c) 2007-2023, UnaMesa Association
|
||||
Copyright (c) 2007-2024, UnaMesa Association
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tiddlywiki",
|
||||
"preferGlobal": "true",
|
||||
"version": "5.3.3-prerelease",
|
||||
"version": "5.3.4-prerelease",
|
||||
"author": "Jeremy Ruston <jeremy@jermolene.com>",
|
||||
"description": "a non-linear personal web notebook",
|
||||
"contributors": [
|
||||
|
||||
@@ -69,6 +69,15 @@ exports["text/vnd.tiddlywiki2-recipe"] = function(text,fields) {
|
||||
},
|
||||
sourcePath = fields.title; // Bit of a hack to take advantage of the default title being the path to the tiddler file
|
||||
processRecipe(sourcePath,text);
|
||||
// Add a $:/RecipeTiddlers tiddler with the titles of the loaded tiddlers in order
|
||||
var titles = [];
|
||||
$tw.utils.each(tiddlers,function(tiddler) {
|
||||
titles.push(tiddler.title);
|
||||
});
|
||||
tiddlers.push({
|
||||
title: "$:/RecipeTiddlers",
|
||||
list: $tw.utils.stringifyList(titles)
|
||||
});
|
||||
return tiddlers;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
title: $:/core/templates/tiddlywiki2.externaljs.template.html
|
||||
|
||||
{{{ [prefix[{prejs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [prefix[{js}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [prefix[{postjs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [prefix[{jsext}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{prejs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{js}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{postjs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{jsext}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
|
||||
|
||||
@@ -6,35 +6,35 @@ title: $:/core/templates/tiddlywiki2.template.html
|
||||
<head>
|
||||
<script id="versionArea" type="text/javascript">
|
||||
//<![CDATA[
|
||||
{{{ [prefix[{version}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{version}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
//]]>
|
||||
</script>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="copyright" content="
|
||||
{{{ [prefix[{copyright}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{copyright}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
" />
|
||||
<!--PRE-HEAD-START-->
|
||||
{{{ [prefix[{prehead}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{prehead}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
<!--PRE-HEAD-END-->
|
||||
<title>
|
||||
{{{ [prefix[{title}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{title}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
</title>
|
||||
<style id="styleArea" type="text/css">
|
||||
{{{ [prefix[{style}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{style}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
</style>
|
||||
<!--POST-HEAD-START-->
|
||||
{{{ [prefix[{posthead}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{posthead}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
<!--POST-HEAD-END-->
|
||||
</head>
|
||||
<body onload="main();" onunload="if(window.unload) unload();">
|
||||
<!--PRE-BODY-START-->
|
||||
{{{ [prefix[{prebody}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{prebody}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
<!--PRE-BODY-END-->
|
||||
<div id="copyright">
|
||||
Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jeremy Ruston, Copyright © 2007-2011 UnaMesa Association
|
||||
</div>
|
||||
<noscript>
|
||||
{{{ [prefix[{noscript}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{noscript}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
</noscript>
|
||||
<div id="saveTest"></div>
|
||||
<div id="backstageCloak"></div>
|
||||
@@ -46,39 +46,39 @@ Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jerem
|
||||
<div id="contentWrapper"></div>
|
||||
<div id="contentStash"></div>
|
||||
<div id="shadowArea">
|
||||
{{{ [prefix[{shadow}]] +[sortcs[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{shadow}]] +[sortcs[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}}
|
||||
</div>
|
||||
<!--POST-SHADOWAREA-->
|
||||
<div id="storeArea">
|
||||
{{{ [prefix[{tiddler}]] +[sortcs[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}}
|
||||
{{{ [prefix[{plugin}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [prefix[{posttiddlers}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{tiddler}]] +[sortcs[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{plugin}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{posttiddlers}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
</div>
|
||||
<!--POST-STOREAREA-->
|
||||
<!--POST-BODY-START-->
|
||||
{{{ [prefix[{postbody}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{postbody}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
<!--POST-BODY-END-->
|
||||
<script id="jsArea" type="text/javascript">
|
||||
//<![CDATA[
|
||||
{{{ [prefix[{prejs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [prefix[{js}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [prefix[{postjs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{prejs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{js}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{postjs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
//]]>
|
||||
</script>
|
||||
{{{ [prefix[{jsext}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{jsext}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
<script id="jsdeprecatedArea" type="text/javascript">
|
||||
//<![CDATA[
|
||||
{{{ [prefix[{jsdeprecated}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{jsdeprecated}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
//]]>
|
||||
</script>
|
||||
<script id="jslibArea" type="text/javascript">
|
||||
//<![CDATA[
|
||||
{{{ [prefix[{jslib}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{jslib}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
//]]>
|
||||
</script>
|
||||
<script id="jqueryArea" type="text/javascript">
|
||||
//<![CDATA[
|
||||
{{{ [prefix[{jquery}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{jquery}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}}
|
||||
//]]>
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
@@ -88,7 +88,7 @@ if(useJavaSaver)
|
||||
//]]>
|
||||
</script>
|
||||
<!--POST-SCRIPT-START-->
|
||||
{{{ [prefix[{postscript}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [list[$:/RecipeTiddlers]prefix[{postscript}]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
<!--POST-SCRIPT-END-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
title: $:/core/templates/html-json-skinny-tiddler
|
||||
|
||||
<$jsontiddler tiddler=<<currentTiddler>> exclude="text" escapeUnsafeScriptChars="yes" $revision=<<changecount>> $bag="default" $_is_skinny=""/>
|
||||
<$text text=<<join>>/><$jsontiddler tiddler=<<currentTiddler>> exclude="text" escapeUnsafeScriptChars="yes" $revision=<<changecount>> $bag="default" $_is_skinny=""/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<p>Welcome to <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a>, a non-linear personal web notebook that anyone can use and keep forever, independently of any corporation.</p><p><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> is a complete interactive wiki in <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/JavaScript.html">JavaScript</a>. It can be used as a single HTML file in the browser or as a powerful Node.js application. It is highly customisable: the entire user interface is itself implemented in hackable <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/WikiText.html">WikiText</a>.</p><p>Learn more and see it in action at <a class="tc-tiddlylink-external" href="https://tiddlywiki.com/" rel="noopener noreferrer" target="_blank">https://tiddlywiki.com/</a></p><p>Developer documentation is in progress at <a class="tc-tiddlylink-external" href="https://tiddlywiki.com/dev/" rel="noopener noreferrer" target="_blank">https://tiddlywiki.com/dev/</a></p><h1 class="">Join the Community</h1><p>
|
||||
<h2 class="">Official Forums</h2><p>The new official forum for talking about TiddlyWiki: requests for help, announcements of new releases and plugins, debating new features, or just sharing experiences. You can participate via the associated website, or subscribe via email.</p><p><a class="tc-tiddlylink-external" href="https://talk.tiddlywiki.org/" rel="noopener noreferrer" target="_blank">https://talk.tiddlywiki.org/</a></p><p>Note that talk.tiddlywiki.org is a community run service that we host and maintain ourselves. The modest running costs are covered by community contributions.</p><p>For the convenience of existing users, we also continue to operate the original TiddlyWiki group (hosted on Google Groups since 2005):</p><p><a class="tc-tiddlylink-external" href="https://groups.google.com/group/TiddlyWiki" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/TiddlyWiki</a></p><h2 class="">Developer Forums</h2><p>There are several resources for developers to learn more about <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> and to discuss and contribute to its development.</p><ul><li><a class="tc-tiddlylink-external" href="https://tiddlywiki.com/dev" rel="noopener noreferrer" target="_blank">tiddlywiki.com/dev</a> is the official developer documentation</li><li>Get involved in the <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5" rel="noopener noreferrer" target="_blank">development on GitHub</a><ul><li><a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/discussions" rel="noopener noreferrer" target="_blank">Discussions</a> are for Q&A and open-ended discussion</li><li><a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/issues" rel="noopener noreferrer" target="_blank">Issues</a> are for raising bug reports and proposing specific, actionable new ideas</li></ul></li><li>The older TiddlyWikiDev Google Group is now closed in favour of <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/discussions" rel="noopener noreferrer" target="_blank">GitHub Discussions</a> but remains a useful archive: <a class="tc-tiddlylink-external" href="https://groups.google.com/group/TiddlyWikiDev" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/TiddlyWikiDev</a><ul><li>An enhanced group search facility is available on <a class="tc-tiddlylink-external" href="https://www.mail-archive.com/tiddlywikidev@googlegroups.com/" rel="noopener noreferrer" target="_blank">mail-archive.com</a></li></ul></li><li>Follow <a class="tc-tiddlylink-external" href="http://twitter.com/#!/TiddlyWiki" rel="noopener noreferrer" target="_blank">@TiddlyWiki on Twitter</a> for the latest news</li><li>Chat at <a class="tc-tiddlylink-external" href="https://gitter.im/TiddlyWiki/public" rel="noopener noreferrer" target="_blank">https://gitter.im/TiddlyWiki/public</a> (development room coming soon)</li></ul><h2 class="">Other Forums</h2><ul><li><a class="tc-tiddlylink-external" href="https://www.reddit.com/r/TiddlyWiki5/" rel="noopener noreferrer" target="_blank">TiddlyWiki Subreddit</a></li><li>Chat with Gitter at <a class="tc-tiddlylink-external" href="https://gitter.im/TiddlyWiki/public" rel="noopener noreferrer" target="_blank">https://gitter.im/TiddlyWiki/public</a> !</li><li>Chat on Discord at <a class="tc-tiddlylink-external" href="https://discord.gg/HFFZVQ8" rel="noopener noreferrer" target="_blank">https://discord.gg/HFFZVQ8</a></li></ul><h3 class="">Documentation</h3><p>There is also a discussion group specifically for discussing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> documentation improvement initiatives: <a class="tc-tiddlylink-external" href="https://groups.google.com/group/tiddlywikidocs" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/tiddlywikidocs</a>
|
||||
</p>
|
||||
</p><h1 class="">Installing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on Node.js</h1><ol><li>Install <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Node.js.html">Node.js</a><ul><li>Linux: <blockquote><div><em>Debian/Ubuntu</em>:<br><code>apt install nodejs</code><br>May need to be followed up by:<br><code>apt install npm</code></div><div><em>Arch Linux</em><br><code>yay -S tiddlywiki</code> <br>(installs node and tiddlywiki)</div></blockquote></li><li>Mac<blockquote><div><code>brew install node</code></div></blockquote></li><li>Android<blockquote><div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Serving%2520TW5%2520from%2520Android.html">Termux for Android</a></div></blockquote></li><li>Other <blockquote><div>See <a class="tc-tiddlylink-external" href="http://nodejs.org" rel="noopener noreferrer" target="_blank">http://nodejs.org</a></div></blockquote></li></ul></li><li>Open a command line terminal and type:<blockquote><div><code>npm install -g tiddlywiki</code></div><div>If it fails with an error you may need to re-run the command as an administrator:</div><div><code>sudo npm install -g tiddlywiki</code> (Mac/Linux)</div></blockquote></li><li>Ensure TiddlyWiki is installed by typing:<blockquote><div><code>tiddlywiki --version</code></div></blockquote><ul><li>In response, you should see <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> report its current version (eg "5.3.2". You may also see other debugging information reported.)</li></ul></li><li>Try it out:<ol><li><code>tiddlywiki mynewwiki --init server</code> to create a folder for a new wiki that includes server-related components</li><li><code>tiddlywiki mynewwiki --listen</code> to start <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a></li><li>Visit <a class="tc-tiddlylink-external" href="http://127.0.0.1:8080/" rel="noopener noreferrer" target="_blank">http://127.0.0.1:8080/</a> in your browser</li><li>Try editing and creating tiddlers</li></ol></li><li>Optionally, make an offline copy:<ul><li>click the <span class="doc-icon"><svg class="tc-image-save-button-dynamic tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt">
|
||||
</p><h1 class="">Installing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on Node.js</h1><ol><li>Install <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Node.js.html">Node.js</a><ul><li>Linux: <blockquote><div><em>Debian/Ubuntu</em>:<br><code>apt install nodejs</code><br>May need to be followed up by:<br><code>apt install npm</code></div><div><em>Arch Linux</em><br><code>yay -S tiddlywiki</code> <br>(installs node and tiddlywiki)</div></blockquote></li><li>Mac<blockquote><div><code>brew install node</code></div></blockquote></li><li>Android<blockquote><div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Serving%2520TW5%2520from%2520Android.html">Termux for Android</a></div></blockquote></li><li>Other <blockquote><div>See <a class="tc-tiddlylink-external" href="http://nodejs.org" rel="noopener noreferrer" target="_blank">http://nodejs.org</a></div></blockquote></li></ul></li><li>Open a command line terminal and type:<blockquote><div><code>npm install -g tiddlywiki</code></div><div>If it fails with an error you may need to re-run the command as an administrator:</div><div><code>sudo npm install -g tiddlywiki</code> (Mac/Linux)</div></blockquote></li><li>Ensure TiddlyWiki is installed by typing:<blockquote><div><code>tiddlywiki --version</code></div></blockquote><ul><li>In response, you should see <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> report its current version (eg "5.3.3". You may also see other debugging information reported.)</li></ul></li><li>Try it out:<ol><li><code>tiddlywiki mynewwiki --init server</code> to create a folder for a new wiki that includes server-related components</li><li><code>tiddlywiki mynewwiki --listen</code> to start <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a></li><li>Visit <a class="tc-tiddlylink-external" href="http://127.0.0.1:8080/" rel="noopener noreferrer" target="_blank">http://127.0.0.1:8080/</a> in your browser</li><li>Try editing and creating tiddlers</li></ol></li><li>Optionally, make an offline copy:<ul><li>click the <span class="doc-icon"><svg class="tc-image-save-button-dynamic tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt">
|
||||
<g class="tc-image-save-button-dynamic-clean">
|
||||
<path d="M120.783 34.33c4.641 8.862 7.266 18.948 7.266 29.646 0 35.347-28.653 64-64 64-35.346 0-64-28.653-64-64 0-35.346 28.654-64 64-64 18.808 0 35.72 8.113 47.43 21.03l2.68-2.68c3.13-3.13 8.197-3.132 11.321-.008 3.118 3.118 3.121 8.193-.007 11.32l-4.69 4.691zm-12.058 12.058a47.876 47.876 0 013.324 17.588c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48c14.39 0 27.3 6.332 36.098 16.362L58.941 73.544 41.976 56.578c-3.127-3.127-8.201-3.123-11.32-.005-3.123 3.124-3.119 8.194.006 11.319l22.617 22.617a7.992 7.992 0 005.659 2.347c2.05 0 4.101-.783 5.667-2.349l44.12-44.12z" fill-rule="evenodd"></path>
|
||||
</g>
|
||||
|
||||
@@ -1589,7 +1589,7 @@ html body.tc-body.tc-single-tiddler-window {
|
||||
grid-template-areas:
|
||||
"toolbar toolbar"
|
||||
"editor preview";
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-columns: repeat(2, minmax(0px, 1fr));
|
||||
grid-template-rows: auto 1fr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user