diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 1e644e161..286a842bc 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -21,7 +21,7 @@ body:
attributes:
label: To Reproduce
description: "Steps to reproduce the behavior:"
- value: |
+ placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
@@ -41,7 +41,7 @@ body:
attributes:
label: TiddlyWiki Configuration
description: please complete the following information
- value: |
+ placeholder: |
- Version [e.g. v5.1.24]
- Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc]
- Plugins installed [e.g. Freelinks, TiddlyMap]
diff --git a/bin/readme-bld.sh b/bin/readme-bld.sh
index 198c3abd0..e7c9df564 100755
--- a/bin/readme-bld.sh
+++ b/bin/readme-bld.sh
@@ -15,3 +15,11 @@ node $TW5_BUILD_TIDDLYWIKI \
--output . \
--build readmes \
|| exit 1
+
+# tw.org readmes
+node $TW5_BUILD_TIDDLYWIKI \
+ editions/tw.org \
+ --verbose \
+ --output . \
+ --build readmes \
+ || exit 1
diff --git a/code-of-conduct.md b/code-of-conduct.md
new file mode 100644
index 000000000..e8e7664a7
--- /dev/null
+++ b/code-of-conduct.md
@@ -0,0 +1 @@
+
This community exists because TiddlyWiki is more useful when people share and work together.
This community is a beautiful but fragile thing: a collection of diverse people from all over the planet, united in their interest in the project, and their commitment to helping one another achieve and learn more.
We try to make the community as broad and welcoming as possible by remembering some basic principles of culture and behaviour.
These principles guide technical and non-technical decisions, and help contributors and leaders support our project and community.
We are optimistic and hopeful
We aim to foster a learning environment that is collaborative and safe for everyone
We recognise that the motivation for sharing and helping is usually for appreciation, and not financial gain, and so we take care to acknowledge and thank the people who enrich the community by sharing what they have created
While we are united in our interest in TiddlyWiki, we differ in every other conceivable way. We choose to focus on what unites us, and avoid unnecessarily mixing contentious topics like religion and politics
We treat each other with respect, and start with the assumption that others are acting in good faith
We avoid discriminatory language
We try to use our strength as a community to help others
We avoid responding when angry or upset because we try to de-escalate conflict
We make sure we critique ideas, not people
When we disagree with others we do so graciously, and treat others with dignity and respoect
We do not tolerate intolerance towards others
We seek first to understand others, and then to be understood
We have fun
Our discussions are in English. It is not the first language of many people in the community, nor do we all share the same cultural background and reference points. So we take care to use language that is clear and unambigous, and avoid cultural references or jokes that will not be widely understood.
It is not acceptable to make jokes or other comments that discriminate by race, gender, sexuality, or other protected characteristic.
As an inclusive community, we are committed to making sure that TiddlyWiki is an accessible tool that understands the needs of people with disabilities.
\ No newline at end of file
diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids
index 772949c0d..a1b164c5c 100644
--- a/core/language/en-GB/ControlPanel.multids
+++ b/core/language/en-GB/ControlPanel.multids
@@ -198,6 +198,12 @@ Settings/TitleLinks/Yes/Description: Display tiddler titles as links
Settings/MissingLinks/Caption: Wiki Links
Settings/MissingLinks/Hint: Choose whether to link to tiddlers that do not exist yet
Settings/MissingLinks/Description: Enable links to missing tiddlers
+SocialCard/Caption: Social Media Card
+SocialCard/Domain/Prompt: Domain name to display for the link (for example, ''tiddlywiki.com'')
+SocialCard/Hint: This information is used by social and messaging services to display a preview card for links to this TiddlyWiki when hosted online
+SocialCard/PreviewUrl/Prompt: Full URL to preview image for this TiddlyWiki
+SocialCard/PreviewUrl/Preview: Preview image:
+SocialCard/Url/Prompt: Full URL of this TiddlyWiki
StoryTiddler/Caption: Story Tiddler
StoryTiddler/Hint: This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river.
StoryView/Caption: Story View
diff --git a/core/modules/commands/render.js b/core/modules/commands/render.js
index b396deef9..bd8b23171 100644
--- a/core/modules/commands/render.js
+++ b/core/modules/commands/render.js
@@ -45,17 +45,22 @@ Render individual tiddlers and save the results to the specified files
variableList = variableList.slice(2);
}
$tw.utils.each(tiddlers,function(title) {
- var filepath = path.resolve(self.commander.outputPath,wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]))[0]);
- if(self.commander.verbose) {
- console.log("Rendering \"" + title + "\" to \"" + filepath + "\"");
+ var filenameResults = wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]));
+ if(filenameResults.length > 0) {
+ var filepath = path.resolve(self.commander.outputPath,filenameResults[0]);
+ if(self.commander.verbose) {
+ console.log("Rendering \"" + title + "\" to \"" + filepath + "\"");
+ }
+ var parser = wiki.parseTiddler(template || title),
+ widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}),
+ container = $tw.fakeDocument.createElement("div");
+ widgetNode.render(container,null);
+ var text = type === "text/html" ? container.innerHTML : container.textContent;
+ $tw.utils.createFileDirectories(filepath);
+ fs.writeFileSync(filepath,text,"utf8");
+ } else {
+ console.log("Not rendering \"" + title + "\" because the filename filter returned an empty result");
}
- var parser = wiki.parseTiddler(template || title),
- widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}),
- container = $tw.fakeDocument.createElement("div");
- widgetNode.render(container,null);
- var text = type === "text/html" ? container.innerHTML : container.textContent;
- $tw.utils.createFileDirectories(filepath);
- fs.writeFileSync(filepath,text,"utf8");
});
return null;
};
diff --git a/core/modules/parsers/wikiparser/rules/table.js b/core/modules/parsers/wikiparser/rules/table.js
index 9b730922d..68811efc0 100644
--- a/core/modules/parsers/wikiparser/rules/table.js
+++ b/core/modules/parsers/wikiparser/rules/table.js
@@ -93,11 +93,12 @@ var processRow = function(prevColumns) {
}
// Check whether this is a heading cell
var cell;
+ var start = this.parser.pos;
if(chr === "!") {
this.parser.pos++;
- cell = {type: "element", tag: "th", children: []};
+ cell = {type: "element", tag: "th", start: start, children: []};
} else {
- cell = {type: "element", tag: "td", children: []};
+ cell = {type: "element", tag: "td", start: start, children: []};
}
tree.push(cell);
// Record information about this cell
@@ -121,6 +122,7 @@ var processRow = function(prevColumns) {
}
// Move back to the closing `|`
this.parser.pos--;
+ cell.end = this.parser.pos;
}
col++;
cellRegExp.lastIndex = this.parser.pos;
@@ -169,12 +171,13 @@ exports.parse = function() {
rowContainer.children = this.parser.parseInlineRun(rowTermRegExp,{eatTerminator: true});
} else {
// Create the row
- var theRow = {type: "element", tag: "tr", children: []};
+ var theRow = {type: "element", tag: "tr", children: [], start: rowMatch.index};
$tw.utils.addClassToParseTreeNode(theRow,rowCount%2 ? "oddRow" : "evenRow");
rowContainer.children.push(theRow);
// Process the row
theRow.children = processRow.call(this,prevColumns);
this.parser.pos = rowMatch.index + rowMatch[0].length;
+ theRow.end = this.parser.pos;
// Increment the row count
rowCount++;
}
diff --git a/core/modules/utils/transliterate.js b/core/modules/utils/transliterate.js
index 4e91de234..ce1cbeddb 100644
--- a/core/modules/utils/transliterate.js
+++ b/core/modules/utils/transliterate.js
@@ -924,7 +924,7 @@ exports.transliterate = function(str) {
};
exports.transliterateToSafeASCII = function(str) {
- return str.replace(/[^\x00-\x7F]/g,function(ch) {
+ return str.replace(/[^\x20-\x7F]/g,function(ch) {
return exports.transliterationPairs[ch] || ""
});
};
diff --git a/core/palettes/Blanca.tid b/core/palettes/Blanca.tid
index 0fd8e2da3..7a6e7d97b 100644
--- a/core/palettes/Blanca.tid
+++ b/core/palettes/Blanca.tid
@@ -33,6 +33,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
+footnote-target-background: #ecf2ff
foreground: #333333
highlight-background: #ffff00
highlight-foreground: #000000
diff --git a/core/palettes/Blue.tid b/core/palettes/Blue.tid
index cc3846b50..b5bdecb8a 100644
--- a/core/palettes/Blue.tid
+++ b/core/palettes/Blue.tid
@@ -33,6 +33,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
+footnote-target-background: #ecf2ff
foreground: #333353
highlight-background: #ffff00
highlight-foreground: #000000
diff --git a/core/palettes/BrightMute.tid b/core/palettes/BrightMute.tid
index ddbd6b3cd..2762a995d 100644
--- a/core/palettes/BrightMute.tid
+++ b/core/palettes/BrightMute.tid
@@ -33,6 +33,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
+footnote-target-background: #ecf2ff
foreground: #333333
highlight-background: #ffff00
highlight-foreground: #000000
diff --git a/core/palettes/ContrastDark.tid b/core/palettes/ContrastDark.tid
index 850a5863b..67552b30e 100644
--- a/core/palettes/ContrastDark.tid
+++ b/core/palettes/ContrastDark.tid
@@ -1,7 +1,7 @@
-title: $:/palettes/ContrastLight
-name: Contrast (Light)
-color-scheme: light
-description: High contrast and unambiguous (light version)
+title: $:/palettes/ContrastDark
+name: Contrast (Dark)
+color-scheme: dark
+description: High contrast and unambiguous (dark version)
tags: $:/tags/Palette
type: application/x-tiddler-dictionary
@@ -9,7 +9,7 @@ alert-background: #f00
alert-border: <>
alert-highlight: <>
alert-muted-foreground: #800
-background: #fff
+background: #000
blockquote-bar: <>
button-background: <>
button-foreground: <>
@@ -33,7 +33,8 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #00a
external-link-foreground: #00e
-foreground: #000
+footnote-target-background: #4c4c4c
+foreground: #fff
highlight-background: #ffff00
highlight-foreground: #000000
message-background: <>
@@ -82,8 +83,8 @@ tab-foreground: <>
table-border: #dddddd
table-footer-background: #a8a8a8
table-header-background: #f0f0f0
-tag-background: #000
-tag-foreground: #fff
+tag-background: #fff
+tag-foreground: #000
tiddler-background: <>
tiddler-border: <>
tiddler-controls-foreground-hover: #ddd
diff --git a/core/palettes/ContrastLight.tid b/core/palettes/ContrastLight.tid
index ade9f43f8..a10a1b8eb 100644
--- a/core/palettes/ContrastLight.tid
+++ b/core/palettes/ContrastLight.tid
@@ -1,7 +1,7 @@
-title: $:/palettes/ContrastDark
-name: Contrast (Dark)
-color-scheme: dark
-description: High contrast and unambiguous (dark version)
+title: $:/palettes/ContrastLight
+name: Contrast (Light)
+color-scheme: light
+description: High contrast and unambiguous (light version)
tags: $:/tags/Palette
type: application/x-tiddler-dictionary
@@ -9,7 +9,7 @@ alert-background: #f00
alert-border: <>
alert-highlight: <>
alert-muted-foreground: #800
-background: #000
+background: #fff
blockquote-bar: <>
button-background: <>
button-foreground: <>
@@ -33,7 +33,8 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #00a
external-link-foreground: #00e
-foreground: #fff
+footnote-target-background: #e5e5e5
+foreground: #000
highlight-background: #ffff00
highlight-foreground: #000000
message-background: <>
@@ -82,8 +83,8 @@ tab-foreground: <>
table-border: #dddddd
table-footer-background: #a8a8a8
table-header-background: #f0f0f0
-tag-background: #fff
-tag-foreground: #000
+tag-background: #000
+tag-foreground: #fff
tiddler-background: <>
tiddler-border: <>
tiddler-controls-foreground-hover: #ddd
diff --git a/core/palettes/CupertinoDark.tid b/core/palettes/CupertinoDark.tid
index 7f08f4100..f13fc1e16 100644
--- a/core/palettes/CupertinoDark.tid
+++ b/core/palettes/CupertinoDark.tid
@@ -31,6 +31,7 @@ external-link-background: transparent
external-link-foreground-hover:
external-link-foreground-visited: #BF5AF2
external-link-foreground: #32D74B
+footnote-target-background: #747474
foreground: #FFFFFF
highlight-background: #ffff78
highlight-foreground: #000000
diff --git a/core/palettes/DarkPhotos.tid b/core/palettes/DarkPhotos.tid
index 71fa40f2f..5d086fc27 100644
--- a/core/palettes/DarkPhotos.tid
+++ b/core/palettes/DarkPhotos.tid
@@ -35,6 +35,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
+footnote-target-background: #ecf2ff
foreground: #333333
highlight-background: #ffff00
highlight-foreground: #000000
diff --git a/core/palettes/DesertSand.tid b/core/palettes/DesertSand.tid
index ddce80e27..12b06c948 100644
--- a/core/palettes/DesertSand.tid
+++ b/core/palettes/DesertSand.tid
@@ -39,6 +39,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #313163
external-link-foreground: #555592
+footnote-target-background: #fff7d9
foreground: #2D2A23
highlight-background: #ffff00
highlight-foreground: #000000
diff --git a/core/palettes/GruvBoxDark.tid b/core/palettes/GruvBoxDark.tid
index 6c3fa6a73..e839fd7b4 100644
--- a/core/palettes/GruvBoxDark.tid
+++ b/core/palettes/GruvBoxDark.tid
@@ -40,6 +40,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #d3869b
external-link-foreground: #8ec07c
+footnote-target-background: #665c54
foreground: #fbf1c7
highlight-background: #ffff79
highlight-foreground: #000000
diff --git a/core/palettes/Nord.tid b/core/palettes/Nord.tid
index e8e280998..5f18dce3f 100644
--- a/core/palettes/Nord.tid
+++ b/core/palettes/Nord.tid
@@ -40,6 +40,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #5E81AC
external-link-foreground: #8FBCBB
+footnote-target-background: #2E3440
foreground: #d8dee9
highlight-background: #ffff78
highlight-foreground: #000000
diff --git a/core/palettes/Rocker.tid b/core/palettes/Rocker.tid
index a91cd1b5f..c6693eb52 100644
--- a/core/palettes/Rocker.tid
+++ b/core/palettes/Rocker.tid
@@ -33,6 +33,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
+footnote-target-background: #ecf2ff
foreground: #333333
highlight-background: #ffff00
highlight-foreground: #000000
diff --git a/core/palettes/SolarFlare.tid b/core/palettes/SolarFlare.tid
index 4d81bf531..932256665 100644
--- a/core/palettes/SolarFlare.tid
+++ b/core/palettes/SolarFlare.tid
@@ -131,6 +131,7 @@ external-link-background-hover: inherit
external-link-background-visited: inherit
external-link-background: inherit
external-link-foreground-hover: inherit
+footnote-target-background: #ded8c5
highlight-background: #ffff00
highlight-foreground: #000000
message-border: #cfd6e6
diff --git a/core/palettes/SolarizedDark.tid b/core/palettes/SolarizedDark.tid
index bacd385b2..326f6a4fb 100644
--- a/core/palettes/SolarizedDark.tid
+++ b/core/palettes/SolarizedDark.tid
@@ -34,6 +34,7 @@ external-link-background-visited: inherit
external-link-foreground: #268bd2
external-link-foreground-hover:
external-link-foreground-visited: #268bd2
+footnote-target-background: #073642
foreground: #839496
highlight-background: #ffff78
highlight-foreground: #000000
diff --git a/core/palettes/SolarizedLight.tid b/core/palettes/SolarizedLight.tid
index 5d8757386..28ce1c7c2 100644
--- a/core/palettes/SolarizedLight.tid
+++ b/core/palettes/SolarizedLight.tid
@@ -34,6 +34,7 @@ external-link-background-visited: inherit
external-link-foreground: #268bd2
external-link-foreground-hover: inherit
external-link-foreground-visited: #268bd2
+footnote-target-background: #eee8d5
foreground: #657b83
highlight-background: #ffff00
highlight-foreground: #000000
diff --git a/core/palettes/SpartanDay.tid b/core/palettes/SpartanDay.tid
index cc197144e..505427d33 100644
--- a/core/palettes/SpartanDay.tid
+++ b/core/palettes/SpartanDay.tid
@@ -33,6 +33,7 @@ external-link-background: transparent
external-link-foreground-hover:
external-link-foreground-visited:
external-link-foreground:
+footnote-target-background: #ececec
foreground: rgba(0, 0, 0, 0.87)
highlight-background: #ffff00
highlight-foreground: #000000
diff --git a/core/palettes/SpartanNight.tid b/core/palettes/SpartanNight.tid
index dc47a0774..b36ecb526 100644
--- a/core/palettes/SpartanNight.tid
+++ b/core/palettes/SpartanNight.tid
@@ -33,6 +33,7 @@ external-link-background: transparent
external-link-foreground-hover:
external-link-foreground-visited: #7c318c
external-link-foreground: #9e3eb3
+footnote-target-background: #494949
foreground: rgba(255, 255, 255, 0.7)
highlight-background: #ffff78
highlight-foreground: #000000
diff --git a/core/palettes/Twilight.tid b/core/palettes/Twilight.tid
index 4c127f822..1cd8efab1 100644
--- a/core/palettes/Twilight.tid
+++ b/core/palettes/Twilight.tid
@@ -42,6 +42,7 @@ external-link-background-visited: inherit
external-link-foreground: rgb(179, 179, 255)
external-link-foreground-hover: inherit
external-link-foreground-visited: rgb(153, 153, 255)
+footnote-target-background: <>
foreground: rgb(179, 179, 179)
highlight-background: #ffff78
highlight-foreground: #000000
diff --git a/core/palettes/Vanilla.tid b/core/palettes/Vanilla.tid
index 067f32519..76307acee 100644
--- a/core/palettes/Vanilla.tid
+++ b/core/palettes/Vanilla.tid
@@ -41,6 +41,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
+footnote-target-background: #ecf2ff
foreground: #333333
highlight-background: #ffff00
highlight-foreground: #000000
diff --git a/core/templates/social-metadata.tid b/core/templates/social-metadata.tid
new file mode 100644
index 000000000..6f9dc11bc
--- /dev/null
+++ b/core/templates/social-metadata.tid
@@ -0,0 +1,38 @@
+title: $:/core/templates/social-metadata
+tags: $:/tags/RawMarkupWikified
+
+\procedure meta-plain(name,source,name-attribute:"name")
+\whitespace trim
+<%if [