mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-20 16:42:02 +00:00
Compare commits
194
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ede512e07f | ||
|
|
213a786632 | ||
|
|
a6ffcc1341 | ||
|
|
885faf964b | ||
|
|
fd40741a03 | ||
|
|
8f027758c4 | ||
|
|
d9ac4a823f | ||
|
|
ac286dac82 | ||
|
|
c5c7279554 | ||
|
|
2bc7ec4b94 | ||
|
|
77335a42b5 | ||
|
|
57d3e8e765 | ||
|
|
5c43512a56 | ||
|
|
39bd45002e | ||
|
|
22286aa569 | ||
|
|
ada5af5af4 | ||
|
|
8735d1ac93 | ||
|
|
9d21071200 | ||
|
|
27f3de2f88 | ||
|
|
d2302df197 | ||
|
|
165c7e9825 | ||
|
|
ea8e805e1c | ||
|
|
c412ea52da | ||
|
|
561580f1b8 | ||
|
|
f294270701 | ||
|
|
e80c99791e | ||
|
|
5794718047 | ||
|
|
bde20b0d93 | ||
|
|
6c0689a451 | ||
|
|
685d831cb1 | ||
|
|
95863ae97b | ||
|
|
bb9c64b38e | ||
|
|
b452a1ee00 | ||
|
|
82bf4480de | ||
|
|
6002235db7 | ||
|
|
b4597e7b1e | ||
|
|
189b6016b6 | ||
|
|
4d8932a836 | ||
|
|
a620a6cc00 | ||
|
|
43b937d350 | ||
|
|
cbfe6b6c18 | ||
|
|
8e8d5060e5 | ||
|
|
886514aa52 | ||
|
|
c175992949 | ||
|
|
9069992163 | ||
|
|
7a60e7c93e | ||
|
|
be22951973 | ||
|
|
6f8df68b28 | ||
|
|
b1cd1306ef | ||
|
|
acb2602d78 | ||
|
|
0c9d61d4a3 | ||
|
|
2aec57213d | ||
|
|
995f3babce | ||
|
|
a27824af7e | ||
|
|
98df1c58e3 | ||
|
|
b8ed59f7dc | ||
|
|
adfb69a68c | ||
|
|
b5200483a1 | ||
|
|
7c35ada55d | ||
|
|
3d2e6e4895 | ||
|
|
bfb9c38c42 | ||
|
|
b48be91ec5 | ||
|
|
bd936e2b7d | ||
|
|
4f3f09d223 | ||
|
|
2a8d664c09 | ||
|
|
da8b213be5 | ||
|
|
a4649490de | ||
|
|
67e7fa4b74 | ||
|
|
fcb28df82c | ||
|
|
e4041866e8 | ||
|
|
da72ee9da1 | ||
|
|
a3a9fd3931 | ||
|
|
bfd06198fb | ||
|
|
da697f1a5b | ||
|
|
64eb1be708 | ||
|
|
7e16424f44 | ||
|
|
4a907b85ae | ||
|
|
8f4bdce534 | ||
|
|
7e2b035803 | ||
|
|
68d13601df | ||
|
|
c0f4bc3698 | ||
|
|
62d01239e4 | ||
|
|
7e2a4bd9e1 | ||
|
|
a2426b5ed9 | ||
|
|
e2b40c3a14 | ||
|
|
46f6fe88a2 | ||
|
|
1eb1af2589 | ||
|
|
98ebbc32f7 | ||
|
|
d41fabd472 | ||
|
|
906ac3817d | ||
|
|
7071fdef8a | ||
|
|
cec30738f4 | ||
|
|
e644b5cb46 | ||
|
|
5758d0b313 | ||
|
|
753b289ba9 | ||
|
|
ad5661ef1c | ||
|
|
bc18bd9261 | ||
|
|
5aa889859a | ||
|
|
eb6f3a423a | ||
|
|
eeeb9f97a9 | ||
|
|
8f1792df20 | ||
|
|
e19f86482a | ||
|
|
53924de313 | ||
|
|
d2c2ada33c | ||
|
|
b906515c69 | ||
|
|
8928b6e603 | ||
|
|
73163386c1 | ||
|
|
32c75cbb68 | ||
|
|
b60abadf33 | ||
|
|
a9b6de8c35 | ||
|
|
84d1c81bb2 | ||
|
|
c25b8e3056 | ||
|
|
b81a1f22fe | ||
|
|
703edd154c | ||
|
|
64e6a9a946 | ||
|
|
068b76b07d | ||
|
|
f060ba75ff | ||
|
|
7beaddb293 | ||
|
|
1937789ee2 | ||
|
|
2f2806c00c | ||
|
|
87adbe0b14 | ||
|
|
6554b5c9f4 | ||
|
|
c93d4c52fc | ||
|
|
f3b129c245 | ||
|
|
74c9e4465d | ||
|
|
0f4bc93a7e | ||
|
|
05bff57b65 | ||
|
|
0dcf7e91bf | ||
|
|
f50c2a2e64 | ||
|
|
a42dad6a5c | ||
|
|
cff685ea11 | ||
|
|
791c7fac63 | ||
|
|
b90c3841c9 | ||
|
|
a5e05e4eec | ||
|
|
05792a9de3 | ||
|
|
1c1f0ff4e8 | ||
|
|
d253503335 | ||
|
|
a16dab9710 | ||
|
|
18152aa7c8 | ||
|
|
f15b6a26da | ||
|
|
5d06b922d3 | ||
|
|
0031a95dfe | ||
|
|
eecd40723e | ||
|
|
5b9f4751ea | ||
|
|
b6cf098c5f | ||
|
|
5c63262feb | ||
|
|
3b88f0e741 | ||
|
|
b49ecf886b | ||
|
|
02ccec7ea8 | ||
|
|
14c5628d35 | ||
|
|
4bd3576432 | ||
|
|
756ef697dd | ||
|
|
11f562a918 | ||
|
|
083489102e | ||
|
|
cd8c483f67 | ||
|
|
c8cbf6853e | ||
|
|
153b66e4ee | ||
|
|
93c9323d0f | ||
|
|
4cd66697ad | ||
|
|
741aef55e4 | ||
|
|
8eb08820ac | ||
|
|
4ca883fd9b | ||
|
|
2f4c21e374 | ||
|
|
6239384e7b | ||
|
|
ead36cf329 | ||
|
|
cdd3f4b6a2 | ||
|
|
fdb86e7881 | ||
|
|
b4ac1e6b35 | ||
|
|
91e0b2afb6 | ||
|
|
2d5b935b1c | ||
|
|
177ba4b56e | ||
|
|
6f248bf5b5 | ||
|
|
4bda8cfee6 | ||
|
|
93d32d59aa | ||
|
|
e30746d5e5 | ||
|
|
3e1d8fa598 | ||
|
|
32cbc97a0c | ||
|
|
d276e0aa25 | ||
|
|
3243adc3a5 | ||
|
|
bf9865af20 | ||
|
|
08c7a8805b | ||
|
|
12c551ef05 | ||
|
|
a67c0e1399 | ||
|
|
7ec8334005 | ||
|
|
1a57d08feb | ||
|
|
5db3eeeaa2 | ||
|
|
e4c682d04b | ||
|
|
240496d85c | ||
|
|
78ace99685 | ||
|
|
3ddd10d373 | ||
|
|
6833ccdb97 | ||
|
|
36a9e3f54e | ||
|
|
789d64f768 | ||
|
|
25ec52b912 |
+4
-1
@@ -231,7 +231,10 @@ rules:
|
|||||||
prefer-spread: 'off'
|
prefer-spread: 'off'
|
||||||
prefer-template: 'off'
|
prefer-template: 'off'
|
||||||
quote-props: 'off'
|
quote-props: 'off'
|
||||||
quotes: 'off'
|
quotes:
|
||||||
|
- error
|
||||||
|
- double
|
||||||
|
- avoidEscape: true
|
||||||
radix: 'off'
|
radix: 'off'
|
||||||
require-atomic-updates: error
|
require-atomic-updates: error
|
||||||
require-await: error
|
require-await: error
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: To Reproduce
|
label: To Reproduce
|
||||||
description: "Steps to reproduce the behavior:"
|
description: "Steps to reproduce the behavior:"
|
||||||
value: |
|
placeholder: |
|
||||||
1. Go to '...'
|
1. Go to '...'
|
||||||
2. Click on '....'
|
2. Click on '....'
|
||||||
3. Scroll down to '....'
|
3. Scroll down to '....'
|
||||||
@@ -41,7 +41,7 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: TiddlyWiki Configuration
|
label: TiddlyWiki Configuration
|
||||||
description: please complete the following information
|
description: please complete the following information
|
||||||
value: |
|
placeholder: |
|
||||||
- Version [e.g. v5.1.24]
|
- Version [e.g. v5.1.24]
|
||||||
- Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc]
|
- Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc]
|
||||||
- Plugins installed [e.g. Freelinks, TiddlyMap]
|
- Plugins installed [e.g. Freelinks, TiddlyMap]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Discuss feature request
|
- name: Discuss feature request
|
||||||
url: https://github.com/Jermolene/TiddlyWiki5/discussions
|
url: https://github.com/TiddlyWiki/TiddlyWiki5/discussions
|
||||||
about: Open new discussion about new feature
|
about: Open new discussion about new feature
|
||||||
- name: Talk.Tiddlywiki Forum
|
- name: Talk.Tiddlywiki Forum
|
||||||
url: https://talk.tiddlywiki.org
|
url: https://talk.tiddlywiki.org
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
name: Check CLA Signature
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
paths-ignore:
|
||||||
|
- 'licenses/cla-individual.md'
|
||||||
|
jobs:
|
||||||
|
check_cla:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
if: ${{ (github.event.pull_request.user.login != github.repository_owner) }}
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
if ! curl -s https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/tiddlywiki-com/licenses/cla-individual.md | grep -o "@$USER,"; then
|
||||||
|
echo "CLA not signed"
|
||||||
|
gh pr comment "$NUMBER" -b "@$USER It appears that this is your first contribution to the project, welcome.
|
||||||
|
|
||||||
|
With apologies for the bureaucracy, please could you prepare a separate PR to the 'tiddlywiki-com' branch with your signature for the Contributor License Agreement (see [contributing.md](https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/contributing.md))."
|
||||||
|
else
|
||||||
|
echo "CLA already signed"
|
||||||
|
gh pr comment "$NUMBER" -b "Confirmed: **$USER** has already signed the Contributor License Agreement (see [contributing.md](https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/contributing.md))"
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
USER: ${{ github.actor }}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
name: CLA Signed
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- closed
|
||||||
|
paths:
|
||||||
|
- 'licenses/cla-individual.md'
|
||||||
|
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
AUTHOR: ${{ github.event.pull_request.user.login }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# check if PRs updating the CLA are targetting the tiddlywiki-com branch
|
||||||
|
check-signature-branch:
|
||||||
|
if: (github.event.pull_request.merged != true) && (github.event.pull_request.user.login != github.repository_owner)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
if ! $BRANCH == "tiddlywiki-com"; then
|
||||||
|
echo "This CLA signature targets the wrong branch"
|
||||||
|
gh pr comment "$NUMBER" -b "@$AUTHOR Signatures to the CLA must target the 'tiddlywiki-com' branch."
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
BRANCH: ${{ github.event.pull_request.base.ref }}
|
||||||
|
|
||||||
|
# leave a comment on each open PR by a given author when their signature is added to the CLA
|
||||||
|
cla-signed:
|
||||||
|
if: (github.event.pull_request.merged == true) && (github.event.pull_request.user.login != github.repository_owner)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- name: List open PRs by user
|
||||||
|
id: list-prs
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
result-encoding: string
|
||||||
|
script: |
|
||||||
|
const owner = context.repo.owner,
|
||||||
|
repo = context.repo.repo,
|
||||||
|
author = context.payload.pull_request.user.login;
|
||||||
|
|
||||||
|
const { data: pullRequests } = await github.rest.pulls.list({
|
||||||
|
owner: owner,
|
||||||
|
repo: repo,
|
||||||
|
state: 'open',
|
||||||
|
sort: 'created',
|
||||||
|
direction: 'desc',
|
||||||
|
per_page: 100
|
||||||
|
});
|
||||||
|
const userPullRequests = pullRequests.filter(pr => pr.user.login === author),
|
||||||
|
prNumbers = userPullRequests.map(pr => pr.number).join(',');
|
||||||
|
console.log(`Open pull requests by ${author}:${prNumbers}`);
|
||||||
|
return prNumbers;
|
||||||
|
|
||||||
|
- name: Comment open PRs by the same author
|
||||||
|
run: |
|
||||||
|
prs=($(echo ${{ steps.list-prs.outputs.result }} | tr "," "\n"))
|
||||||
|
|
||||||
|
for number in "${prs[@]}"
|
||||||
|
do
|
||||||
|
gh pr comment "$number" -b "**$AUTHOR** has signed the Contributor License Agreement (see [contributing.md](https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/contributing.md))"
|
||||||
|
done
|
||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
# Default to the current version number for building the plugin library
|
# Default to the current version number for building the plugin library
|
||||||
|
|
||||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||||
TW5_BUILD_VERSION=v5.3.3
|
TW5_BUILD_VERSION=v5.3.6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||||
|
|||||||
+1
-1
@@ -7,4 +7,4 @@ npm --force install tiddlywiki || exit 1
|
|||||||
|
|
||||||
# Pull existing GitHub pages content
|
# Pull existing GitHub pages content
|
||||||
|
|
||||||
git clone --depth=1 --branch=master "https://github.com/Jermolene/jermolene.github.io.git" output
|
git clone --depth=1 --branch=master "https://github.com/TiddlyWiki/tiddlywiki.com-gh-pages.git" output
|
||||||
|
|||||||
+1
-1
@@ -10,6 +10,6 @@ git config --global user.email "actions@github.com"
|
|||||||
git config --global user.name "GitHub Actions"
|
git config --global user.name "GitHub Actions"
|
||||||
git add -A .
|
git add -A .
|
||||||
git commit --message "GitHub build: $GITHUB_RUN_NUMBER of $TW5_BUILD_BRANCH ($(date +'%F %T %Z'))"
|
git commit --message "GitHub build: $GITHUB_RUN_NUMBER of $TW5_BUILD_BRANCH ($(date +'%F %T %Z'))"
|
||||||
git remote add deploy "https://$GH_TOKEN@github.com/Jermolene/jermolene.github.io.git" &>/dev/null
|
git remote add deploy "https://$GH_TOKEN@github.com/TiddlyWiki/tiddlywiki.com-gh-pages.git" &>/dev/null
|
||||||
git push deploy master &>/dev/null
|
git push deploy master &>/dev/null
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ $tw.boot = $tw.boot || Object.create(null);
|
|||||||
|
|
||||||
// Detect platforms
|
// Detect platforms
|
||||||
if(!("browser" in $tw)) {
|
if(!("browser" in $tw)) {
|
||||||
$tw.browser = typeof(window) !== "undefined" ? {} : null;
|
$tw.browser = typeof(window) !== "undefined" && typeof(document) !== "undefined" ? {} : null;
|
||||||
}
|
}
|
||||||
if(!("node" in $tw)) {
|
if(!("node" in $tw)) {
|
||||||
$tw.node = typeof(process) === "object" ? {} : null;
|
$tw.node = typeof(process) === "object" ? {} : null;
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
|
|||||||
|
title: $:/core/images/discord
|
||||||
|
tags: $:/tags/Image
|
||||||
|
|
||||||
|
\parameters (size:"22pt")
|
||||||
|
<svg width=<<size>> height=<<size>> class="tc-image-discord tc-image-button" viewBox="0 -28.5 256 256"><path d="M216.856 16.597A208.502 208.502 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046-19.692-2.961-39.203-2.961-58.533 0-1.832-4.4-4.55-9.933-6.846-14.046a207.809 207.809 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161.094 161.094 0 0 0 79.735 175.3a136.413 136.413 0 0 1-21.846-10.632 108.636 108.636 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a131.66 131.66 0 0 0 5.355 4.237 136.07 136.07 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848 21.142-6.58 42.646-16.637 64.815-33.213 5.316-56.288-9.08-105.09-38.056-148.36ZM85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2c12.867 0 23.236 11.804 23.015 26.2.02 14.375-10.148 26.18-23.015 26.18Zm85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2 0 14.375-10.148 26.18-23.015 26.18Z"/></svg>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
title: $:/core/images/input-button
|
||||||
|
tags: $:/tags/Image
|
||||||
|
|
||||||
|
\parameters (size:"22pt")
|
||||||
|
<svg width=<<size>> height=<<size>> class="tc-image-input-button tc-image-button" viewBox="0 0 22 22"><path d="M1.375 22h19.249c.365 0 .716-.145.973-.404v.001c.258-.257.404-.607.403-.972v-11a1.376 1.376 0 0 0-2.75 0v9.625H2.75V9.625a1.376 1.376 0 0 0-2.75 0v11C0 21.384.617 22 1.375 22Z"/><path d="m9.732 11.904-1.541-1.541a1.375 1.375 0 1 0-1.944 1.944l3.887 3.888c.258.258.608.402.973.402h-.001c.353 0 .705-.134.974-.402l3.888-3.889a1.376 1.376 0 0 0 .001-1.944 1.377 1.377 0 0 0-1.946 0l-1.541 1.542V1.376a1.375 1.375 0 1 0-2.75 0v10.528Z"/></svg>
|
||||||
@@ -80,6 +80,7 @@ NewMarkdown/Caption: new Markdown tiddler
|
|||||||
NewMarkdown/Hint: Create a new Markdown tiddler
|
NewMarkdown/Hint: Create a new Markdown tiddler
|
||||||
NewTiddler/Caption: new tiddler
|
NewTiddler/Caption: new tiddler
|
||||||
NewTiddler/Hint: Create a new tiddler
|
NewTiddler/Hint: Create a new tiddler
|
||||||
|
OpenControlPanel/Hint: Open control panel
|
||||||
OpenWindow/Caption: open in new window
|
OpenWindow/Caption: open in new window
|
||||||
OpenWindow/Hint: Open tiddler in new window
|
OpenWindow/Hint: Open tiddler in new window
|
||||||
Palette/Caption: palette
|
Palette/Caption: palette
|
||||||
@@ -104,6 +105,8 @@ ShowSideBar/Caption: show sidebar
|
|||||||
ShowSideBar/Hint: Show sidebar
|
ShowSideBar/Hint: Show sidebar
|
||||||
TagManager/Caption: tag manager
|
TagManager/Caption: tag manager
|
||||||
TagManager/Hint: Open tag manager
|
TagManager/Hint: Open tag manager
|
||||||
|
TestCaseImport/Caption: import tiddlers
|
||||||
|
TestCaseImport/Hint: Import tiddlers
|
||||||
Timestamp/Caption: timestamps
|
Timestamp/Caption: timestamps
|
||||||
Timestamp/Hint: Choose whether modifications update timestamps
|
Timestamp/Hint: Choose whether modifications update timestamps
|
||||||
Timestamp/On/Caption: timestamps are on
|
Timestamp/On/Caption: timestamps are on
|
||||||
|
|||||||
@@ -198,6 +198,12 @@ Settings/TitleLinks/Yes/Description: Display tiddler titles as links
|
|||||||
Settings/MissingLinks/Caption: Wiki Links
|
Settings/MissingLinks/Caption: Wiki Links
|
||||||
Settings/MissingLinks/Hint: Choose whether to link to tiddlers that do not exist yet
|
Settings/MissingLinks/Hint: Choose whether to link to tiddlers that do not exist yet
|
||||||
Settings/MissingLinks/Description: Enable links to missing tiddlers
|
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/Caption: Story Tiddler
|
||||||
StoryTiddler/Hint: This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river.
|
StoryTiddler/Hint: This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river.
|
||||||
StoryView/Caption: Story View
|
StoryView/Caption: Story View
|
||||||
@@ -235,3 +241,7 @@ ViewTemplateBody/Caption: View Template Body
|
|||||||
ViewTemplateBody/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the body of a tiddler.
|
ViewTemplateBody/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the body of a tiddler.
|
||||||
ViewTemplateTitle/Caption: View Template Title
|
ViewTemplateTitle/Caption: View Template Title
|
||||||
ViewTemplateTitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the title of a tiddler.
|
ViewTemplateTitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the title of a tiddler.
|
||||||
|
ViewTemplateSubtitle/Caption: View Template Subtitle
|
||||||
|
ViewTemplateSubtitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the subtitle of a tiddler.
|
||||||
|
ViewTemplateTags/Caption: View Template Tags
|
||||||
|
ViewTemplateTags/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the tags area of a tiddler.
|
||||||
|
|||||||
@@ -65,6 +65,10 @@ sidebar-tab-foreground-selected: Sidebar tab foreground for selected tabs
|
|||||||
sidebar-tab-foreground: Sidebar tab foreground
|
sidebar-tab-foreground: Sidebar tab foreground
|
||||||
sidebar-tiddler-link-foreground-hover: Sidebar tiddler link foreground hover
|
sidebar-tiddler-link-foreground-hover: Sidebar tiddler link foreground hover
|
||||||
sidebar-tiddler-link-foreground: Sidebar tiddler link foreground
|
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-1: Test case accent colour with no nesting
|
||||||
testcase-accent-level-2: Test case accent colour with 2nd level 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
|
testcase-accent-level-3: Test case accent colour with 3rd level nesting or higher
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
title: $:/language/Snippets/FunctionDefinition
|
||||||
|
tags: $:/tags/TextEditor/Snippet
|
||||||
|
caption: Function definition
|
||||||
|
|
||||||
|
\function f.name(param1,param2:"default value") [<param1>!is[blank]else<param2>]
|
||||||
|
|
||||||
|
<<f.name>>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
title: $:/language/Snippets/ProcedureDefinition
|
||||||
|
tags: $:/tags/TextEditor/Snippet
|
||||||
|
caption: Procedure definition
|
||||||
|
|
||||||
|
\procedure procName(param1:"default value",param2)
|
||||||
|
Your text comes here.
|
||||||
|
\end
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
title: $:/language/Docs/Types/image/x-icon
|
|
||||||
description: ICO icon
|
|
||||||
name: image/x-icon
|
|
||||||
group: Image
|
|
||||||
group-sort: 1
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple
|
||||||
|
description: Compound tiddler
|
||||||
|
name: text/vnd.tiddlywiki-multiple
|
||||||
|
group: Developer
|
||||||
|
group-sort: 2
|
||||||
@@ -45,17 +45,22 @@ Render individual tiddlers and save the results to the specified files
|
|||||||
variableList = variableList.slice(2);
|
variableList = variableList.slice(2);
|
||||||
}
|
}
|
||||||
$tw.utils.each(tiddlers,function(title) {
|
$tw.utils.each(tiddlers,function(title) {
|
||||||
var filepath = path.resolve(self.commander.outputPath,wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]))[0]);
|
var filenameResults = wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]));
|
||||||
if(self.commander.verbose) {
|
if(filenameResults.length > 0) {
|
||||||
console.log("Rendering \"" + title + "\" to \"" + filepath + "\"");
|
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;
|
return null;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ exports.textPrimitives.wikiLink = exports.textPrimitives.upperLetter + "+" +
|
|||||||
exports.textPrimitives.upperLetter +
|
exports.textPrimitives.upperLetter +
|
||||||
exports.textPrimitives.anyLetter + "*";
|
exports.textPrimitives.anyLetter + "*";
|
||||||
|
|
||||||
exports.htmlEntities = {quot:34, dollar:36, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };
|
exports.htmlEntities = {quot:34, dollar:36, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, nobreak:8288, NoBreak:8288, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };
|
||||||
|
|
||||||
exports.htmlVoidElements = "area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(",");
|
exports.htmlVoidElements = "area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(",");
|
||||||
|
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ Filter operator for returning all the backtranscludes from a tiddler
|
|||||||
Export our filter function
|
Export our filter function
|
||||||
*/
|
*/
|
||||||
exports.backtranscludes = function(source,operator,options) {
|
exports.backtranscludes = function(source,operator,options) {
|
||||||
var results = [];
|
var results = new $tw.utils.LinkedList();
|
||||||
source(function(tiddler,title) {
|
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);
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ function diffPartsToChars(text1,text2,mode) {
|
|||||||
if(lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) : (lineHash[line] !== undefined)) {
|
if(lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) : (lineHash[line] !== undefined)) {
|
||||||
chars += String.fromCharCode(lineHash[line]);
|
chars += String.fromCharCode(lineHash[line]);
|
||||||
} else {
|
} else {
|
||||||
if (lineArrayLength == maxLines) {
|
if(lineArrayLength == maxLines) {
|
||||||
line = text.substring(lineStart);
|
line = text.substring(lineStart);
|
||||||
lineEnd = text.length;
|
lineEnd = text.length;
|
||||||
}
|
}
|
||||||
@@ -217,7 +217,10 @@ exports.splitregexp = function(source,operator,options) {
|
|||||||
return ["RegExp error: " + ex];
|
return ["RegExp error: " + ex];
|
||||||
}
|
}
|
||||||
source(function(tiddler,title) {
|
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;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -264,7 +267,7 @@ exports.pad = function(source,operator,options) {
|
|||||||
} else {
|
} else {
|
||||||
var padString = "",
|
var padString = "",
|
||||||
padStringLength = targetLength - title.length;
|
padStringLength = targetLength - title.length;
|
||||||
while (padStringLength > padString.length) {
|
while(padStringLength > padString.length) {
|
||||||
padString += fill;
|
padString += fill;
|
||||||
}
|
}
|
||||||
//make sure we do not exceed the specified length
|
//make sure we do not exceed the specified length
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ exports.transcludes = function(source,operator,options) {
|
|||||||
source(function(tiddler,title) {
|
source(function(tiddler,title) {
|
||||||
results.pushTop(options.wiki.getTiddlerTranscludes(title));
|
results.pushTop(options.wiki.getTiddlerTranscludes(title));
|
||||||
});
|
});
|
||||||
return results.toArray();
|
return results.makeTiddlerIterator(options.wiki);
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ BackSubIndexer.prototype._getTarget = function(tiddler) {
|
|||||||
}
|
}
|
||||||
var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {});
|
var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {});
|
||||||
if(parser) {
|
if(parser) {
|
||||||
return this.wiki[this.extractor](parser.tree);
|
return this.wiki[this.extractor](parser.tree, tiddler.fields.title);
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ exports.parseStringLiteral = function(source,pos) {
|
|||||||
var match = reString.exec(source);
|
var match = reString.exec(source);
|
||||||
if(match && match.index === pos) {
|
if(match && match.index === pos) {
|
||||||
node.value = match[1] !== undefined ? match[1] :(
|
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;
|
node.end = pos + match[0].length;
|
||||||
return node;
|
return node;
|
||||||
|
|||||||
@@ -29,13 +29,16 @@ exports.init = function(parser) {
|
|||||||
|
|
||||||
exports.parse = function() {
|
exports.parse = function() {
|
||||||
var reEnd = /(\r?\n```$)/mg;
|
var reEnd = /(\r?\n```$)/mg;
|
||||||
|
var languageStart = this.parser.pos + 3,
|
||||||
|
languageEnd = languageStart + this.match[1].length;
|
||||||
// Move past the match
|
// Move past the match
|
||||||
this.parser.pos = this.matchRegExp.lastIndex;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
|
|
||||||
// Look for the end of the block
|
// Look for the end of the block
|
||||||
reEnd.lastIndex = this.parser.pos;
|
reEnd.lastIndex = this.parser.pos;
|
||||||
var match = reEnd.exec(this.parser.source),
|
var match = reEnd.exec(this.parser.source),
|
||||||
text;
|
text,
|
||||||
|
codeStart = this.parser.pos;
|
||||||
// Process the block
|
// Process the block
|
||||||
if(match) {
|
if(match) {
|
||||||
text = this.parser.source.substring(this.parser.pos,match.index);
|
text = this.parser.source.substring(this.parser.pos,match.index);
|
||||||
@@ -48,8 +51,8 @@ exports.parse = function() {
|
|||||||
return [{
|
return [{
|
||||||
type: "codeblock",
|
type: "codeblock",
|
||||||
attributes: {
|
attributes: {
|
||||||
code: {type: "string", value: text},
|
code: {type: "string", value: text, start: codeStart, end: this.parser.pos},
|
||||||
language: {type: "string", value: this.match[1]}
|
language: {type: "string", value: this.match[1], start: languageStart, end: languageEnd}
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ exports.parse = function() {
|
|||||||
// Look for the end marker
|
// Look for the end marker
|
||||||
reEnd.lastIndex = this.parser.pos;
|
reEnd.lastIndex = this.parser.pos;
|
||||||
var match = reEnd.exec(this.parser.source),
|
var match = reEnd.exec(this.parser.source),
|
||||||
text;
|
text,
|
||||||
|
start = this.parser.pos;
|
||||||
// Process the text
|
// Process the text
|
||||||
if(match) {
|
if(match) {
|
||||||
text = this.parser.source.substring(this.parser.pos,match.index);
|
text = this.parser.source.substring(this.parser.pos,match.index);
|
||||||
@@ -47,7 +48,9 @@ exports.parse = function() {
|
|||||||
tag: "code",
|
tag: "code",
|
||||||
children: [{
|
children: [{
|
||||||
type: "text",
|
type: "text",
|
||||||
text: text
|
text: text,
|
||||||
|
start: start,
|
||||||
|
end: this.parser.pos
|
||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ exports.init = function(parser) {
|
|||||||
|
|
||||||
exports.parse = function() {
|
exports.parse = function() {
|
||||||
// Move past the match
|
// Move past the match
|
||||||
|
var start = this.parser.pos;
|
||||||
this.parser.pos = this.matchRegExp.lastIndex;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
// Create the link unless it is suppressed
|
// Create the link unless it is suppressed
|
||||||
if(this.match[0].substr(0,1) === "~") {
|
if(this.match[0].substr(0,1) === "~") {
|
||||||
@@ -46,7 +47,7 @@ exports.parse = function() {
|
|||||||
rel: {type: "string", value: "noopener noreferrer"}
|
rel: {type: "string", value: "noopener noreferrer"}
|
||||||
},
|
},
|
||||||
children: [{
|
children: [{
|
||||||
type: "text", text: this.match[0]
|
type: "text", text: this.match[0], start: start, end: this.parser.pos
|
||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,16 @@ exports.init = function(parser) {
|
|||||||
|
|
||||||
exports.parse = function() {
|
exports.parse = function() {
|
||||||
// Move past the match
|
// 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;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
// Get the match details
|
// Get the match details
|
||||||
var filter = this.match[1],
|
var filter = this.match[1],
|
||||||
@@ -42,21 +52,21 @@ exports.parse = function() {
|
|||||||
var node = {
|
var node = {
|
||||||
type: "list",
|
type: "list",
|
||||||
attributes: {
|
attributes: {
|
||||||
filter: {type: "string", value: filter}
|
filter: {type: "string", value: filter, start: filterStart, end: filterEnd},
|
||||||
},
|
},
|
||||||
isBlock: true
|
isBlock: true
|
||||||
};
|
};
|
||||||
if(tooltip) {
|
if(tooltip) {
|
||||||
node.attributes.tooltip = {type: "string", value: tooltip};
|
node.attributes.tooltip = {type: "string", value: tooltip, start: toolTipStart, end: toolTipEnd};
|
||||||
}
|
}
|
||||||
if(template) {
|
if(template) {
|
||||||
node.attributes.template = {type: "string", value: template};
|
node.attributes.template = {type: "string", value: template, start: templateStart, end: templateEnd};
|
||||||
}
|
}
|
||||||
if(style) {
|
if(style) {
|
||||||
node.attributes.style = {type: "string", value: style};
|
node.attributes.style = {type: "string", value: style, start: styleStart, end: styleEnd};
|
||||||
}
|
}
|
||||||
if(classes) {
|
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];
|
return [node];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,6 +30,16 @@ exports.init = function(parser) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.parse = function() {
|
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
|
// Move past the match
|
||||||
this.parser.pos = this.matchRegExp.lastIndex;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
// Get the match details
|
// Get the match details
|
||||||
@@ -42,20 +52,20 @@ exports.parse = function() {
|
|||||||
var node = {
|
var node = {
|
||||||
type: "list",
|
type: "list",
|
||||||
attributes: {
|
attributes: {
|
||||||
filter: {type: "string", value: filter}
|
filter: {type: "string", value: filter, start: filterStart, end: filterEnd},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if(tooltip) {
|
if(tooltip) {
|
||||||
node.attributes.tooltip = {type: "string", value: tooltip};
|
node.attributes.tooltip = {type: "string", value: tooltip, start: toolTipStart, end: toolTipEnd};
|
||||||
}
|
}
|
||||||
if(template) {
|
if(template) {
|
||||||
node.attributes.template = {type: "string", value: template};
|
node.attributes.template = {type: "string", value: template, start: templateStart, end: templateEnd};
|
||||||
}
|
}
|
||||||
if(style) {
|
if(style) {
|
||||||
node.attributes.style = {type: "string", value: style};
|
node.attributes.style = {type: "string", value: style, start: styleStart, end: styleEnd};
|
||||||
}
|
}
|
||||||
if(classes) {
|
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];
|
return [node];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -45,10 +45,11 @@ exports.parse = function() {
|
|||||||
reEnd.lastIndex = this.parser.pos;
|
reEnd.lastIndex = this.parser.pos;
|
||||||
match = reEnd.exec(this.parser.source);
|
match = reEnd.exec(this.parser.source);
|
||||||
if(match) {
|
if(match) {
|
||||||
|
var start = this.parser.pos;
|
||||||
this.parser.pos = reEnd.lastIndex;
|
this.parser.pos = reEnd.lastIndex;
|
||||||
// Add a line break if the terminator was a line break
|
// Add a line break if the terminator was a line break
|
||||||
if(match[2]) {
|
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]);
|
} while(match && !match[1]);
|
||||||
|
|||||||
@@ -30,15 +30,17 @@ exports.parse = function() {
|
|||||||
// Move past the !s
|
// Move past the !s
|
||||||
this.parser.pos = this.matchRegExp.lastIndex;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
// Parse any classes, whitespace and then the heading itself
|
// Parse any classes, whitespace and then the heading itself
|
||||||
|
var classStart = this.parser.pos;
|
||||||
var classes = this.parser.parseClasses();
|
var classes = this.parser.parseClasses();
|
||||||
|
var classEnd = this.parser.pos;
|
||||||
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
||||||
var tree = this.parser.parseInlineRun(/(\r?\n)/mg);
|
var tree = this.parser.parseInlineRun(/(\r?\n)/mg);
|
||||||
// Return the heading
|
// Return the heading
|
||||||
return [{
|
return [{
|
||||||
type: "element",
|
type: "element",
|
||||||
tag: "h" + headingLevel,
|
tag: "h" + headingLevel,
|
||||||
attributes: {
|
attributes: {
|
||||||
"class": {type: "string", value: classes.join(" ")}
|
"class": {type: "string", value: classes.join(" "), start: classStart, end: classEnd}
|
||||||
},
|
},
|
||||||
children: tree
|
children: tree
|
||||||
}];
|
}];
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ Parse the most recent match
|
|||||||
exports.parse = function() {
|
exports.parse = function() {
|
||||||
// Retrieve the most recent match so that recursive calls don't overwrite it
|
// Retrieve the most recent match so that recursive calls don't overwrite it
|
||||||
var tag = this.nextTag;
|
var tag = this.nextTag;
|
||||||
|
if (!tag.isSelfClosing) {
|
||||||
|
tag.openTagStart = tag.start;
|
||||||
|
tag.openTagEnd = tag.end;
|
||||||
|
}
|
||||||
this.nextTag = null;
|
this.nextTag = null;
|
||||||
// Advance the parser position to past the tag
|
// Advance the parser position to past the tag
|
||||||
this.parser.pos = tag.end;
|
this.parser.pos = tag.end;
|
||||||
@@ -60,6 +64,27 @@ exports.parse = function() {
|
|||||||
var reEnd = new RegExp("(" + reEndString + ")","mg");
|
var reEnd = new RegExp("(" + reEndString + ")","mg");
|
||||||
tag.children = this.parser.parseInlineRun(reEnd,{eatTerminator: true});
|
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 the tag
|
||||||
return [tag];
|
return [tag];
|
||||||
|
|||||||
@@ -122,9 +122,9 @@ exports.parseImage = function(source,pos) {
|
|||||||
}
|
}
|
||||||
pos = token.end;
|
pos = token.end;
|
||||||
if(token.match[1]) {
|
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
|
// Update the end position
|
||||||
node.end = pos;
|
node.end = pos;
|
||||||
return node;
|
return node;
|
||||||
|
|||||||
@@ -38,13 +38,14 @@ exports.parse = function() {
|
|||||||
// Parse the filter terminated by a line break
|
// Parse the filter terminated by a line break
|
||||||
var reMatch = /(.*)(?:$|\r?\n)/mg;
|
var reMatch = /(.*)(?:$|\r?\n)/mg;
|
||||||
reMatch.lastIndex = this.parser.pos;
|
reMatch.lastIndex = this.parser.pos;
|
||||||
|
var filterStart = this.parser.source;
|
||||||
var match = reMatch.exec(this.parser.source);
|
var match = reMatch.exec(this.parser.source);
|
||||||
this.parser.pos = reMatch.lastIndex;
|
this.parser.pos = reMatch.lastIndex;
|
||||||
// Parse tree nodes to return
|
// Parse tree nodes to return
|
||||||
return [{
|
return [{
|
||||||
type: "importvariables",
|
type: "importvariables",
|
||||||
attributes: {
|
attributes: {
|
||||||
filter: {type: "string", value: match[1]}
|
filter: {type: "string", value: match[1], start: filterStart, end: this.parser.pos}
|
||||||
},
|
},
|
||||||
children: []
|
children: []
|
||||||
}];
|
}];
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ exports.parse = function() {
|
|||||||
// Match the list marker
|
// Match the list marker
|
||||||
var reMatch = /([\*#;:>]+)/mg;
|
var reMatch = /([\*#;:>]+)/mg;
|
||||||
reMatch.lastIndex = this.parser.pos;
|
reMatch.lastIndex = this.parser.pos;
|
||||||
|
var start = this.parser.pos;
|
||||||
var match = reMatch.exec(this.parser.source);
|
var match = reMatch.exec(this.parser.source);
|
||||||
if(!match || match.index !== this.parser.pos) {
|
if(!match || match.index !== this.parser.pos) {
|
||||||
break;
|
break;
|
||||||
@@ -94,9 +95,21 @@ exports.parse = function() {
|
|||||||
}
|
}
|
||||||
// Construct the list element or reuse the previous one at this level
|
// Construct the list element or reuse the previous one at this level
|
||||||
if(listStack.length <= t) {
|
if(listStack.length <= t) {
|
||||||
var listElement = {type: "element", tag: listInfo.listTag, children: [
|
var listElement = {
|
||||||
{type: "element", tag: listInfo.itemTag, children: []}
|
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
|
// Link this list element into the last child item of the parent list item
|
||||||
if(t) {
|
if(t) {
|
||||||
var prevListItem = listStack[t-1].children[listStack[t-1].children.length-1];
|
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
|
// Save this element in the stack
|
||||||
listStack[t] = listElement;
|
listStack[t] = listElement;
|
||||||
} else if(t === (match[0].length - 1)) {
|
} 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) {
|
if(listStack.length > match[0].length) {
|
||||||
listStack.splice(match[0].length,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
|
// Process the body of the list item into the last list item
|
||||||
|
var classStart = this.parser.pos;
|
||||||
var lastListChildren = listStack[listStack.length-1].children,
|
var lastListChildren = listStack[listStack.length-1].children,
|
||||||
lastListItem = lastListChildren[lastListChildren.length-1],
|
lastListItem = lastListChildren[lastListChildren.length-1],
|
||||||
classes = this.parser.parseClasses();
|
classes = this.parser.parseClasses();
|
||||||
|
var classEnd = this.parser.pos;
|
||||||
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
||||||
var tree = this.parser.parseInlineRun(/(\r?\n)/mg);
|
var tree = this.parser.parseInlineRun(/(\r?\n)/mg);
|
||||||
lastListItem.children.push.apply(lastListItem.children,tree);
|
lastListItem.children.push.apply(lastListItem.children,tree);
|
||||||
|
lastListItem.end = this.parser.pos;
|
||||||
|
listStack[listStack.length-1].end = this.parser.pos;
|
||||||
if(classes.length > 0) {
|
if(classes.length > 0) {
|
||||||
$tw.utils.addClassToParseTreeNode(lastListItem,classes.join(" "));
|
$tw.utils.addClassToParseTreeNode(lastListItem,classes.join(" "));
|
||||||
|
lastListItem.attributes.class.start = classStart;
|
||||||
|
lastListItem.attributes.class.end = classEnd;
|
||||||
}
|
}
|
||||||
// Consume any whitespace following the list item
|
// Consume any whitespace following the list item
|
||||||
this.parser.skipWhitespace();
|
this.parser.skipWhitespace();
|
||||||
|
|||||||
@@ -96,15 +96,20 @@ exports.parseLink = function(source,pos) {
|
|||||||
splitPos = null;
|
splitPos = null;
|
||||||
}
|
}
|
||||||
// Pull out the tooltip and URL
|
// Pull out the tooltip and URL
|
||||||
var tooltip, URL;
|
var tooltip, URL, urlStart;
|
||||||
|
textNode.start = pos;
|
||||||
if(splitPos) {
|
if(splitPos) {
|
||||||
|
urlStart = splitPos + 1;
|
||||||
URL = source.substring(splitPos + 1,closePos).trim();
|
URL = source.substring(splitPos + 1,closePos).trim();
|
||||||
textNode.text = source.substring(pos,splitPos).trim();
|
textNode.text = source.substring(pos,splitPos).trim();
|
||||||
|
textNode.end = splitPos;
|
||||||
} else {
|
} else {
|
||||||
|
urlStart = pos;
|
||||||
URL = source.substring(pos,closePos).trim();
|
URL = source.substring(pos,closePos).trim();
|
||||||
textNode.text = URL;
|
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.target = {type: "string", value: "_blank"};
|
||||||
node.attributes.rel = {type: "string", value: "noopener noreferrer"};
|
node.attributes.rel = {type: "string", value: "noopener noreferrer"};
|
||||||
// Update the end position
|
// Update the end position
|
||||||
|
|||||||
@@ -29,32 +29,39 @@ exports.init = function(parser) {
|
|||||||
|
|
||||||
exports.parse = function() {
|
exports.parse = function() {
|
||||||
// Move past the match
|
// Move past the match
|
||||||
|
var start = this.parser.pos + 2;
|
||||||
this.parser.pos = this.matchRegExp.lastIndex;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
// Process the link
|
// Process the link
|
||||||
var text = this.match[1],
|
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)) {
|
if($tw.utils.isLinkExternal(link)) {
|
||||||
return [{
|
return [{
|
||||||
type: "element",
|
type: "element",
|
||||||
tag: "a",
|
tag: "a",
|
||||||
attributes: {
|
attributes: {
|
||||||
href: {type: "string", value: link},
|
href: {type: "string", value: link, start: linkStart, end: linkEnd},
|
||||||
"class": {type: "string", value: "tc-tiddlylink-external"},
|
"class": {type: "string", value: "tc-tiddlylink-external"},
|
||||||
target: {type: "string", value: "_blank"},
|
target: {type: "string", value: "_blank"},
|
||||||
rel: {type: "string", value: "noopener noreferrer"}
|
rel: {type: "string", value: "noopener noreferrer"}
|
||||||
},
|
},
|
||||||
children: [{
|
children: [{
|
||||||
type: "text", text: text
|
type: "text", text: text, start: start, end: textEndPos
|
||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
} else {
|
} else {
|
||||||
return [{
|
return [{
|
||||||
type: "link",
|
type: "link",
|
||||||
attributes: {
|
attributes: {
|
||||||
to: {type: "string", value: link}
|
to: {type: "string", value: link, start: linkStart, end: linkEnd}
|
||||||
},
|
},
|
||||||
children: [{
|
children: [{
|
||||||
type: "text", text: text
|
type: "text", text: text, start: start, end: textEndPos
|
||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,9 +28,13 @@ exports.parse = function() {
|
|||||||
// Move past the <s
|
// Move past the <s
|
||||||
this.parser.pos = this.matchRegExp.lastIndex;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
// Parse any classes, whitespace and then the optional cite itself
|
// Parse any classes, whitespace and then the optional cite itself
|
||||||
|
var classStart = this.parser.pos;
|
||||||
classes.push.apply(classes, this.parser.parseClasses());
|
classes.push.apply(classes, this.parser.parseClasses());
|
||||||
|
var classEnd = this.parser.pos;
|
||||||
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
||||||
|
var citeStart = this.parser.pos;
|
||||||
var cite = this.parser.parseInlineRun(/(\r?\n)/mg);
|
var cite = this.parser.parseInlineRun(/(\r?\n)/mg);
|
||||||
|
var citeEnd = this.parser.pos;
|
||||||
// before handling the cite, parse the body of the quote
|
// before handling the cite, parse the body of the quote
|
||||||
var tree = this.parser.parseBlocks(reEndString);
|
var tree = this.parser.parseBlocks(reEndString);
|
||||||
// If we got a cite, put it before the text
|
// If we got a cite, put it before the text
|
||||||
@@ -38,18 +42,24 @@ exports.parse = function() {
|
|||||||
tree.unshift({
|
tree.unshift({
|
||||||
type: "element",
|
type: "element",
|
||||||
tag: "cite",
|
tag: "cite",
|
||||||
children: cite
|
children: cite,
|
||||||
|
start: citeStart,
|
||||||
|
end: citeEnd
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Parse any optional cite
|
// Parse any optional cite
|
||||||
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
||||||
|
citeStart = this.parser.pos;
|
||||||
cite = this.parser.parseInlineRun(/(\r?\n)/mg);
|
cite = this.parser.parseInlineRun(/(\r?\n)/mg);
|
||||||
|
citeEnd = this.parser.pos;
|
||||||
// If we got a cite, push it
|
// If we got a cite, push it
|
||||||
if(cite.length > 0) {
|
if(cite.length > 0) {
|
||||||
tree.push({
|
tree.push({
|
||||||
type: "element",
|
type: "element",
|
||||||
tag: "cite",
|
tag: "cite",
|
||||||
children: cite
|
children: cite,
|
||||||
|
start: citeStart,
|
||||||
|
end: citeEnd
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Return the blockquote element
|
// Return the blockquote element
|
||||||
@@ -57,7 +67,7 @@ exports.parse = function() {
|
|||||||
type: "element",
|
type: "element",
|
||||||
tag: "blockquote",
|
tag: "blockquote",
|
||||||
attributes: {
|
attributes: {
|
||||||
class: { type: "string", value: classes.join(" ") },
|
class: { type: "string", value: classes.join(" "), start: classStart, end: classEnd },
|
||||||
},
|
},
|
||||||
children: tree
|
children: tree
|
||||||
}];
|
}];
|
||||||
|
|||||||
@@ -29,10 +29,11 @@ exports.init = function(parser) {
|
|||||||
exports.parse = function() {
|
exports.parse = function() {
|
||||||
var match = this.match[0];
|
var match = this.match[0];
|
||||||
// Move past the match
|
// Move past the match
|
||||||
|
var start = this.parser.pos;
|
||||||
this.parser.pos = this.matchRegExp.lastIndex;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
// Create the link unless it is suppressed
|
// Create the link unless it is suppressed
|
||||||
if(match.substr(0,1) === "~") {
|
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 {
|
} else {
|
||||||
return [{
|
return [{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -41,10 +42,12 @@ exports.parse = function() {
|
|||||||
},
|
},
|
||||||
children: [{
|
children: [{
|
||||||
type: "text",
|
type: "text",
|
||||||
text: match
|
text: match,
|
||||||
|
start: start,
|
||||||
|
end: this.parser.pos
|
||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ exports.parse = function() {
|
|||||||
} else {
|
} else {
|
||||||
// Otherwise, create a new row if this one is of a different type
|
// Otherwise, create a new row if this one is of a different type
|
||||||
if(rowType !== currRowType) {
|
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);
|
table.children.push(rowContainer);
|
||||||
currRowType = rowType;
|
currRowType = rowType;
|
||||||
}
|
}
|
||||||
@@ -178,6 +178,7 @@ exports.parse = function() {
|
|||||||
// Increment the row count
|
// Increment the row count
|
||||||
rowCount++;
|
rowCount++;
|
||||||
}
|
}
|
||||||
|
rowContainer.end = this.parser.pos;
|
||||||
}
|
}
|
||||||
rowMatch = rowRegExp.exec(this.parser.source);
|
rowMatch = rowRegExp.exec(this.parser.source);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ exports.parse = function() {
|
|||||||
renderType = this.match[2];
|
renderType = this.match[2];
|
||||||
// Move past the match
|
// Move past the match
|
||||||
this.parser.pos = this.matchRegExp.lastIndex;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
|
var start = this.parser.pos;
|
||||||
// Look for the end of the block
|
// Look for the end of the block
|
||||||
reEnd.lastIndex = this.parser.pos;
|
reEnd.lastIndex = this.parser.pos;
|
||||||
var match = reEnd.exec(this.parser.source),
|
var match = reEnd.exec(this.parser.source),
|
||||||
@@ -74,7 +75,9 @@ exports.parse = function() {
|
|||||||
tag: "pre",
|
tag: "pre",
|
||||||
children: [{
|
children: [{
|
||||||
type: "text",
|
type: "text",
|
||||||
text: text
|
text: text,
|
||||||
|
start: start,
|
||||||
|
end: this.parser.pos
|
||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ exports.parse = function() {
|
|||||||
// Get the details of the match
|
// Get the details of the match
|
||||||
var linkText = this.match[0];
|
var linkText = this.match[0];
|
||||||
// Move past the macro call
|
// Move past the macro call
|
||||||
|
var start = this.parser.pos;
|
||||||
this.parser.pos = this.matchRegExp.lastIndex;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
// If the link starts with the unwikilink character then just output it as plain text
|
// If the link starts with the unwikilink character then just output it as plain text
|
||||||
if(linkText.substr(0,1) === $tw.config.textPrimitives.unWikiLink) {
|
if(linkText.substr(0,1) === $tw.config.textPrimitives.unWikiLink) {
|
||||||
@@ -57,7 +58,9 @@ exports.parse = function() {
|
|||||||
},
|
},
|
||||||
children: [{
|
children: [{
|
||||||
type: "text",
|
type: "text",
|
||||||
text: linkText
|
text: linkText,
|
||||||
|
start: start,
|
||||||
|
end: this.parser.pos
|
||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -91,6 +91,11 @@ var WikiParser = function(type,text,options) {
|
|||||||
} else {
|
} else {
|
||||||
topBranch.push.apply(topBranch,this.parseBlocks());
|
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
|
// Return the parse tree
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -209,8 +214,13 @@ WikiParser.prototype.parsePragmas = function() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Process the pragma rule
|
// Process the pragma rule
|
||||||
|
var start = this.pos;
|
||||||
var subTree = nextMatch.rule.parse();
|
var subTree = nextMatch.rule.parse();
|
||||||
if(subTree.length > 0) {
|
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
|
// Quick hack; we only cope with a single parse tree node being returned, which is true at the moment
|
||||||
currentTreeBranch.push.apply(currentTreeBranch,subTree);
|
currentTreeBranch.push.apply(currentTreeBranch,subTree);
|
||||||
subTree[0].children = [];
|
subTree[0].children = [];
|
||||||
@@ -235,7 +245,15 @@ WikiParser.prototype.parseBlock = function(terminatorRegExpString) {
|
|||||||
// Look for a block rule that applies at the current position
|
// Look for a block rule that applies at the current position
|
||||||
var nextMatch = this.findNextMatch(this.blockRules,this.pos);
|
var nextMatch = this.findNextMatch(this.blockRules,this.pos);
|
||||||
if(nextMatch && nextMatch.matchIndex === 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
|
// Treat it as a paragraph if we didn't find a block rule
|
||||||
var start = this.pos;
|
var start = this.pos;
|
||||||
@@ -332,7 +350,16 @@ WikiParser.prototype.parseInlineRunUnterminated = function(options) {
|
|||||||
this.pos = nextMatch.matchIndex;
|
this.pos = nextMatch.matchIndex;
|
||||||
}
|
}
|
||||||
// Process the run rule
|
// 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
|
// Look for the next run rule
|
||||||
nextMatch = this.findNextMatch(this.inlineRules,this.pos);
|
nextMatch = this.findNextMatch(this.inlineRules,this.pos);
|
||||||
}
|
}
|
||||||
@@ -383,7 +410,15 @@ WikiParser.prototype.parseInlineRunTerminatedExtended = function(terminatorRegEx
|
|||||||
this.pos = inlineRuleMatch.matchIndex;
|
this.pos = inlineRuleMatch.matchIndex;
|
||||||
}
|
}
|
||||||
// Process the inline rule
|
// 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
|
// Look for the next inline rule
|
||||||
inlineRuleMatch = this.findNextMatch(this.inlineRules,this.pos);
|
inlineRuleMatch = this.findNextMatch(this.inlineRules,this.pos);
|
||||||
// Look for the next terminator match
|
// Look for the next terminator match
|
||||||
@@ -409,7 +444,7 @@ WikiParser.prototype.pushTextWidget = function(array,text,start,end) {
|
|||||||
text = $tw.utils.trim(text);
|
text = $tw.utils.trim(text);
|
||||||
}
|
}
|
||||||
if(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;
|
exports["text/vnd.tiddlywiki"] = WikiParser;
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ function SaverHandler(options) {
|
|||||||
if($tw.browser) {
|
if($tw.browser) {
|
||||||
$tw.rootWidget.addEventListener("tm-save-wiki",function(event) {
|
$tw.rootWidget.addEventListener("tm-save-wiki",function(event) {
|
||||||
self.saveWiki({
|
self.saveWiki({
|
||||||
|
wiki: event.widget.wiki,
|
||||||
template: event.param,
|
template: event.param,
|
||||||
downloadType: "text/plain",
|
downloadType: "text/plain",
|
||||||
variables: event.paramObject
|
variables: event.paramObject
|
||||||
@@ -102,6 +103,7 @@ function SaverHandler(options) {
|
|||||||
});
|
});
|
||||||
$tw.rootWidget.addEventListener("tm-download-file",function(event) {
|
$tw.rootWidget.addEventListener("tm-download-file",function(event) {
|
||||||
self.saveWiki({
|
self.saveWiki({
|
||||||
|
wiki: event.widget.wiki,
|
||||||
method: "download",
|
method: "download",
|
||||||
template: event.param,
|
template: event.param,
|
||||||
downloadType: "text/plain",
|
downloadType: "text/plain",
|
||||||
@@ -147,20 +149,22 @@ Save the wiki contents. Options are:
|
|||||||
method: "save", "autosave" or "download"
|
method: "save", "autosave" or "download"
|
||||||
template: the tiddler containing the template to save
|
template: the tiddler containing the template to save
|
||||||
downloadType: the content type for the saved file
|
downloadType: the content type for the saved file
|
||||||
|
wiki: optional wiki, overriding the default wiki specified in the constructor
|
||||||
*/
|
*/
|
||||||
SaverHandler.prototype.saveWiki = function(options) {
|
SaverHandler.prototype.saveWiki = function(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
var self = this,
|
var self = this,
|
||||||
|
wiki = options.wiki || this.wiki,
|
||||||
method = options.method || "save";
|
method = options.method || "save";
|
||||||
// Ignore autosave if disabled
|
// Ignore autosave if disabled
|
||||||
if(method === "autosave" && ($tw.config.disableAutoSave || this.wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes")) {
|
if(method === "autosave" && ($tw.config.disableAutoSave || wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var variables = options.variables || {},
|
var variables = options.variables || {},
|
||||||
template = (options.template ||
|
template = (options.template ||
|
||||||
this.wiki.getTiddlerText("$:/config/SaveWikiButton/Template","$:/core/save/all")).trim(),
|
wiki.getTiddlerText("$:/config/SaveWikiButton/Template","$:/core/save/all")).trim(),
|
||||||
downloadType = options.downloadType || "text/plain",
|
downloadType = options.downloadType || "text/plain",
|
||||||
text = this.wiki.renderTiddler(downloadType,template,options),
|
text = wiki.renderTiddler(downloadType,template,options),
|
||||||
callback = function(err) {
|
callback = function(err) {
|
||||||
if(err) {
|
if(err) {
|
||||||
alert($tw.language.getString("Error/WhileSaving") + ":\n\n" + err);
|
alert($tw.language.getString("Error/WhileSaving") + ":\n\n" + err);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ var PutSaver = function(wiki) {
|
|||||||
var self = this;
|
var self = this;
|
||||||
var uri = this.uri();
|
var uri = this.uri();
|
||||||
// Async server probe. Until probe finishes, save will fail fast
|
// Async server probe. Until probe finishes, save will fail fast
|
||||||
// See also https://github.com/Jermolene/TiddlyWiki5/issues/2276
|
// See also https://github.com/TiddlyWiki/TiddlyWiki5/issues/2276
|
||||||
$tw.utils.httpRequest({
|
$tw.utils.httpRequest({
|
||||||
url: uri,
|
url: uri,
|
||||||
type: "OPTIONS",
|
type: "OPTIONS",
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ HeaderAuthenticator.prototype.authenticateRequest = function(request,response,st
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// authenticatedUsername will be undefined for anonymous users
|
// authenticatedUsername will be undefined for anonymous users
|
||||||
state.authenticatedUsername = $tw.utils.decodeURIComponentSafe(username);
|
if(username) {
|
||||||
|
state.authenticatedUsername = $tw.utils.decodeURIComponentSafe(username);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ exports.startup = function() {
|
|||||||
// Collect the shadow tiddlers of any modified plugins
|
// Collect the shadow tiddlers of any modified plugins
|
||||||
$tw.utils.each(changes.modifiedPlugins,function(pluginTitle) {
|
$tw.utils.each(changes.modifiedPlugins,function(pluginTitle) {
|
||||||
var pluginInfo = $tw.wiki.getPluginInfo(pluginTitle);
|
var pluginInfo = $tw.wiki.getPluginInfo(pluginTitle);
|
||||||
if(pluginInfo) {
|
if(pluginInfo && pluginInfo.tiddlers) {
|
||||||
$tw.utils.each(Object.keys(pluginInfo.tiddlers),function(title) {
|
$tw.utils.each(Object.keys(pluginInfo.tiddlers),function(title) {
|
||||||
changedShadowTiddlers[title] = false;
|
changedShadowTiddlers[title] = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -30,12 +30,8 @@ ClassicStoryView.prototype.navigateTo = function(historyInfo) {
|
|||||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(duration) {
|
// Scroll the node into view
|
||||||
// Scroll the node into view
|
this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement});
|
||||||
this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement});
|
|
||||||
} else {
|
|
||||||
targetElement.scrollIntoView();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ClassicStoryView.prototype.insert = function(widget) {
|
ClassicStoryView.prototype.insert = function(widget) {
|
||||||
@@ -82,6 +78,10 @@ ClassicStoryView.prototype.remove = function(widget) {
|
|||||||
removeElement = function() {
|
removeElement = function() {
|
||||||
widget.removeChildDomNodes();
|
widget.removeChildDomNodes();
|
||||||
};
|
};
|
||||||
|
// Blur the focus if it is within the descendents of the node we are removing
|
||||||
|
if($tw.utils.domContains(targetElement,targetElement.ownerDocument.activeElement)) {
|
||||||
|
targetElement.ownerDocument.activeElement.blur();
|
||||||
|
}
|
||||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||||
removeElement();
|
removeElement();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Upgrader module that suppresses certain system tiddlers that shouldn't be import
|
|||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var DONT_IMPORT_LIST = ["$:/Import"],
|
var DONT_IMPORT_LIST = ["$:/Import", "$:/build"],
|
||||||
UNSELECT_PREFIX_LIST = ["$:/temp/","$:/state/","$:/StoryList","$:/HistoryList"],
|
UNSELECT_PREFIX_LIST = ["$:/temp/","$:/state/","$:/StoryList","$:/HistoryList"],
|
||||||
WARN_IMPORT_PREFIX_LIST = ["$:/core/modules/"];
|
WARN_IMPORT_PREFIX_LIST = ["$:/core/modules/"];
|
||||||
|
|
||||||
|
|||||||
@@ -270,6 +270,7 @@ Copy plain text to the clipboard on browsers that support it
|
|||||||
*/
|
*/
|
||||||
exports.copyToClipboard = function(text,options) {
|
exports.copyToClipboard = function(text,options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
text = text || "";
|
||||||
var textArea = document.createElement("textarea");
|
var textArea = document.createElement("textarea");
|
||||||
textArea.style.position = "fixed";
|
textArea.style.position = "fixed";
|
||||||
textArea.style.top = 0;
|
textArea.style.top = 0;
|
||||||
@@ -289,7 +290,7 @@ exports.copyToClipboard = function(text,options) {
|
|||||||
var succeeded = false;
|
var succeeded = false;
|
||||||
try {
|
try {
|
||||||
succeeded = document.execCommand("copy");
|
succeeded = document.execCommand("copy");
|
||||||
} catch (err) {
|
} catch(err) {
|
||||||
}
|
}
|
||||||
if(!options.doNotNotify) {
|
if(!options.doNotNotify) {
|
||||||
var successNotification = options.successNotification || "$:/language/Notifications/CopiedToClipboard/Succeeded",
|
var successNotification = options.successNotification || "$:/language/Notifications/CopiedToClipboard/Succeeded",
|
||||||
@@ -326,7 +327,7 @@ exports.collectDOMVariables = function(selectedNode,domNode,event) {
|
|||||||
variables["tv-popup-coords"] = Popup.buildCoordinates(Popup.coordinatePrefix.csOffsetParent,nodeRect);
|
variables["tv-popup-coords"] = Popup.buildCoordinates(Popup.coordinatePrefix.csOffsetParent,nodeRect);
|
||||||
|
|
||||||
var absRect = $tw.utils.extend({}, nodeRect);
|
var absRect = $tw.utils.extend({}, nodeRect);
|
||||||
for (var currentNode = selectedNode.offsetParent; currentNode; currentNode = currentNode.offsetParent) {
|
for(var currentNode = selectedNode.offsetParent; currentNode; currentNode = currentNode.offsetParent) {
|
||||||
absRect.left += currentNode.offsetLeft;
|
absRect.left += currentNode.offsetLeft;
|
||||||
absRect.top += currentNode.offsetTop;
|
absRect.top += currentNode.offsetTop;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ exports.generateTiddlerFileInfo = function(tiddler,options) {
|
|||||||
} else {
|
} else {
|
||||||
// Save as a .tid or a text/binary file plus a .meta file
|
// Save as a .tid or a text/binary file plus a .meta file
|
||||||
var tiddlerType = tiddler.fields.type || "text/vnd.tiddlywiki";
|
var tiddlerType = tiddler.fields.type || "text/vnd.tiddlywiki";
|
||||||
if(tiddlerType === "text/vnd.tiddlywiki" || tiddler.hasField("_canonical_uri")) {
|
if(tiddlerType === "text/vnd.tiddlywiki" || tiddlerType === "text/vnd.tiddlywiki-multiple" || tiddler.hasField("_canonical_uri")) {
|
||||||
// Save as a .tid file
|
// Save as a .tid file
|
||||||
fileInfo.type = "application/x-tiddler";
|
fileInfo.type = "application/x-tiddler";
|
||||||
fileInfo.hasMetaFile = false;
|
fileInfo.hasMetaFile = false;
|
||||||
|
|||||||
@@ -66,7 +66,12 @@ LogWidget.prototype.log = function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
for(var v in this.variables) {
|
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) {
|
if(this.filter) {
|
||||||
filteredVars = this.wiki.compileFilter(this.filter).call(this.wiki,this.wiki.makeTiddlerIterator(allVars));
|
filteredVars = this.wiki.compileFilter(this.filter).call(this.wiki,this.wiki.makeTiddlerIterator(allVars));
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
|||||||
*/
|
*/
|
||||||
ButtonWidget.prototype.refresh = function(changedTiddlers) {
|
ButtonWidget.prototype.refresh = function(changedTiddlers) {
|
||||||
var changedAttributes = this.computeAttributes();
|
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();
|
this.refreshSelf();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -75,7 +75,9 @@ DataWidget.prototype.computeDataTiddlerValues = function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Deal with $tiddler, $filter or $compound-tiddler attributes
|
// Deal with $tiddler, $filter or $compound-tiddler attributes
|
||||||
var tiddlers = [],title;
|
var tiddlers = [],
|
||||||
|
compoundTiddlers,
|
||||||
|
title;
|
||||||
if(this.hasAttribute("$tiddler")) {
|
if(this.hasAttribute("$tiddler")) {
|
||||||
title = this.getAttribute("$tiddler");
|
title = this.getAttribute("$tiddler");
|
||||||
if(title) {
|
if(title) {
|
||||||
@@ -91,7 +93,9 @@ DataWidget.prototype.computeDataTiddlerValues = function() {
|
|||||||
var titles = this.wiki.filterTiddlers(filter);
|
var titles = this.wiki.filterTiddlers(filter);
|
||||||
$tw.utils.each(titles,function(title) {
|
$tw.utils.each(titles,function(title) {
|
||||||
var tiddler = self.wiki.getTiddler(title);
|
var tiddler = self.wiki.getTiddler(title);
|
||||||
tiddlers.push(tiddler);
|
if(tiddler) {
|
||||||
|
tiddlers.push(tiddler);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -101,8 +105,17 @@ DataWidget.prototype.computeDataTiddlerValues = function() {
|
|||||||
tiddlers.push.apply(tiddlers,this.extractCompoundTiddler(title));
|
tiddlers.push.apply(tiddlers,this.extractCompoundTiddler(title));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(this.hasAttribute("$compound-filter")) {
|
||||||
|
filter = this.getAttribute("$compound-filter");
|
||||||
|
if(filter) {
|
||||||
|
compoundTiddlers = this.wiki.filterTiddlers(filter);
|
||||||
|
$tw.utils.each(compoundTiddlers, function(title){
|
||||||
|
tiddlers.push.apply(tiddlers,self.extractCompoundTiddler(title));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
// Return the literal item if none of the special attributes were used
|
// Return the literal item if none of the special attributes were used
|
||||||
if(!this.hasAttribute("$tiddler") && !this.hasAttribute("$filter") && !this.hasAttribute("$compound-tiddler")) {
|
if(!this.hasAttribute("$tiddler") && !this.hasAttribute("$filter") && !this.hasAttribute("$compound-tiddler") && !this.hasAttribute("$compound-filter")) {
|
||||||
if(Object.keys(item).length > 0 && !!item.title) {
|
if(Object.keys(item).length > 0 && !!item.title) {
|
||||||
return [new $tw.Tiddler(item)];
|
return [new $tw.Tiddler(item)];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+31
-13
@@ -551,28 +551,45 @@ 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
|
// Count up the transcludes
|
||||||
var transcludes = [],
|
var transcludes = [],
|
||||||
checkParseTree = function(parseTree, parentNode) {
|
checkParseTree = function(parseTree, parentNode) {
|
||||||
for(var t=0; t<parseTree.length; t++) {
|
for(var t=0; t<parseTree.length; t++) {
|
||||||
var parseTreeNode = parseTree[t];
|
var parseTreeNode = parseTree[t];
|
||||||
if(parseTreeNode.type === "transclude" && parseTreeNode.attributes.$tiddler && parseTreeNode.attributes.$tiddler.type === "string") {
|
if(parseTreeNode.type === "transclude") {
|
||||||
var value;
|
if(parseTreeNode.attributes.$tiddler) {
|
||||||
// if it is Transclusion with Templates like `{{Index||$:/core/ui/TagTemplate}}`, the `$tiddler` will point to the template. We need to find the actual target tiddler from parent node
|
if(parseTreeNode.attributes.$tiddler.type === "string") {
|
||||||
if(parentNode && parentNode.type === "tiddler" && parentNode.attributes.tiddler && parentNode.attributes.tiddler.type === "string") {
|
var value;
|
||||||
value = parentNode.attributes.tiddler.value;
|
// if it is Transclusion with Templates like `{{Index||$:/core/ui/TagTemplate}}`, the `$tiddler` will point to the template. We need to find the actual target tiddler from parent node
|
||||||
} else {
|
if(parentNode && parentNode.type === "tiddler" && parentNode.attributes.tiddler && parentNode.attributes.tiddler.type === "string") {
|
||||||
value = parseTreeNode.attributes.$tiddler.value;
|
// Empty value (like `{{!!field}}`) means self-referential transclusion.
|
||||||
|
value = parentNode.attributes.tiddler.value || title;
|
||||||
|
} else {
|
||||||
|
value = parseTreeNode.attributes.$tiddler.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if(parseTreeNode.attributes.tiddler) {
|
||||||
|
if (parseTreeNode.attributes.tiddler.type === "string") {
|
||||||
|
// Old transclude widget usage
|
||||||
|
value = parseTreeNode.attributes.tiddler.value;
|
||||||
|
}
|
||||||
|
} else if(parseTreeNode.attributes.$field && parseTreeNode.attributes.$field.type === "string") {
|
||||||
|
// Empty value (like `<$transclude $field='created'/>`) 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) {
|
// Deduplicate the result.
|
||||||
transcludes.push(value);
|
if(value && transcludes.indexOf(value) === -1) {
|
||||||
|
$tw.utils.pushTop(transcludes,value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(parseTreeNode.children) {
|
if(parseTreeNode.children) {
|
||||||
checkParseTree(parseTreeNode.children, parseTreeNode);
|
checkParseTree(parseTreeNode.children,parseTreeNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -591,7 +608,8 @@ exports.getTiddlerTranscludes = function(title) {
|
|||||||
// Parse the tiddler
|
// Parse the tiddler
|
||||||
var parser = self.parseTiddler(title);
|
var parser = self.parseTiddler(title);
|
||||||
if(parser) {
|
if(parser) {
|
||||||
return self.extractTranscludes(parser.tree);
|
// this will ignore self-referential transclusions from `title`
|
||||||
|
return self.extractTranscludes(parser.tree,title);
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -82,6 +82,10 @@ sidebar-tab-foreground: <<colour tab-foreground>>
|
|||||||
sidebar-tiddler-link-foreground-hover: #458588
|
sidebar-tiddler-link-foreground-hover: #458588
|
||||||
sidebar-tiddler-link-foreground: #98971a
|
sidebar-tiddler-link-foreground: #98971a
|
||||||
site-title-foreground: <<colour tiddler-title-foreground>>
|
site-title-foreground: <<colour tiddler-title-foreground>>
|
||||||
|
stability-deprecated: #cc241d
|
||||||
|
stability-experimental: #d79921
|
||||||
|
stability-legacy: #458588
|
||||||
|
stability-stable: #98971a
|
||||||
static-alert-foreground: #B48EAD
|
static-alert-foreground: #B48EAD
|
||||||
tab-background-selected: #ebdbb2
|
tab-background-selected: #ebdbb2
|
||||||
tab-background: #665c54
|
tab-background: #665c54
|
||||||
|
|||||||
@@ -82,6 +82,10 @@ sidebar-tab-foreground: <<colour tab-foreground>>
|
|||||||
sidebar-tiddler-link-foreground-hover: #A3BE8C
|
sidebar-tiddler-link-foreground-hover: #A3BE8C
|
||||||
sidebar-tiddler-link-foreground: #81A1C1
|
sidebar-tiddler-link-foreground: #81A1C1
|
||||||
site-title-foreground: <<colour tiddler-title-foreground>>
|
site-title-foreground: <<colour tiddler-title-foreground>>
|
||||||
|
stability-deprecated: #bf616a
|
||||||
|
stability-experimental: #d08770
|
||||||
|
stability-legacy: #88c0d0
|
||||||
|
stability-stable: #a3be8c
|
||||||
static-alert-foreground: #B48EAD
|
static-alert-foreground: #B48EAD
|
||||||
tab-background-selected: #ECEFF4
|
tab-background-selected: #ECEFF4
|
||||||
tab-background: #4C566A
|
tab-background: #4C566A
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ button-foreground: #93a1a1
|
|||||||
code-background: #073642
|
code-background: #073642
|
||||||
code-border: #586e75
|
code-border: #586e75
|
||||||
code-foreground: #93a1a1
|
code-foreground: #93a1a1
|
||||||
dirty-indicator: inherit
|
dirty-indicator: #dc322f
|
||||||
download-background: #859900
|
download-background: #859900
|
||||||
download-foreground: #073642
|
download-foreground: #073642
|
||||||
dragger-background: #073642
|
dragger-background: #073642
|
||||||
@@ -72,6 +72,10 @@ sidebar-tab-foreground-selected: #93a1a1
|
|||||||
sidebar-tiddler-link-foreground: #2aa198
|
sidebar-tiddler-link-foreground: #2aa198
|
||||||
sidebar-tiddler-link-foreground-hover: #eee8d5
|
sidebar-tiddler-link-foreground-hover: #eee8d5
|
||||||
site-title-foreground: #d33682
|
site-title-foreground: #d33682
|
||||||
|
stability-deprecated: #dc322f
|
||||||
|
stability-experimental: #b58900
|
||||||
|
stability-legacy: #268bd2
|
||||||
|
stability-stable: #859900
|
||||||
static-alert-foreground: #93a1a1
|
static-alert-foreground: #93a1a1
|
||||||
tab-background: #073642
|
tab-background: #073642
|
||||||
tab-background-selected: #002b36
|
tab-background-selected: #002b36
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ button-foreground: #586e75
|
|||||||
code-background: #eee8d5
|
code-background: #eee8d5
|
||||||
code-border: #93a1a1
|
code-border: #93a1a1
|
||||||
code-foreground: #586e75
|
code-foreground: #586e75
|
||||||
dirty-indicator: inherit
|
dirty-indicator: #dc322f
|
||||||
download-background: #859900
|
download-background: #859900
|
||||||
download-foreground: #eee8d5
|
download-foreground: #eee8d5
|
||||||
dragger-background: #eee8d5
|
dragger-background: #eee8d5
|
||||||
@@ -72,6 +72,10 @@ sidebar-tab-foreground-selected: #586e75
|
|||||||
sidebar-tiddler-link-foreground: #2aa198
|
sidebar-tiddler-link-foreground: #2aa198
|
||||||
sidebar-tiddler-link-foreground-hover: #002b36
|
sidebar-tiddler-link-foreground-hover: #002b36
|
||||||
site-title-foreground: #d33682
|
site-title-foreground: #d33682
|
||||||
|
stability-deprecated: #dc322f
|
||||||
|
stability-experimental: #b58900
|
||||||
|
stability-legacy: #268bd2
|
||||||
|
stability-stable: #859900
|
||||||
static-alert-foreground: #586e75
|
static-alert-foreground: #586e75
|
||||||
tab-background: #eee8d5
|
tab-background: #eee8d5
|
||||||
tab-background-selected: #fdf6e3
|
tab-background-selected: #fdf6e3
|
||||||
|
|||||||
@@ -82,6 +82,10 @@ sidebar-tab-foreground: <<colour tab-foreground>>
|
|||||||
sidebar-tiddler-link-foreground-hover: #444444
|
sidebar-tiddler-link-foreground-hover: #444444
|
||||||
sidebar-tiddler-link-foreground: #999999
|
sidebar-tiddler-link-foreground: #999999
|
||||||
site-title-foreground: <<colour tiddler-title-foreground>>
|
site-title-foreground: <<colour tiddler-title-foreground>>
|
||||||
|
stability-stable: #008000
|
||||||
|
stability-experimental: #c07c00
|
||||||
|
stability-deprecated: #ff0000
|
||||||
|
stability-legacy: #0000ff
|
||||||
static-alert-foreground: #aaaaaa
|
static-alert-foreground: #aaaaaa
|
||||||
tab-background-selected: #ffffff
|
tab-background-selected: #ffffff
|
||||||
tab-background: #d8d8d8
|
tab-background: #d8d8d8
|
||||||
@@ -95,7 +99,7 @@ table-footer-background: #a8a8a8
|
|||||||
table-header-background: #f0f0f0
|
table-header-background: #f0f0f0
|
||||||
tag-background: #ec6
|
tag-background: #ec6
|
||||||
tag-foreground: #ffffff
|
tag-foreground: #ffffff
|
||||||
testcase-accent-level-1: #84C5E6
|
testcase-accent-level-1: #c1eaff
|
||||||
testcase-accent-level-2: #E3B740
|
testcase-accent-level-2: #E3B740
|
||||||
testcase-accent-level-3: #5FD564
|
testcase-accent-level-3: #5FD564
|
||||||
tiddler-background: <<colour background>>
|
tiddler-background: <<colour background>>
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
title: $:/core/templates/social-metadata
|
||||||
|
tags: $:/tags/RawMarkupWikified
|
||||||
|
|
||||||
|
\procedure meta-plain(name,source,name-attribute:"name")
|
||||||
|
\whitespace trim
|
||||||
|
<%if [<source>has[text]] %>
|
||||||
|
<meta <$text text=<<name-attribute>>/>="<$text text=<<name>>/>" content="<$text text={{{ [<source>get[text]encodehtml[]] }}}/>">
|
||||||
|
<$text text={{{ [charcode[10]] }}}/>
|
||||||
|
<%endif%>
|
||||||
|
\end meta-plain
|
||||||
|
|
||||||
|
\procedure meta-wikified(name,source,name-attribute:"name")
|
||||||
|
\whitespace trim
|
||||||
|
<%if [<source>has[text]] %>
|
||||||
|
<$wikify name="html" text={{{ [<source>get[text]] }}} output="text">
|
||||||
|
<meta <$text text=<<name-attribute>>/>="<$text text=<<name>>/>" content="<$text text={{{ [<html>encodehtml[]] }}}/>">
|
||||||
|
<$text text={{{ [charcode[10]] }}}/>
|
||||||
|
</$wikify>
|
||||||
|
<%endif%>
|
||||||
|
\end meta-wikified
|
||||||
|
|
||||||
|
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock conditional commentinline commentblock
|
||||||
|
<<meta-wikified "description" "$:/SiteSubtitle">>
|
||||||
|
|
||||||
|
<!-- Facebook Meta Tags -->
|
||||||
|
<<meta-plain "og:url" "$:/SiteUrl" "property">>
|
||||||
|
<<meta-plain "og:type" "website" "property">>
|
||||||
|
<<meta-wikified "og:title" "$:/SiteTitle" "property">>
|
||||||
|
<<meta-wikified "og:description" "$:/SiteSubtitle" "property">>
|
||||||
|
<<meta-plain "og:image" "$:/SitePreviewImageUrl" "property">>
|
||||||
|
|
||||||
|
<!-- Twitter Meta Tags -->
|
||||||
|
<<meta-plain "twitter:card" "summary_large_image">>
|
||||||
|
<<meta-plain "twitter:domain" "$:/SiteDomain" "property">>
|
||||||
|
<<meta-plain "twitter:url" "$:/SiteUrl" "property">>
|
||||||
|
<<meta-wikified "twitter:title" "$:/SiteTitle">>
|
||||||
|
<<meta-wikified "twitter:description" "$:/SiteSubtitle">>
|
||||||
|
<<meta-plain "twitter:image" "$:/SitePreviewImageUrl">>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/ViewTemplateSubtitle
|
||||||
|
tags: $:/tags/ControlPanel/Cascades
|
||||||
|
caption: {{$:/language/ControlPanel/ViewTemplateSubtitle/Caption}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/ControlPanel/ViewTemplateSubtitle/
|
||||||
|
|
||||||
|
<<lingo Hint>>
|
||||||
|
|
||||||
|
{{$:/tags/ViewTemplateSubtitleFilter||$:/snippets/ListTaggedCascade}}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/ViewTemplateTags
|
||||||
|
tags: $:/tags/ControlPanel/Cascades
|
||||||
|
caption: {{$:/language/ControlPanel/ViewTemplateTags/Caption}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/ControlPanel/ViewTemplateTags/
|
||||||
|
|
||||||
|
<<lingo Hint>>
|
||||||
|
|
||||||
|
{{$:/tags/ViewTemplateTagsFilter||$:/snippets/ListTaggedCascade}}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/SocialCard
|
||||||
|
tags: $:/tags/ControlPanel/Advanced
|
||||||
|
caption: {{$:/language/ControlPanel/SocialCard/Caption}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/ControlPanel/
|
||||||
|
|
||||||
|
<<lingo SocialCard/Hint>>
|
||||||
|
|
||||||
|
|<$link to="$:/SiteTitle"><<lingo Basics/Title/Prompt>></$link> |<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> |
|
||||||
|
|<$link to="$:/SiteSubtitle"><<lingo Basics/Subtitle/Prompt>></$link> |<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> |
|
||||||
|
|<$link to="$:/SiteDomain"><<lingo SocialCard/Domain/Prompt>></$link> |<$edit-text tiddler="$:/SiteDomain" default="" tag="input"/> |
|
||||||
|
|<$link to="$:/SiteUrl"><<lingo SocialCard/Url/Prompt>></$link> |<$edit-text tiddler="$:/SiteUrl" default="" tag="input"/> |
|
||||||
|
|<$link to="$:/SitePreviewUrl"><<lingo SocialCard/PreviewUrl/Prompt>></$link> |<$edit-text tiddler="$:/SitePreviewUrl" default="" tag="input"/> |
|
||||||
|
|
||||||
|
<%if [[$:/SitePreviewUrl]get[text]else[]!is[blank]] %>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<<lingo SocialCard/PreviewUrl/Preview>>
|
||||||
|
</div>
|
||||||
|
<img src={{$:/SitePreviewUrl}}/>
|
||||||
|
</div>
|
||||||
|
<%endif%>
|
||||||
@@ -9,7 +9,7 @@ list-before:
|
|||||||
|
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]">
|
||||||
|
|
||||||
<div class="tc-control-panel-setting" data-setting-title=<<currentTiddler>> style="border-top:1px solid #eee;">
|
<div class="tc-control-panel-setting" data-setting-title=<<currentTiddler>> >
|
||||||
|
|
||||||
!!.tc-control-panel-accent <$link><$transclude field="caption"/></$link>
|
!!.tc-control-panel-accent <$link><$transclude field="caption"/></$link>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/bold
|
icon: $:/core/images/bold
|
||||||
caption: {{$:/language/Buttons/Bold/Caption}}
|
caption: {{$:/language/Buttons/Bold/Caption}}
|
||||||
description: {{$:/language/Buttons/Bold/Hint}}
|
description: {{$:/language/Buttons/Bold/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((bold))
|
shortcuts: ((bold))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/excise
|
icon: $:/core/images/excise
|
||||||
caption: {{$:/language/Buttons/Excise/Caption}}
|
caption: {{$:/language/Buttons/Excise/Caption}}
|
||||||
description: {{$:/language/Buttons/Excise/Hint}}
|
description: {{$:/language/Buttons/Excise/Hint}}
|
||||||
condition: [<targetTiddler>type[]] [<targetTiddler>type[text/vnd.tiddlywiki]] +[first[]]
|
condition: [<targetTiddler>type[]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]] +[first[]]
|
||||||
shortcuts: ((excise))
|
shortcuts: ((excise))
|
||||||
dropdown: $:/core/ui/EditorToolbar/excise-dropdown
|
dropdown: $:/core/ui/EditorToolbar/excise-dropdown
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/heading-1
|
icon: $:/core/images/heading-1
|
||||||
caption: {{$:/language/Buttons/Heading1/Caption}}
|
caption: {{$:/language/Buttons/Heading1/Caption}}
|
||||||
description: {{$:/language/Buttons/Heading1/Hint}}
|
description: {{$:/language/Buttons/Heading1/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
button-classes: tc-text-editor-toolbar-item-start-group
|
button-classes: tc-text-editor-toolbar-item-start-group
|
||||||
shortcuts: ((heading-1))
|
shortcuts: ((heading-1))
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/heading-2
|
icon: $:/core/images/heading-2
|
||||||
caption: {{$:/language/Buttons/Heading2/Caption}}
|
caption: {{$:/language/Buttons/Heading2/Caption}}
|
||||||
description: {{$:/language/Buttons/Heading2/Hint}}
|
description: {{$:/language/Buttons/Heading2/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((heading-2))
|
shortcuts: ((heading-2))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/heading-3
|
icon: $:/core/images/heading-3
|
||||||
caption: {{$:/language/Buttons/Heading3/Caption}}
|
caption: {{$:/language/Buttons/Heading3/Caption}}
|
||||||
description: {{$:/language/Buttons/Heading3/Hint}}
|
description: {{$:/language/Buttons/Heading3/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((heading-3))
|
shortcuts: ((heading-3))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/heading-4
|
icon: $:/core/images/heading-4
|
||||||
caption: {{$:/language/Buttons/Heading4/Caption}}
|
caption: {{$:/language/Buttons/Heading4/Caption}}
|
||||||
description: {{$:/language/Buttons/Heading4/Hint}}
|
description: {{$:/language/Buttons/Heading4/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((heading-4))
|
shortcuts: ((heading-4))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/heading-5
|
icon: $:/core/images/heading-5
|
||||||
caption: {{$:/language/Buttons/Heading5/Caption}}
|
caption: {{$:/language/Buttons/Heading5/Caption}}
|
||||||
description: {{$:/language/Buttons/Heading5/Hint}}
|
description: {{$:/language/Buttons/Heading5/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((heading-5))
|
shortcuts: ((heading-5))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/heading-6
|
icon: $:/core/images/heading-6
|
||||||
caption: {{$:/language/Buttons/Heading6/Caption}}
|
caption: {{$:/language/Buttons/Heading6/Caption}}
|
||||||
description: {{$:/language/Buttons/Heading6/Hint}}
|
description: {{$:/language/Buttons/Heading6/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((heading-6))
|
shortcuts: ((heading-6))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/italic
|
icon: $:/core/images/italic
|
||||||
caption: {{$:/language/Buttons/Italic/Caption}}
|
caption: {{$:/language/Buttons/Italic/Caption}}
|
||||||
description: {{$:/language/Buttons/Italic/Hint}}
|
description: {{$:/language/Buttons/Italic/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((italic))
|
shortcuts: ((italic))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/link
|
icon: $:/core/images/link
|
||||||
caption: {{$:/language/Buttons/Link/Caption}}
|
caption: {{$:/language/Buttons/Link/Caption}}
|
||||||
description: {{$:/language/Buttons/Link/Hint}}
|
description: {{$:/language/Buttons/Link/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
button-classes: tc-text-editor-toolbar-item-start-group
|
button-classes: tc-text-editor-toolbar-item-start-group
|
||||||
shortcuts: ((link))
|
shortcuts: ((link))
|
||||||
dropdown: $:/core/ui/EditorToolbar/link-dropdown
|
dropdown: $:/core/ui/EditorToolbar/link-dropdown
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
caption: {{$:/language/Buttons/Linkify/Caption}}
|
caption: {{$:/language/Buttons/Linkify/Caption}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
description: {{$:/language/Buttons/Linkify/Hint}}
|
description: {{$:/language/Buttons/Linkify/Hint}}
|
||||||
icon: $:/core/images/linkify
|
icon: $:/core/images/linkify
|
||||||
list-before: $:/core/ui/EditorToolbar/mono-block
|
list-before: $:/core/ui/EditorToolbar/mono-block
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/list-bullet
|
icon: $:/core/images/list-bullet
|
||||||
caption: {{$:/language/Buttons/ListBullet/Caption}}
|
caption: {{$:/language/Buttons/ListBullet/Caption}}
|
||||||
description: {{$:/language/Buttons/ListBullet/Hint}}
|
description: {{$:/language/Buttons/ListBullet/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((list-bullet))
|
shortcuts: ((list-bullet))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/list-number
|
icon: $:/core/images/list-number
|
||||||
caption: {{$:/language/Buttons/ListNumber/Caption}}
|
caption: {{$:/language/Buttons/ListNumber/Caption}}
|
||||||
description: {{$:/language/Buttons/ListNumber/Hint}}
|
description: {{$:/language/Buttons/ListNumber/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((list-number))
|
shortcuts: ((list-number))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/mono-block
|
icon: $:/core/images/mono-block
|
||||||
caption: {{$:/language/Buttons/MonoBlock/Caption}}
|
caption: {{$:/language/Buttons/MonoBlock/Caption}}
|
||||||
description: {{$:/language/Buttons/MonoBlock/Hint}}
|
description: {{$:/language/Buttons/MonoBlock/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
button-classes: tc-text-editor-toolbar-item-start-group
|
button-classes: tc-text-editor-toolbar-item-start-group
|
||||||
shortcuts: ((mono-block))
|
shortcuts: ((mono-block))
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/mono-line
|
icon: $:/core/images/mono-line
|
||||||
caption: {{$:/language/Buttons/MonoLine/Caption}}
|
caption: {{$:/language/Buttons/MonoLine/Caption}}
|
||||||
description: {{$:/language/Buttons/MonoLine/Hint}}
|
description: {{$:/language/Buttons/MonoLine/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((mono-line))
|
shortcuts: ((mono-line))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/picture
|
icon: $:/core/images/picture
|
||||||
caption: {{$:/language/Buttons/Picture/Caption}}
|
caption: {{$:/language/Buttons/Picture/Caption}}
|
||||||
description: {{$:/language/Buttons/Picture/Hint}}
|
description: {{$:/language/Buttons/Picture/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((picture))
|
shortcuts: ((picture))
|
||||||
dropdown: $:/core/ui/EditorToolbar/picture-dropdown
|
dropdown: $:/core/ui/EditorToolbar/picture-dropdown
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/quote
|
icon: $:/core/images/quote
|
||||||
caption: {{$:/language/Buttons/Quote/Caption}}
|
caption: {{$:/language/Buttons/Quote/Caption}}
|
||||||
description: {{$:/language/Buttons/Quote/Hint}}
|
description: {{$:/language/Buttons/Quote/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((quote))
|
shortcuts: ((quote))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/strikethrough
|
icon: $:/core/images/strikethrough
|
||||||
caption: {{$:/language/Buttons/Strikethrough/Caption}}
|
caption: {{$:/language/Buttons/Strikethrough/Caption}}
|
||||||
description: {{$:/language/Buttons/Strikethrough/Hint}}
|
description: {{$:/language/Buttons/Strikethrough/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((strikethrough))
|
shortcuts: ((strikethrough))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/subscript
|
icon: $:/core/images/subscript
|
||||||
caption: {{$:/language/Buttons/Subscript/Caption}}
|
caption: {{$:/language/Buttons/Subscript/Caption}}
|
||||||
description: {{$:/language/Buttons/Subscript/Hint}}
|
description: {{$:/language/Buttons/Subscript/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((subscript))
|
shortcuts: ((subscript))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/superscript
|
icon: $:/core/images/superscript
|
||||||
caption: {{$:/language/Buttons/Superscript/Caption}}
|
caption: {{$:/language/Buttons/Superscript/Caption}}
|
||||||
description: {{$:/language/Buttons/Superscript/Hint}}
|
description: {{$:/language/Buttons/Superscript/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((superscript))
|
shortcuts: ((superscript))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
caption: {{$:/language/Buttons/Transcludify/Caption}}
|
caption: {{$:/language/Buttons/Transcludify/Caption}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
description: {{$:/language/Buttons/Transcludify/Hint}}
|
description: {{$:/language/Buttons/Transcludify/Hint}}
|
||||||
icon: $:/core/images/transcludify
|
icon: $:/core/images/transcludify
|
||||||
list-before: $:/core/ui/EditorToolbar/mono-block
|
list-before: $:/core/ui/EditorToolbar/mono-block
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
|
|||||||
icon: $:/core/images/underline
|
icon: $:/core/images/underline
|
||||||
caption: {{$:/language/Buttons/Underline/Caption}}
|
caption: {{$:/language/Buttons/Underline/Caption}}
|
||||||
description: {{$:/language/Buttons/Underline/Hint}}
|
description: {{$:/language/Buttons/Underline/Hint}}
|
||||||
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
|
condition: [<targetTiddler>!has[type]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]]
|
||||||
shortcuts: ((underline))
|
shortcuts: ((underline))
|
||||||
|
|
||||||
<$action-sendmessage
|
<$action-sendmessage
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
title: $:/core/ui/KeyboardShortcuts/open-control-panel
|
||||||
|
tags: $:/tags/KeyboardShortcut
|
||||||
|
key: ((open-control-panel))
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
<$navigator story="$:/StoryList" history="$:/HistoryList">
|
||||||
|
<$action-navigate $to="$:/ControlPanel" $scroll="yes"/>
|
||||||
|
</$navigator>
|
||||||
@@ -9,7 +9,7 @@ title: $:/core/ui/TagTemplate
|
|||||||
colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}
|
colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}
|
||||||
palette={{$:/palette}}
|
palette={{$:/palette}}
|
||||||
element-tag="$button"
|
element-tag="$button"
|
||||||
element-attributes="""popup=<<qualify "$:/state/popup/tag">> dragFilter="[all[current]tagging[]]" tag='span'"""
|
element-attributes="""popup=<<qualify "$:/state/popup/tag">> dragFilter="[subfilter{$:/core/config/TagPillDragFilter}]" tag='span'"""
|
||||||
/>
|
/>
|
||||||
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes" class="tc-drop-down">
|
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes" class="tc-drop-down">
|
||||||
<$set name="tv-show-missing-links" value="yes">
|
<$set name="tv-show-missing-links" value="yes">
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ title: $:/core/ui/TestCaseTemplate
|
|||||||
testActions="Actions"
|
testActions="Actions"
|
||||||
testHideIfPass=<<hideIfPass>>
|
testHideIfPass=<<hideIfPass>>
|
||||||
>
|
>
|
||||||
|
<$data $compound-filter={{!!import-compound}}/>
|
||||||
<$data $compound-tiddler=<<currentTiddler>>/>
|
<$data $compound-tiddler=<<currentTiddler>>/>
|
||||||
<$data title="Description" text={{!!description}}/>
|
<%if [{!!description}!is[blank]] %><$data title="Description" text={{!!description}}/><%endif%>
|
||||||
</$testcase>
|
</$testcase>
|
||||||
</$let>
|
</$let>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
title: $:/core/ui/testcases/DefaultTemplate
|
title: $:/core/ui/testcases/DefaultTemplate
|
||||||
|
code-body: yes
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
\procedure linkcatcherActions()
|
\procedure linkcatcherActions()
|
||||||
@@ -15,7 +16,7 @@ title: $:/core/ui/testcases/DefaultTemplate
|
|||||||
<div class="tc-test-case-wrapper">
|
<div class="tc-test-case-wrapper">
|
||||||
<div class="tc-test-case-header">
|
<div class="tc-test-case-header">
|
||||||
<h2>
|
<h2>
|
||||||
<$genesis $type={{{ [<linkTarget>!match[]then[$link]else[div]] }}} to=<<testcaseTiddler>>>
|
<$genesis $type={{{ [<linkTarget>!match[]then[$link]else[span]] }}} to=<<testcaseTiddler>>>
|
||||||
<%if [<testResult>!match[]] %>
|
<%if [<testResult>!match[]] %>
|
||||||
<span class={{{ tc-test-case-result-icon [<testResult>!match[fail]then[tc-test-case-result-icon-pass]] [<testResult>match[fail]then[tc-test-case-result-icon-fail]] +[join[ ]] }}}>
|
<span class={{{ tc-test-case-result-icon [<testResult>!match[fail]then[tc-test-case-result-icon-pass]] [<testResult>match[fail]then[tc-test-case-result-icon-fail]] +[join[ ]] }}}>
|
||||||
<%if [<testResult>!match[fail]] %>
|
<%if [<testResult>!match[fail]] %>
|
||||||
@@ -27,11 +28,36 @@ title: $:/core/ui/testcases/DefaultTemplate
|
|||||||
<%endif%>
|
<%endif%>
|
||||||
<$view tiddler="Description" mode="inline"/>
|
<$view tiddler="Description" mode="inline"/>
|
||||||
</$genesis>
|
</$genesis>
|
||||||
|
<span class="tc-test-case-toolbar">
|
||||||
|
<$button popup=`$(state)$-more`
|
||||||
|
tooltip={{$:/language/Buttons/More/Hint}}
|
||||||
|
aria-label={{$:/language/Buttons/More/Caption}}
|
||||||
|
class="tc-btn-invisible"
|
||||||
|
selectedClass="tc-selected"
|
||||||
|
>
|
||||||
|
{{$:/core/images/down-arrow}}
|
||||||
|
</$button>
|
||||||
|
<$let
|
||||||
|
tv-config-toolbar-icons="yes"
|
||||||
|
tv-config-toolbar-text="yes"
|
||||||
|
tv-config-toolbar-class="tc-btn-invisible"
|
||||||
|
>
|
||||||
|
<$reveal state=`$(state)$-more` type="popup" position="belowleft" animate="yes">
|
||||||
|
<div class="tc-drop-down">
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TestCase/Actions]!has[draft.of]]"
|
||||||
|
variable="listItem"
|
||||||
|
>
|
||||||
|
<$transclude $tiddler=<<listItem>> $mode="inline"/>
|
||||||
|
</$list>
|
||||||
|
</div>
|
||||||
|
</$reveal>
|
||||||
|
</$let>
|
||||||
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<%if [[Narrative]is[tiddler]] %>
|
<%if [[Narrative]is[tiddler]] %>
|
||||||
<div class="tc-test-case-narrative">
|
<div class="tc-test-case-narrative">
|
||||||
<$transclude $tiddler="Narrative" mode="block"/>
|
<$transclude $tiddler="Narrative" $mode="block"/>
|
||||||
</div>
|
</div>
|
||||||
<%endif%>
|
<%endif%>
|
||||||
<%if [<testResult>match[fail]] %>
|
<%if [<testResult>match[fail]] %>
|
||||||
@@ -46,7 +72,7 @@ title: $:/core/ui/testcases/DefaultTemplate
|
|||||||
<%endif%>
|
<%endif%>
|
||||||
<div class="tc-test-case-panes">
|
<div class="tc-test-case-panes">
|
||||||
<div class="tc-test-case-source">
|
<div class="tc-test-case-source">
|
||||||
<$macrocall $name="tabs" tabsList="[all[tiddlers]sort[]] -[prefix<state>] -Description -Narrative -ExpectedResult -Output Output +[putfirst[]] -[has[plugin-type]]" state=<<state>> default="Output" template="$:/core/ui/testcases/DefaultTemplate/SourceTabs"/>
|
<$macrocall $name="tabs" tabsList="[all[tiddlers]sort[]] -[prefix<state>] -Description -Narrative -Output Output +[putfirst[]] -[has[plugin-type]]" state=<<state>> default="Output" template="$:/core/ui/testcases/DefaultTemplate/SourceTabs"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc-test-case-divider">
|
<div class="tc-test-case-divider">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ title: $:/core/ui/testcases/DefaultTemplate/SourceTabs
|
|||||||
</table>
|
</table>
|
||||||
</$list>
|
</$list>
|
||||||
<$edit class="tc-edit-texteditor" tiddler=<<currentTab>>/>
|
<$edit class="tc-edit-texteditor" tiddler=<<currentTab>>/>
|
||||||
|
<div class="tc-test-case-footer-toolbar">
|
||||||
|
<$macrocall $name="copy-to-clipboard" src={{{ [<currentTab>get[text]] }}}/>
|
||||||
|
</div>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
<$transclude $variable="body" $mode="inline"/>
|
<$transclude $variable="body" $mode="inline"/>
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
title: $:/core/ui/testcases/actions/Export
|
||||||
|
tags: $:/tags/TestCase/Actions
|
||||||
|
|
||||||
|
<$macrocall $name="exportButton" exportFilter="[all[tiddlers]sort[]] -[prefix[$:/state/]] -Description -Narrative -ExpectedResult -Output Output +[putfirst[]] -[has[plugin-type]]" lingoBase="$:/language/Buttons/ExportTiddlers/"/>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
title: $:/core/ui/testcases/actions/Import
|
||||||
|
tags: $:/tags/TestCase/Actions
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
<$button tooltip={{$:/language/Buttons/TestCaseImport/Hint}} aria-label={{$:/language/Buttons/TestCaseImport/Caption}} class=<<tv-config-toolbar-class>>>
|
||||||
|
<$action-sendmessage $message="tm-import-tiddlers" $param=<<payloadTiddlers>>/>
|
||||||
|
{{$:/core/images/input-button}}
|
||||||
|
<span class="tc-btn-text">
|
||||||
|
<$text text={{$:/language/Buttons/TestCaseImport/Caption}}/>
|
||||||
|
</span>
|
||||||
|
</$button>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
title: $:/core/ui/ViewTemplate/body/code
|
title: $:/core/ui/ViewTemplate/body/code
|
||||||
|
|
||||||
|
<$transclude $variable="copy-to-clipboard-above-right" src={{{ [<currentTiddler>get[text]] }}} />
|
||||||
<$codeblock code={{{ [<currentTiddler>get[text]] }}} language={{{ [<currentTiddler>get[type]else[text/vnd.tiddlywiki]] }}}/>
|
<$codeblock code={{{ [<currentTiddler>get[text]] }}} language={{{ [<currentTiddler>get[type]else[text/vnd.tiddlywiki]] }}}/>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ title: $:/core/ui/ViewTemplate/body/import
|
|||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$action-confirm $message={{$:/language/Import/Listing/Cancel/Warning}} >
|
<$action-confirm $message={{$:/language/Import/Listing/Cancel/Warning}} >
|
||||||
<$action-deletetiddler $tiddler=<<currentTiddler>>/>
|
<$action-deletetiddler $tiddler=<<currentTiddler>>/>
|
||||||
|
<$action-deletetiddler $tiddler="$:/state/import/select-all"/>
|
||||||
<$action-sendmessage $message="tm-close-tiddler" title=<<currentTiddler>>/>
|
<$action-sendmessage $message="tm-close-tiddler" title=<<currentTiddler>>/>
|
||||||
</$action-confirm>
|
</$action-confirm>
|
||||||
\end
|
\end
|
||||||
|
|||||||
@@ -2,10 +2,4 @@ title: $:/core/ui/ViewTemplate/subtitle
|
|||||||
tags: $:/tags/ViewTemplate
|
tags: $:/tags/ViewTemplate
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
|
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateSubtitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/subtitle/default]] }}} />
|
||||||
<div class="tc-subtitle">
|
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Subtitle]!has[draft.of]]" variable="subtitleTiddler">
|
|
||||||
<$transclude tiddler=<<subtitleTiddler>> mode="inline"/><$list-join> </$list-join>
|
|
||||||
</$list>
|
|
||||||
</div>
|
|
||||||
</$reveal>
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
title: $:/core/ui/ViewTemplate/subtitle/default
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
|
||||||
|
<div class="tc-subtitle">
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Subtitle]!has[draft.of]]" variable="subtitleTiddler">
|
||||||
|
<$transclude tiddler=<<subtitleTiddler>> mode="inline"/><$list-join> </$list-join>
|
||||||
|
</$list>
|
||||||
|
</div>
|
||||||
|
</$reveal>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user