1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-16 23:04:50 +00:00

Compare commits

..

899 Commits

Author SHA1 Message Date
Jeremy Ruston
c0843420d5 Merge branch 'tiddlywiki-com' 2024-11-16 14:21:13 +00:00
Jeremy Ruston
e3052647ff Link to new mws.tiddlywiki.com site 2024-11-16 12:43:02 +00:00
Mario Pietsch
943030ccd2
[DOCS] Update TiddlyWiki Archive Overview (#8750) 2024-11-15 20:28:45 +00:00
Jeremy Ruston
de9a12b8f9 Preparing for v5.3.7 2024-11-15 17:21:22 +00:00
Jeremy Ruston
228c82e1db Version number update for 5.3.6 2024-11-15 17:14:49 +00:00
Jeremy Ruston
8993572fec Preparing for release of v5.3.6 2024-11-15 17:14:03 +00:00
Jeremy Ruston
b70f5bb0f7 Merge branch 'tiddlywiki-com' 2024-11-15 17:03:05 +00:00
Jeremy Ruston
747ffcaef2 Add banner to release note 2024-11-15 16:48:21 +00:00
Jeremy Ruston
fdafdba1b0 Update new release banner 2024-11-15 16:45:42 +00:00
Jeremy Ruston
e73784ac4e Reorder Find Out More badges 2024-11-15 12:26:38 +00:00
Jeremy Ruston
f10a1a0538 Release note update 2024-11-15 12:26:07 +00:00
Jeremy Ruston
3fb2f980c8
Geospatial Plugin: Improve Event Support (#8740)
* Add onclick attribute to geolayer widget

* Temporarily add the plugin to tw5.com for the Netlify preview

* Rename onclick to clickActions

And add docs for the lat, long, alt variables

* No longer apply the default popup template

Now that we have customisable popups the default one is pretty useless

* Prepare for merging to v5.3.6

The special circumstances are that this PR is confined to a plugin, and that the new work is an extension of the new features already merged in v5.3.6
2024-11-15 12:03:16 +00:00
Jeremy Ruston
3856d1bf6a Merge branch 'tiddlywiki-com' 2024-11-15 11:37:18 +00:00
Jeremy Ruston
683aae4977 Merge branch 'privacy-and-security-update' into tiddlywiki-com 2024-11-15 11:27:45 +00:00
Jeremy Ruston
63bc3c3d65 Merge branch 'tiddlywiki-com' 2024-11-14 22:18:15 +00:00
Jeremy Ruston
99f4d5cc8a Restore sample alert
Appears to have been accidentally removed back in 68095eb392 in November 2021
2024-11-14 22:14:35 +00:00
Jeremy Ruston
10cacfea9f Merge branch 'tiddlywiki-com' 2024-11-14 18:10:50 +00:00
Jeremy Ruston
77a227c1d0 Add banner advertising MWS
Closes #8731
2024-11-14 18:01:36 +00:00
Jeremy Ruston
0ea567b86d Tweaks 2024-11-14 17:04:54 +00:00
Jeremy Ruston
598d55a3cd Wording tweaks 2024-11-14 14:30:41 +00:00
Jeremy Ruston
0763ee5525 Change caption of Community Links badge 2024-11-14 14:30:31 +00:00
Jeremy Ruston
ca08eacce7 Reorder badges 2024-11-14 14:30:17 +00:00
Jeremy Ruston
4bac0bca70 Reduce number of links to TiddlyWiki 2024-11-14 14:22:57 +00:00
Jeremy Ruston
899a4984c0 Tweaks
Improvements suggested at https://talk.tiddlywiki.org/t/new-privacy-and-security-documentation/11167/2?u=jeremyruston
2024-11-14 14:19:54 +00:00
Jeremy Ruston
e80b3339b0 Merge branch 'tiddlywiki-com' into privacy-and-security-update 2024-11-14 10:40:58 +00:00
Jeremy Ruston
5644e48d92 First draft of Privacy and Security docs 2024-11-14 10:34:14 +00:00
Jeremy Ruston
a58337d594 Merge branch 'tiddlywiki-com' 2024-11-12 20:52:09 +00:00
Jeremy Ruston
036c16728b Add badge for Netlify preview builds 2024-11-12 20:51:16 +00:00
Jeremy Ruston
e3648c7ec1 Remove prerelease copy of scary warning styles 2024-11-12 20:36:26 +00:00
Jeremy Ruston
1f9cbd25b4 Merge branch 'tiddlywiki-com' 2024-11-12 20:36:03 +00:00
Jeremy Ruston
b18faf05c1 Add scary warning from prerelease
So that it is available in Netlify preview builds, which use the tw5.com edition, not prerelease
2024-11-12 20:35:51 +00:00
Jeremy Ruston
8a7b211a5a Add a badge that is displayed for the Netlify preview builds 2024-11-12 19:51:39 +00:00
Jeremy Ruston
c08d946981 Merge branch 'tiddlywiki-com' 2024-11-12 12:37:00 +00:00
Jeremy Ruston
814f6b5dbb Improve resolution of introduction thumbnail 2024-11-12 12:36:49 +00:00
Jeremy Ruston
0ad080110a Fix social media card image URL 2024-11-12 12:17:06 +00:00
Jeremy Ruston
13bedda377 Add social media cards for the main edition 2024-11-12 12:05:16 +00:00
Jeremy Ruston
e43cccc432 Do not wikify "TiddlyWiki" in social media card UI 2024-11-12 11:55:40 +00:00
IchijikuIchigo
0fbf14bb7a
[ja_JP] Japanese translation update (#8735)
* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\workingwithtw\Working with TiddlyWiki.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\The First Rule of Using TiddlyWiki.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\gettingstarted\GettingStarted - Android.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\gettingstarted\GettingStarted - Chrome.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\gettingstarted\GettingStarted - Firefox.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\gettingstarted\GettingStarted - Internet Explorer.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\gettingstarted\GettingStarted - iOS.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\gettingstarted\GettingStarted - Node.js.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\gettingstarted\GettingStarted - Online.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\gettingstarted\GettingStarted - Safari.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\howtos\Upgrading.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\workingwithtw\Navigating between open tiddlers.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\features\Searching in TiddlyWiki.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\workingwithtw\Using links to navigate between tiddlers.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\workingwithtw\Creating and editing tiddlers.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\workingwithtw\Creating and editing tiddlers.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\workingwithtw\Creating journal tiddlers.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving on a PHP Server.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving with TW Receiver.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\workingwithtw\Formatting text in TiddlyWiki.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Editor toolbar.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Height of text editor.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Insert link.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Insert picture.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\More actions.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Text preview.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Using Excise.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Structuring TiddlyWiki.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\howtos\KeyboardShortcuts.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\workingwithtw\BrowserCompatibility.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Using Stamp.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\howtos\Tagging.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\concepts\Order of Tagged Tiddlers.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\concepts\TagTiddlers.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to update TiddlyWiki to the latest version.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\wikitext\Images in WikiText.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\saving\Encryption.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\workingwithtw\Audio.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\workingwithtw\Performance.tid
2024-11-10 16:46:15 +00:00
Leilei332
0160a4f3d3
Flexoki palette update (#8733)
* Add modal colors to Flexoki Light palette
* Make Flexoki Light palette primary color darker to improve contrast
* Improve Flexoki Dark contrast
2024-11-09 11:47:51 +00:00
Jeremy Ruston
b7c290a163 Privacy and security badge 2024-11-07 08:58:53 +00:00
Jeremy Ruston
144a8ac3ff Improve card spacing
Looks better on wide screens - see the problem here https://x.com/0x_syk/status/1853918855724495237
2024-11-06 17:08:00 +00:00
Jeremy Ruston
135a2e5320 Site build should not be verbose 2024-11-06 13:37:42 +00:00
Jeremy Ruston
9629d9e508 Update Netlify badge 2024-11-06 10:43:09 +00:00
Jeremy Ruston
248de77117 Update readme to include Netlify credit 2024-11-06 09:06:36 +00:00
Jeremy Ruston
de6b04d50d Fix filename of default page template
This was changed in #8172 but I think it was a mistake to allow the filename to become inconsistent with the tiddler title
2024-11-04 19:26:06 +00:00
Jeremy Ruston
116b1b15af Simplify descriptions of Flexoki palettes 2024-11-04 10:39:12 +00:00
Jeremy Ruston
2eceee34fa Merge branch 'tiddlywiki-com' 2024-11-03 16:10:12 +00:00
Mario Pietsch
12f7c077f0
[DOCS] Fix Tiddler Info Tab Default Description (#8726)
* [DOCS] Fix Tiddler Info Tab Default Description

* Update Configuring the default TiddlerInfo tab.tid
2024-11-03 16:07:07 +00:00
Mario Pietsch
60a34bb228
[DOCS] Rename: Hidden Setting: Import Content Types for Editor (#8727) 2024-11-03 16:06:45 +00:00
Jeremy Ruston
3d536ed2ae Update release note 2024-11-03 15:17:12 +00:00
Xavier Cazin
208de70e17
Catchup with fr-FR translation (#8722)
* fr-FR translation for new buttons:
- OpenControlPanel
- TestCaseImport
- Excise/DefaultTitle

* fr-FR translations for SocialCard-related strings

* fr-FR translations for stability badges and testcase accent colors

* fr-FR translations for function and procedure definition snippets

* fr-FR translation for compound tiddlers type
2024-11-03 15:16:31 +00:00
Jeremy Ruston
d27a847e67
Add Flexoki palettes (#8545)
* Initial Commit

* Use leading zeros for 2 digit codes

As suggested by @pmario in https://github.com/TiddlyWiki/TiddlyWiki5/pull/8545#issuecomment-2304541731, makes the colours display better in the editor

* Palette entries for alerts, codeblocks and diffs

* Update download button colour

* Add more colors to Flexoki Light palette (#8620)

* Add more colors to Flexoki Light palette

Add more colors to flexoki light palette, including:

* Dirty indicator
* Table borders and headings
* Tiddler info
* Sidebar tabs and buttons
* Stability badges
* Code blocks

* Add more colours

* Add message box colors
* Add notification colors
* Add editor background color
* Changed muted background color to fix low-contrast
* Add tiddler title color

* Add colour for external links

* Flexoki palette update (#8724)

* Flexoki palette update

* Add dark palette
* Add menubar colors
* Update diff widget colors

* Update inline code color

* Use hardcoded color for some color & add message box color

* Remove dev palette settings

---------

Co-authored-by: Leilei332 <LeiYiXia29@outlook.com>
2024-11-03 15:14:46 +00:00
Leilei332
86abb9bdb5
Fix $:/temp/advancedsearch displayed in Shadow search (#8723)
Fix the problem introduced in #8678.
2024-11-03 15:10:43 +00:00
Jeremy Ruston
c0f7a77ab1 Release note tweak 2024-10-31 17:45:37 +00:00
Jeremy Ruston
763fae5c53 Update release note 2024-10-31 17:04:05 +00:00
Mario Pietsch
ebb9c4f082
[DOCS] Make LinkCatcher variables more visible (#8713)
* Make LinkCatcher variables more visible

* move tip to bottom
2024-10-31 16:05:03 +00:00
Jeremy Ruston
f565b5b55d Fix genesis widget so that explicit attributes take precedence
Fixes #8701
2024-10-30 14:51:04 +00:00
Jeremy Ruston
6787a174b1 Revert "Add new classes to wikitext created emphasised elements to make them easily stylable (#8163)"
This reverts commit 44cf2e3c70.
2024-10-30 14:47:26 +00:00
Mohammad Rahmani
201b695d96
Replace Deprecated SaveTiddler(s) with Save Command (#8710) 2024-10-30 14:15:33 +00:00
Mohammad Rahmani
87d9e59e03
Correct the Filter when Generating the HTML Representations of All Individual Non-system Tiddlers (#8671) 2024-10-30 14:14:45 +00:00
Mario Pietsch
44cf2e3c70
Add new classes to wikitext created emphasised elements to make them easily stylable (#8163)
* allow internal link to be wikitex formatted as bold

* fix typo

* add new classes to all emphasis and inline-code elements

* fix tests for new STRONG classes
2024-10-30 09:19:01 +00:00
Mario Pietsch
9b2e8a61ed
Use Node.js v 22.x.y for our GH build system (#8708) 2024-10-29 12:34:50 +00:00
Leilei332
40fca47974
Translator editon update (#8703)
* Translator editon update

Update for the translator editon, including:

* Changes to `--render` in `tiddlywiki.info`, and changes the command
  for generating `$:/languages/Docs/Types/` to replace strings with `_`
instead of using uri encoding.
* Update docs. The guide for changing `$:/core/readme` tiddler is wrong,
  so I removed it.

* Simplify templates and commands

* Add progress bar
2024-10-29 12:07:12 +00:00
Leilei332
561296db71
Make markdown's highlight look the same as tiddlywiki's (#8704) 2024-10-29 12:06:27 +00:00
Saq Imtiaz
a687aefbe9
Extends element widget with support for CSS custom properties (#8699)
* Extend element widget with support for CSS custom properties.

* chore: added tests

* chore: code style

* docs: added documentation for support for CSS custom properties

* docs: added documentation for support for CSS custom properties
2024-10-29 11:59:04 +00:00
IchijikuIchigo
bb53cc5791
[ja_JP] Japanese translation update (#8705)
* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\videos\Videos.tid

* [ja-JP] A little correction to the Japanese translation

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\videos\Introduction Video.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\videos\Introducing TiddlyDesktop Video.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\videos\TiddlyWiki on Firefox for Android Video.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\videos\Working with the TiddlyWiki5 repository video.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\community\OXTWIG.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\TiddlyWiki Hangouts.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\learning\Learning.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\filters\Introduction to filter notation.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Sharing a TiddlyWiki on Dropbox.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\workingwithtw\Sharing your tiddlers with others.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\learning\Copying tiddlers between TiddlyWiki files.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Creating SubStories.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Editing Tiddlers with Emacs.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Making curved text with SVG.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\demonstrations\Tasks\TaskManagementExample.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\demonstrations\Tasks\Compose ballad.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\demonstrations\Tasks\done.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\demonstrations\Tasks\done.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\demonstrations\Tasks\Go to Mordor.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\demonstrations\Tasks\Kill the Dragon.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\demonstrations\Tasks\Get the Ring.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\demonstrations\Tasks\Make the beds.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\demonstrations\Tasks\task.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Adding a Twitter Follow button.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\about\Philosophy of Tiddlers.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Adopt a Titles Policy.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Concatenating text and variables using macro substitution.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Constructing JSON tiddlers.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Editing Tiddlers with Vim.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Formatting_List_Results_as_Tables_(no_CSS).tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Formatting List Results as Tables with CSS - Specified Columns Methods.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Formatting List Results as Tables with CSS - Variable Column Method.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\howtos\How_to_add_a_new_tab_to_the_sidebar.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to change the sort order of sub-branches in a TOC macro.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to create a custom tiddler colour rule.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to create a custom tiddler icon rule.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to export tiddlers.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to hide the authors and other fields with CSS.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to put the last modification date in a banner.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\howtos\How_to_turn_off_camel_case_linking.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to widen tiddlers (aka story river).tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\images\Icon Gallery.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Modifying JSON tiddlers.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Reading data from JSON tiddlers.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Simple ways to write protect tiddlers.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\demonstrations\Tasks\TaskManagementExampleDraggable.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\demonstrations\Tasks\TaskManagementExampleDraggableTemplate.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Visible Transclusions.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\demonstrations\KeyboardDrivenInput\Demonstration_ keyboard-driven-input Macro.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to add a banner for GitHub contributions.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to create a custom story tiddler template.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to create keyboard shortcuts.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to customize TiddlyDesktop.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\How to embed PDF and other documents.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\learning\Introduction to Lists.tid'

* [ja_JP] Japanese translation update from commit: 6d11f4b

* [ja-JP] Corrected the display content of modified date in Japanese translation
2024-10-29 10:47:06 +00:00
Mohammad Rahmani
5ddcd5a666
Replace Deprecated renderTiddler with render command (#8700) 2024-10-29 10:39:45 +00:00
Mario Pietsch
8b9723f6c7
Add action tiddler list to droppable widget (#8256)
* initial POC

* clean up the code

* Add documentation changes

* Improve docs
2024-10-24 17:51:19 +01:00
Mario Pietsch
b68de0d69f
Toc uses currentTiddler as "tag" default parameter if it is missing (#8291)
* toc's use currentTiddler, if tag prameter is undefined

* add currentTiddler info to toc documentation
2024-10-24 17:39:18 +01:00
Leilei332
c060216a8e
Make recent tab limit configurable (#8698)
Make maxium number of tiddlers under the "Recent" tab configurable in
the `$:/config/RecentLimit` tiddler. UI for configuring this option is
also added under the "Settings" tab.
2024-10-24 15:09:30 +01:00
Simon Huber
8b60cab6a2
Keyboard driven input rework (#8678)
* Update tag-picker.tid

* rework kb-driven-input macro to procedures + new syntax

* rework change-input-tab to procedure

* fix

* remove console log :)

* replace defines with procedures

* fix link-dropdown

* fix focus-selector in new-field dropdown

* revert changing the footpring of change-input-tab + make it work as procedure

* update change-input-tab procedure

* refactor change-input-tab procedure and keep tags/Macro tag

* simplify complicated filter

* add tags/Global tag

* remove tags/Global tag

* rename variable
2024-10-24 14:34:23 +01:00
Jeremy Ruston
9635e2d8af Revert refactoring CSS helper macros as functions
See discussion at https://github.com/TiddlyWiki/TiddlyWiki5/pull/7987#issuecomment-2431123638
2024-10-23 08:21:11 +01:00
Jeremy Ruston
73bc45b305 Merge branch 'tiddlywiki-com' 2024-10-22 17:26:37 +01:00
Jeremy Ruston
0a03ac8219 Revert to just using $:/tags/Macro for core macros
See #8683
2024-10-22 13:15:34 +01:00
Jeremy Ruston
b6c8045739 Further updates to Grok TiddlyWiki banner 2024-10-22 08:51:43 +01:00
Jeremy Ruston
3a34a2e8d9 Update Grok TiddlyWiki banner 2024-10-22 08:50:55 +01:00
Jeremy Ruston
192fb9794d Merge branch 'tiddlywiki-com' 2024-10-21 17:43:27 +01:00
Jeremy Ruston
ea3cb1c58d Fix build command crash with no wiki folder
Fixes #8694
2024-10-21 17:42:35 +01:00
Jeremy Ruston
5490b782a6 Improve content of "Welcome" tiddler 2024-10-21 17:35:53 +01:00
Jeremy Ruston
b9218a8391 Merge branch 'tiddlywiki-com' 2024-10-21 17:14:50 +01:00
Jeremy Ruston
6d11f4b506 Update Grok TiddlyWiki links for 2.0 2024-10-21 17:14:39 +01:00
Leilei332
a0caa0f12d
Fix timeline macro showing long list of tiddlers created the same day. (#8690) 2024-10-20 10:47:50 +01:00
Leilei332
e1287a9470
Fix smaller editor toolbar icons (#8691)
A small fix for the problem introduced in #8688
2024-10-20 10:35:21 +01:00
zorrox1024
b3c2385018
Sign CLA (#8693)
Co-authored-by: Jeffrey Zhang <zhang.lei.fly@gmail.com>
2024-10-20 10:34:43 +01:00
Leilei332
a42a7972cb
Further fix icons not displaying properly. (#8688) 2024-10-19 13:41:30 +01:00
Leilei332
e259f414d9
Fix some tiddlers should use code body (#8687)
A small fix which applys code bodies to these tiddlers:
* Tiddlers with prefix `$:/core/config/`
* Tiddlers tagged `$:/EditorTools` and `$:/tags/ToolbarButtonStyle`
2024-10-19 09:24:24 +01:00
Jeremy Ruston
646f5ae7cf Fix blank language plugin name
Introduced in 41b9f625b3
2024-10-18 13:50:15 +01:00
Leilei332
e25ab7777f
Further fix content overflow. (#8682)
This reverts fix for all tables. It should fix #8617.

It also adds fix for overflow in $:/Manager 's content page, testcase
widget output. The fix for overflow $:/TagManager is reverted since it
caused the dropdown not to display properly.
2024-10-18 13:16:50 +01:00
Mario Pietsch
14d1672f6a
[DOCS] Improve TW Commands Listing (#8684)
* [DOCS] Improve TW Commands Listing

* Fix typos as requested
2024-10-18 13:01:42 +01:00
Mario Pietsch
0b789bf28b
Adjust multi-columns CSS class to switch earlier for smaller displays (#8686) 2024-10-18 12:01:58 +01:00
Jeremy Ruston
060cfd4868 Fix geomap with markers docs demo 2024-10-17 11:14:09 +01:00
Jeremy Ruston
142fef73f2 Docs: Update modified date for History of TiddlyWiki tiddler 2024-10-16 12:52:16 +01:00
Jeremy Ruston
9e253efd9a Merge branch 'tiddlywiki-com' 2024-10-16 11:25:03 +01:00
Jeremy Ruston
a8822add1e Link to GitHub anniversary contributors discussion 2024-10-16 09:49:03 +01:00
Jeremy Ruston
a95cad4ef6 Update release note 2024-10-15 18:11:27 +01:00
IchijikuIchigo
416925d354
[ja_JP] Japanese translation update (#8679)
* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\hellothere\HelloThere.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\hellothere\quickstart\tiddlyhost.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\hellothere\quickstart\desktop.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\hellothere\quickstart\diy.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\hellothere\quickstart\xememex.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\hellothere\quickstart\Quick Start.tid'

* [ja-JP] Modify 'editions\fr-FR\tiddlers$ _config_ViewTemplateTitleFilters_fr-default.tid' for Japanese

* [ja-JP] Modify 'editions\fr-FR\tiddlers$ _core_ui_ViewTemplate_title_fr-default.tid' for Japanese

* [ja-JP] Modify 'editions\fr-FR\tiddlers-FR_Macros_list.tid' for Japanese

* [ja-JP] Modify 'editions\fr-FR\tiddlers-FR_Macros_timeline-title.tid' for Japanese

* [ja-JP] Modify 'editions\fr-FR\tiddlers-FR_Macros_toc-caption.tid' for Japanese

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\_tw_shared\sites.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\_tw_shared\sites\classic.tiddlywiki.com.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\_tw_shared\sites\links.tiddlywiki.org.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\_tw_shared\sites\marketplace.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\_tw_shared\sites\talk.tiddlywiki.org.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\_tw_shared\sites\tiddlywiki.com.dev.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\_tw_shared\sites\tiddlywiki.com.prerelease.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\_tw_shared\sites\tiddlywiki.com.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\_tw_shared\sites\tiddlywiki.com.upgrade.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\_tw_shared\sites\tiddlywiki.org.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\gettingstarted\GettingStarted.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\menubar\gettingstarted.tid

* [ja-JP] Modify 'editions\fr-FR\tiddlers\system.tid' for Japanese

* [ja-JP] Modify 'editions\fr-FR\tiddlers\system.tid' for Japanese

* [ja-JP] Modify 'editions\fr-FR\tiddlers\system.tid' for Japanese

* [ja-JP] Modify 'editions\fr-FR\tiddlers\system.tid' for Japanese

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\system\TableOfContents.tid

* [ja-JP] Japanese translation of plugins\tiddlywiki\menubar\items\contents.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\hellothere\thumbnails\HelloThumbnail - Twenty Years of TiddlyWiki.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\hellothere\thumbnails\HelloThumbnail - Newsletter.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\hellothere\thumbnails\HelloThumbnail - Introduction Video.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\hellothere\thumbnails\HelloThumbnail - Grok TiddlyWiki.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\hellothere\thumbnails\HelloThumbnail - Latest Version.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\hellothere\thumbnails\HelloThumbnail - Funding.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\hellothere\thumbnails\HelloThumbnail - TiddlyWikiLinks.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\hellothere\thumbnails\HelloThumbnail - Marketplace.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\hellothere\thumbnails\HelloThumbnail - Intertwingled Innovations.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\testimonials\Testimonials - Joe Armstrong.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\testimonials\Testimonials - Network World.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\testimonials\Testimonials - Product Hunt.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\community\Community.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\community\Forums.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\community\Forums.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\about\Developers.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\about\Developers.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\community\Latest.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\community\Tutorials.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\Community Editions.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\community\Latest.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\community\Tutorials.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\Community Plugins.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\Community Palettes.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\Community Themes.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\Other Resources.tid'

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\community\Examples.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\community\Articles.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\community\Meetups.tid

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\saving\Saving.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving on TiddlyDesktop.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving on TidGi.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving on Android.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving on Browser with the File System Access API.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving on Browser with TiddlyStow.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving on TiddlyHost.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving via WebDAV.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving with the HTML5 saver.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving via minimal Ruby server.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving with FireFox.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving with Polly.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving to a Git service.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving via a Minimal Web Server.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving on iPad_iPhone.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving with TiddlyFox.tid'

* Display the modified date and time of the original tiddler

* Add translation changes to Japanese from commit: 47519b1

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving with TiddlyIE.tid'

* Add translation changes to Japanese from commit: 0a8fcfd

* [ja-JP] Japanese translation of editions\tw5.com\tiddlers\hellothere\Welcome.tid

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\hellothere\Find Out More.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\hellothere\Testimonials and Reviews.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\TiddlyWiki on the Web.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\videos\Getting Started Video.tid'

* [ja-JP] Add translation changes to Japanese from commit: 04185b4

* [ja-JP] Add translation changes to Japanese from commit: 0a8fcfd

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\resources\Twexe_ Single File Tiddlywiki5 executable.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\resources\_file-backups_ Extension Firefox by pmario.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\resources\_Timimi_ Extension and executable by Riz.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Installing TiddlyWiki on Microsoft Internet Information Server.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\resources\TiddlyServer by Arlen Beiler.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\howtos\Windows HTA Hack.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\resources\TiddlyDrive Add-on for Google Drive by Joshua Stubbs.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\nodejs\Installing TiddlyWiki on Node.js.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\resources\TW5-firebase_ TiddlyWiki5 for Google Firebase by Peter Neumark.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\resources\TW5-firebase_ TiddlyWiki5 for Google Firebase by Peter Neumark.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Saving with TiddlyPWA.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\TiddlyBucket - Save to AWS or Google Storage.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\Emergency Tiddler Export.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\editions\_Noteself_ by Danielo Rodriguez.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\saving\TiddlyWiki in the Sky for Dropbox.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\nodejs\Serving TW5 from Android.tid'

* [ja-JP] Japanese translation of 'editions\tw5.com\tiddlers\community\resources\_savetiddlers_ Extension for Chrome and Firefox by buggyj.tid'

* [ja-JP] Corrected the translation of HTML5 saver
2024-10-14 12:32:17 +01:00
Leilei332
e44d6f4d7b
Small fix for en-PH language (#8676)
A small fix for two problems introduced #8669.

* Two tab should be used to indent instead of four spaces in
  `tiddlywiki.info` in full edition.
* Changed description for `en-PH`. Since "PH" isn't a country name like
  "US", it should be "Philippines".
2024-10-11 13:40:35 +01:00
Jeremy Ruston
a51afc8b81 Add support for HTTP bearer authentication 2024-10-10 15:10:55 +01:00
Jeremy Ruston
48cbaa1ec7 Merge branch 'tiddlywiki-com' 2024-10-10 15:04:51 +01:00
Jeremy Ruston
2933855f31 Ensure "TiddlyWiki on the Web" links are displayed correctly
Thanks @ericshulman
2024-10-10 15:04:38 +01:00
Leilei332
ead0fd5219
Migrate to eslint 9 (#8673)
* Migrate to eslint 9

* Add comment in eslintignore
2024-10-10 13:32:57 +01:00
Jeremy Ruston
d955f259ec Merge branch 'tiddlywiki-com' 2024-10-09 21:42:26 +01:00
Jeremy Ruston
0a8fcfd3ba HelloThere tweaks suggested by @CrossEye 2024-10-09 21:31:21 +01:00
Jeremy Ruston
8712979deb Add note about AI images 2024-10-09 21:18:52 +01:00
Jeremy Ruston
f5b7b0cc55 Merge branch 'tiddlywiki-com' 2024-10-09 18:16:55 +01:00
Jeremy Ruston
4c64ae5afa Notes about the newsletter 2024-10-09 18:09:31 +01:00
Jeremy Ruston
04185b49af Further Quick Start tweaks 2024-10-09 16:44:04 +01:00
Jeremy Ruston
b2c3e2b01d Fix QuickStart cards 2024-10-09 16:23:15 +01:00
Jeremy Ruston
78f1209672 Improve tagging of HelloThere tiddlers
Suggested by @ericshulman
2024-10-09 15:45:28 +01:00
Jeremy Ruston
5dd72d8223 GettingStarted styling fixes
From @ericshulman see https://talk.tiddlywiki.org/t/gettingstarted-tiddler-on-tiddlywiki-com-not-showing-any-results/10864/7
2024-10-09 15:29:19 +01:00
Jeremy Ruston
d02c220ddf Restore $:/_tw5.com-card-template
Fixes error in #8664
2024-10-09 14:54:58 +01:00
Mateusz Wilczek
ddb6c206cb
Update docs for makeqr macro (#8654) 2024-10-09 12:11:44 +01:00
Mateusz Wilczek
a4c2454773
Update font stacks (#8628)
* Update font stacks in vanilla theme

* Fix punctuation in font stacks
2024-10-09 12:05:41 +01:00
Jeremy Ruston
e3e29ec463 Merge branch 'tiddlywiki-com' 2024-10-08 17:12:25 +01:00
Jeremy Ruston
47519b1703
Experiments: Refactoring HelloThere (#8664)
* Initial Commit

* Fix default tiddlers for prerelease

* Use parsermode: inline for tiddlers that don't semantically have paragraphs

* Tweak card styles

Cards can now grow slightly to fill the available space

* Rename "Community Links" to "TiddlyWiki on the Web", and excise the items to individual tiddlers

* Revert changes to core styles

* Introductory text for each welcome tiddler

* Colours for welcome tiddlers

* Simplify introduction of GettingStarted

* Update TiddlyFox information

* Move all the card related definitions into their own folder

Perhaps preparatory to making them into a plugin, or putting them into the core

* Add a hover effect for card icons

* Retract changes to GettingStarted and system fonts

We'll come back to that

* Revert properly
2024-10-08 17:11:30 +01:00
Yohan Yukiya Sese-Cunetaㆍ사요한・謝雪矢
41b9f625b3
Language plugin: add en-PH (English (PH)) as a new translation (#8669)
* initial en-PH

* English (PH) [en-ph] translation v1

* fix: moved en-PH to the correct file in /editions/full/tiddlywiki.info

* deleted since changes were mainly on styles, like em or en dash instead of regular dash

* upd: 'dependents' not needed in this particular case

* deleted 'empty' files

* upd: removed modifications which were mainly related on style (like em and en dashes);
upd: CamelCase instead of separating camelCase and PascalCase (see https://github.com/TiddlyWiki/TiddlyWiki5/pull/8669#pullrequestreview-2352481385 )

* upd: Simplified Confirm* strings;
upd: natural DateFormat (instead of formal format)

* upd: 'want' instead of 'wish'

* upd: natural DateFormat (instead of ISO format)

* minor: used 'the' instead of 'a' or 'an' as reading of '.html' depends on the reader (ie. a 'dot html' extension vs an 'html' extension)
2024-10-08 15:05:49 +01:00
Yohan Yukiya Sese-Cunetaㆍ사요한・謝雪矢
0451a8aa8d
CLA-individual signed: JC John Sese Cuneta, @techmagus, 2024/10/07 (#8670)
Individually signed the CLA.

 JC John Sese Cuneta, @techmagus, 2024/10/07
2024-10-08 15:05:13 +01:00
Mario Pietsch
1736d9dd4d
Fix misaligned subtitle (#8672) 2024-10-08 11:48:46 +01:00
Jeremy Ruston
491b664798 Merge branch 'tiddlywiki-com' 2024-10-07 11:41:52 +01:00
Leilei332
8a47eb2d03
[DOCS] Update commands in "Generating Static Sites with TiddlyWiki" to use render command (#8666)
* Update commands in "Generating Static Sites with TiddlyWiki" to use render command & add deprecated tag to some command

* Remove timestamp in deprecated commands
2024-10-07 11:22:06 +01:00
Mohammad Rahmani
c0415d9c93
Make All Hex Color Code Consistent (#8665) 2024-10-06 17:43:18 +01:00
Jeremy Ruston
f2a3e74e8b Merge branch 'tiddlywiki-com' 2024-10-05 11:07:58 +01:00
Jeremy Ruston
20611cc875 Force a build 2024-10-03 21:16:15 +01:00
Jeremy Ruston
ac8fa2cf00 Remove obsolete mobiledragdrop plugin 2024-10-03 16:41:19 +01:00
Jeremy Ruston
2327dd043f Revert "Fix alignment in tiddler subtitle (#8659)"
This reverts commit f4f1ae6b9b.
2024-10-03 13:19:23 +01:00
Mario Pietsch
f4f1ae6b9b
Fix alignment in tiddler subtitle (#8659) 2024-10-03 12:34:39 +01:00
Saq Imtiaz
e591dfd590
Update the editor file import UI to support markdown tiddlers (#8486)
* chore: update editor file import to use procedures and substitute operator

* feat: refactor editor file-import UI to reuse filter from $:/config/Editor/EnableImportFilter

* feat: support for markdown in editor file import UI

* feat: improve markdown type detection and enable markdown image imports by default

* fix: uri encode tiddler titles for markdown

* escape characters instead of URI encoding

* fix: tweak regexp to simplify code and document escaping rules
2024-10-02 13:15:53 +01:00
Leilei332
c82761a600
Add tc-table-wrapper class to fix overflow (#8652)
* Add tc-table-wrapper class to fix overflow

* Apply class in tag manager body
2024-10-02 13:06:40 +01:00
Joe Bordes
d981e45e15
i18n(ES) update to latest code base (#8653) 2024-10-02 13:00:04 +01:00
Leilei332
2dd8ff95b2
Fix github fork ribbon plugin marked as deprecated & add it back to full edition. (#8656) 2024-10-02 12:42:49 +01:00
Mario Pietsch
fca39c7f72
Remove function wrapper (#8625)
* remove function wrapper

* add back anonymous function to sjcl.tid
2024-10-01 13:16:39 +01:00
btheado
7bf2fee15e
Fix geospatial plugin map state loading (#8511) 2024-09-30 14:49:33 +01:00
j. redhead
fc197e1bfa
Improve documentation of how to disable CamelCase (#8626) 2024-09-30 14:28:41 +01:00
Leilei332
0aa9cf6669
Include Polish language in full edition (#8638)
Fix the problem that Polish is not included in the full edition
2024-09-30 14:27:38 +01:00
Leilei332
6e4a64b6cd
Remove deprecated plugins in full edition (#8639)
Remove plugins that are marked deprecated in full edition
2024-09-30 14:27:22 +01:00
Saq Imtiaz
3f4067ef7b
Fix: variables in functions should not pollute upstream widgets (#8641) 2024-09-30 14:26:36 +01:00
Simon Huber
96840b886f
Fix mediatype Typo in excise.js (#8640)
This fixes the typo "mediatype" instead of "mediaType" causing a RSOE
2024-09-30 14:26:00 +01:00
Leilei332
bb462210c3
Make stability badges in add plugin modal translatable (#8642)
A further implementation for #8614
2024-09-30 14:24:10 +01:00
Leilei332
36b988c273
Gather all the plugins' settings page under the control panel's "Settings" tab. (#8643) 2024-09-30 14:23:29 +01:00
Leilei332
2a77d6afdf
Fix confusing empty message in tag dropdown (#8649) 2024-09-30 13:40:45 +01:00
IchijikuIchigo
1e6d7b030f
Signing the CLA (#8647) 2024-09-30 08:58:04 +01:00
Saq Imtiaz
3a9d375fb2
Fix: syntax issues with checking target branch for CLA signatures (#8648) 2024-09-30 08:46:54 +01:00
Jeremy Ruston
459cae2817 Merge .github directory from master 2024-09-26 16:31:35 +01:00
Saq Imtiaz
de15b08b81
Update SystemTag_ $__tags_ClassFilters_PageTemplate.tid (#8635) 2024-09-26 14:48:54 +01:00
Jeremy Ruston
52cb5763c8 Fixed update readme stats 2024-09-25 21:35:50 +01:00
Jeremy Ruston
ab09d17499 Revert "Update readme stats"
This reverts commit 53e1cad0d6.
2024-09-25 21:35:17 +01:00
Jeremy Ruston
53e1cad0d6 Update readme stats
Fixes #8633
2024-09-25 19:46:21 +01:00
Mario Pietsch
bb75560922
Add basic view-widget tests (#8632) 2024-09-25 13:02:10 +01:00
Mario Pietsch
501cb7beaa
[DOCS] Improve TW Readme structure (#8634) 2024-09-25 13:01:26 +01:00
Saq Imtiaz
006157ee97
Update cla-check.yml to be caseinsensitive 2024-09-24 19:26:30 +02:00
Maurycy Zarzycki
ae8a6e7fb8
Pl 2024 09 24 (#8631)
* Fix accidentally putting Polish translation in English locale

* Add translations introduced in c386411570
2024-09-24 18:11:40 +01:00
Jeremy Ruston
678c272979 Revert "Improve View Widget Refreshing (#8135)"
This reverts commit 6ae00e4973.
2024-09-24 11:48:54 +01:00
lin onetwo
a60e7165d2
Feat: loading indicator for tiddlers being lazy loaded (#8505)
* feat: basic loading

* feat: if condition

* feat: use palette

* refactor: remove css variable
2024-09-24 11:38:39 +01:00
Jeremy Ruston
9a042c0130 Merge branch 'tiddlywiki-com' 2024-09-23 12:16:38 +01:00
Jeremy Ruston
c64e94fdc2 Update TiddlyWiki History 2024-09-23 12:11:15 +01:00
Jeremy Ruston
ecbbbe39da 20 years of TiddlyWiki banner 2024-09-23 12:06:47 +01:00
Jeremy Ruston
6abfbc3987 Remove extraneous build of the dev edition 2024-09-21 13:31:07 +01:00
j. redhead
38f7e792bc
Docs: fix typo in a wikilink (#8616) 2024-09-21 10:56:37 +01:00
Leilei332
c386411570
Make stability badge text translatable (#8614) 2024-09-17 14:16:18 +02:00
Leilei332
73225d09d7
Fix shadow tiddler with code body displayed as missing (#8609)
Fix problem introduced in #8604
2024-09-17 08:52:46 +02:00
Leilei332
8d80ff297c
Fix colour-picker dropdown auto close when selecting or typing a color (#8610) 2024-09-17 08:51:13 +02:00
Maurycy Zarzycki
0222d4df7c
Add translation changes to Polish from commits: (#8612)
* ece8b0ee01
* 5aa3646df5
* c8cbf6853e
* 18152aa7c8
* d2302df197
* 8735d1ac93
* 82bf4480de
* 3af2a0ae6f
* 57d3e8e765
* 5c43512a56
* 98cd4a09b4
* 98d411c08a
2024-09-17 08:48:32 +02:00
Leilei332
6dbdbfbe82
Fix overflow in table and table-of-contents (#8608)
Another approach fix overflow.
2024-09-16 14:24:58 +02:00
Leilei332
19990802fa
Fix missing tiddler with code body isn't displayed properly. (#8604) 2024-09-16 11:39:50 +02:00
Leilei332
0f4d6e4e47
Fix extra p tag in colour-picker (#8605) 2024-09-16 11:38:55 +02:00
Leilei332
a510e4ad68
Use colour-picker macro in Tag Manager (#8606) 2024-09-16 11:38:27 +02:00
Leilei332
e93515f32a
Fix style of codemirror settings page (#8600)
A small fix to make its style the same as the TiddlyWiki settings page.
2024-09-15 11:49:33 +02:00
Simon Huber
6ae00e4973
Improve View Widget Refreshing (#8135)
* Update view.js

* add viewhandler base class and view subclasses

* simplify render methods of wikified views

* use fakewidget's text for rendering

* simplify wikified refresh methods

* remove unneeded self=this

* pass mode to makeTranscludeWidget

* update view widget

* update view widget
2024-09-15 11:49:09 +02:00
Leilei332
3355907581
Seperate clear cookie and disable actions in Browser Storage Plugin (#8602)
Added two messages:
* `tm-delete-browser-storage` for deleting the cookie saved by the
  Browser Storage plugin
* `tm-disable-browser-storage` for disabling Browser Storage
2024-09-15 11:48:08 +02:00
Leilei332
a687bfe928
[DOCS] Deprecate D3 and Mobile Drag and Drop plugin (#8597)
* Deprecate D3 and Mobile Drag and Drop plugin

Deprecate D3 and Mobile Drag and Drop plugin that is marked deprecated
since 5.3.4

* Use superscript
2024-09-13 16:19:09 +02:00
Leilei332
c7ca8359ab
Add drag and drop handling for export macro & rewrite using v5.3.2 syntax (#8594) 2024-09-12 19:33:57 +01:00
Leilei332
18e1ee44d8
Move contents of config tab to readme tab in markdown plugin (#8595) 2024-09-12 19:31:13 +01:00
Mohammad Rahmani
fbf619b006
Update ViewTemplateBodyFilters.multids For Readability (#8592)
This Cascade from 

```
[tag[$:/tags/wiki-test-spec]type[text/vnd.tiddlywiki-multiple]then[$:/core/ui/TestCaseTemplate]] [tag[$:/tags/wiki-test-spec-failing]type[text/vnd.tiddlywiki-multiple]then[$:/core/ui/TestCaseTemplate]]
```

Simplified. I also suggest using the same convention for all cascades
2024-09-12 10:09:11 +01:00
Michael McDermott
bae2b78925
Added keyboard shortcut option for menubar search. (#8350) 2024-09-11 17:13:54 +01:00
Jeremy Ruston
695e2ee589 Revert "Make overflowed content scrollable (#8524)"
This reverts commit d7b00a6dd0.
2024-09-10 19:03:06 +01:00
Jeremy Ruston
d133c922b7 Updated release note 2024-09-10 18:59:31 +01:00
Jeremy Ruston
8a75ba17c1 Merge branch 'tiddlywiki-com' 2024-09-10 17:57:31 +01:00
Michael McDermott
a960e4f658
Make Excision Available for Markdown (#8498)
* Updates to make Excision more friendly to Markdown users by adding
Markdown as an option in the criteria to use excision and by making the
excise operation reuse the type of the tiddler being excised.

* Updated excise operation to use Markdown syntax for links.
2024-09-10 17:57:06 +01:00
Mario Pietsch
054be1af4e
Add new reference tiddlers for the new v5.3.x concepts (#8164) 2024-09-10 17:56:10 +01:00
Jeremy Ruston
40138beac4 Merge branch 'tiddlywiki-com' 2024-09-10 17:18:25 +01:00
Mario Pietsch
d450fce77b
Add trimSelection parameter to text editor (#7944)
* add trimSelection - both, start, end, no

* add documentation for trimSelection to tm-edit-text-operation tiddler

* add trimSelection both to all buttions where it makes sense

* change "both" to "yes" as a default

* fix trimSelection typo

* fix trimSelection typo

* docs trimSelection add "no" as possible value - it's the default

* remove some redundant variable declarations

* update from-version

* fix comment typos

* fix whitespace

* make local variables more visible
2024-09-10 17:17:28 +01:00
Mario Pietsch
c64bbd984f
Re-activate tabs-macro test, rename expected-* files for easier maintenance (#8403)
* re-activate tabs-macro test, rename expected-* files for easier maintenence

* make sure the Recent tab in the browser is populated for easy testing
2024-09-10 17:16:02 +01:00
Mario Pietsch
0c1d478e19
Improve hellothere flex cards accessibility (#8325)
* add alt-text field to image meta data files

* add aria-label to some HelloThere links

* improve flex-card procedure to render alt-text for images and aria-hide the new-badge because it causes problems

* revert HelloThere modified date
2024-09-10 17:15:17 +01:00
Mario Pietsch
753a820945
Edittemplate toolbar improve accessibility (#8324)
* change aria-label from caption to hint to make it more descriptive

* add indentation
2024-09-10 17:14:29 +01:00
Mario Pietsch
ffbef16152
ViewTemplate toolbar add, change aria-label to hint so it is more descriptive (#8323) 2024-09-10 17:13:58 +01:00
Mario Pietsch
232cffb0a1
Add type "number: (default)" to compare operator (#8160)
* Add type "number: (default)" to compare operator

* Update compare Operator.tid

* Update compare Operator (Examples).tid

* Update compare Operator (Examples).tid
2024-09-10 17:13:09 +01:00
Mario Pietsch
4f4e055091
Add a search button to the control panel tiddler fields tab (#8157)
* add a search button to the control panel tiddler fields tab

* minor update

* use v5.3.x syntax

* use tf. prefix for the function

* make show-filter-count a global macro

* make table header translatable

* add documentation

* show-filter-count code cleanup

* remove the table-header

* remove erroneous caption field
2024-09-10 16:30:59 +01:00
Leilei332
d7b00a6dd0
Make overflowed content scrollable (#8524)
* Make overflowed content scrollable

* Fix removed tab
2024-09-10 14:33:10 +01:00
Leilei332
eaf8558595
Update PageControls buttons to use v5.3.2 syntax (#8579)
* Let PageControls buttons use v5.3.2 syntax

* Rewrite buttons and actions

* Omit whitespace & use function to avoid duplicating

* Omit whitespace in conditional syntax
* Define tf.get-tags function to avoid duplicated text substitution
* Rewrite advanced search button

* Add space in join operator

* Rewrite buttons in plugins

* Remove tf prefix in new-journal.tid

* Remove tf prefix in new-tiddler.tid
2024-09-10 12:00:13 +01:00
Jeremy Ruston
1368cd67ca
Fix missing closing tag, and update erroneous docs (#8340) 2024-09-10 11:50:08 +01:00
btheado
6505e4610f
Use the testcase widget for $action-createtiddler examples (#8232)
* Use the testcase widget for the $action-createtiddler widget examples

* Use procedure instead of macros for $action-createtiddler examples
2024-09-10 11:49:04 +01:00
btheado
feec6ef18f
Use testcase tiddlers for html examples (#8376)
* Convert several html examples into testcase tiddlers

* Convert html table exmaple into testcase tiddler
2024-09-10 11:48:14 +01:00
lin onetwo
19336dc437
Update Alternative page layouts.tid (#8461) 2024-09-10 11:39:50 +01:00
Aza K9
30bb563ffe
Fix Issue With Highlight.js Demo Link (#8503) 2024-09-10 11:37:03 +01:00
Aza K9
8d9407aad7
Signing CLA (#8502)
Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>
2024-09-10 11:36:34 +01:00
Mohammad Rahmani
813a574921
Docs: list operator "Index" instead of "Property" (#8509) 2024-09-10 11:35:05 +01:00
Leilei332
93543ba213
Add documention for $:/tags/ControlPanel/SettingsTab (#8512)
* Add documention for $:/tags/ControlPanel/SettingsTab

* Fix tag name
2024-09-10 11:33:28 +01:00
Leilei332
3434884ea4
Add a settings page for markdown plugin (#8585)
* Add a settings page for markdown plugin

* Add link to $:/config/markdown/renderWikiText

* Place "Quotes replacement" settings after "Typographer"

* Add link to plugin itself & remove transclusion in config tab

The transclusion to $:/plugins/tiddlywiki/markdown/settings in config
tab is removed to avoid confusion

* Add settings tab in plugin info
2024-09-10 11:13:00 +01:00
Mario Pietsch
8a8dcf8255
Add startCount to unusedtitle macro, new tests, new docs (#7941)
* add startCount to unusedtitle macro, new tests, new docs

* rename test files

* update .from-version in docs
2024-09-10 10:49:41 +01:00
Jeremy Ruston
b12625c9f6 Merge branch 'tiddlywiki-com' 2024-09-09 21:04:33 +01:00
Mario Pietsch
e1b3308a9d
Fix float right overflow (#8557)
* tc-subtitle is not a sibling to tc-body,
So tc-subtitle needs a clearfix to contains float:right

* add clearfix to all tiddler elements that could contain floats

* add clearfix to tc-tiddler-title in ViewTemplate

* add clearfix to plugin/blog/templates

* add clearfix to plugin/tour/templates

* remove test tiddler

* rename draft title class to tc-tiddler-title-draft

* undo title field covering

* move tc-clearfix to tc-float-right in the base CSS file

* rename clearfix CSS class to tc-clearfix

* update documentation tiddlers
2024-09-09 09:48:57 +01:00
Mario Pietsch
d827c57dcf
Make export macros code readable without changing any functionality (#8513) 2024-09-08 15:57:55 +01:00
Leilei332
4327d58c1b
Fix description for $:/config/DefaultTiddlerColour (#8588)
A small fix after #8508
2024-09-08 13:41:32 +01:00
Leilei332
dc7f8cb0af
Add docs for some hidden settings (#8508)
* Add docs for $:/config/EmptyStoryMessage in hidden settings

* Add docs for $:/config/DefaultTiddlerColour
2024-09-07 15:04:55 +01:00
Simon Baird
7f2ab57f78
Fix invalid accept header in put saver (#8547)
IIUC the charset doesn't belong in the Accept header. It does belong
in a Content-Type header though, see [1] and [2].

FYI this header causes problems for Tiddlyhost which must work around
the invalid mime type, see [3] for the nitty-gritty.

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept
[2] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type
[3] 10cd353552
2024-09-06 19:55:51 +01:00
Mario Pietsch
38657a2323
tm-new-tiddler - Create empty tags field only if template or additionalFields contain a tags-field (#8559)
* create empty tags only if template or additionalFields contain a tags-field

* fix typos

* add tests for tm-new-tiddler message

* tm-new-tiddler add standard test with tags field
2024-09-06 19:46:53 +01:00
Leilei332
dcf63b75fa
Fix suffix does not work for base64 operators (#8574)
* Fix suffix does not work for base64 operators

* Remove console.log
2024-09-06 19:40:05 +01:00
Leilei332
f0cb57fad8
Update docs for base64 operators (#8575)
* Update docs for decodebase64 and encodebase64 operator
* Add exmaples for decodebase64 and encodebase64 operator
2024-09-06 19:39:41 +01:00
Leilei332
9a3f1d25e5
Update toolbar buttons to use v5.3.2 syntax (#8584) 2024-09-05 18:40:18 +01:00
Jeremy Ruston
d6308f1c74 Merge branch 'tiddlywiki-com' 2024-09-02 20:57:12 +01:00
Jeremy Ruston
149bba62d2 Fix typos in Saving with TiddlyPWA 2024-09-02 20:57:03 +01:00
Jeremy Ruston
8e4670ce0a Merge branch 'tiddlywiki-com' 2024-09-02 16:52:15 +01:00
Jeremy Ruston
69637640d2
Standardise whitespace in conditional shortcut syntax (#8583) 2024-09-02 16:51:15 +01:00
Jeremy Ruston
2af23a6ca5 Remove extraneous camelcase 2024-09-02 16:34:11 +01:00
Jeremy Ruston
487f5f5251 IIS example config shouldn't be tagged "Saving" 2024-09-02 16:33:57 +01:00
Jeremy Ruston
dafe7884e8 Add TiddlyPWA to GettingStarted
Apologies @valpackett I had not realised that TiddlyPWA was not listed.

I'd welcome any improvements to the listing. I copied the functional description from your website but might be a good opportunity to sell the benefits more.

I'm doing this as part of a review and improvement of the GettingStarted tiddler.
2024-09-02 16:32:48 +01:00
Mario Pietsch
a0be1d63ef
[DOCS] Using Stylesheets -- fix typos (#8581) 2024-09-02 12:41:06 +01:00
Mario Pietsch
842605d28e
fix advanced search filter input eats key presses (#8578) 2024-09-01 18:53:37 +01:00
Jeremy Ruston
f6cd7608f5 Release note clarification 2024-09-01 17:54:14 +01:00
Mario Pietsch
8e1cad5a59
Fix HTML nesting error causing typing problem in advanced search filter tab in Firefox (#8577) 2024-09-01 17:48:59 +01:00
Mario Pietsch
6b4f0bea98
Update: Simple tm-http-request POST (#8580) 2024-09-01 17:18:42 +01:00
Jeremy Ruston
d70b23e439 Add link to Jeremy's QCon talk 2024-09-01 17:08:08 +01:00
Jeremy Ruston
81405ee8f4 Further tweaks to release note 2024-09-01 16:57:20 +01:00
Jeremy Ruston
16e7510c72 Update release note 2024-09-01 16:34:44 +01:00
Jeremy Ruston
26acd9be72 Fix whitespace in social media cards
Apologies @simonbaird this is the belated fix to the issue you mentioned in https://github.com/TiddlyWiki/TiddlyWiki5/pull/8441#issuecomment-2276175490
2024-08-30 14:55:14 +01:00
btheado
9a4aafdb41
Prevent geospatial plugin exception when geomap contains empty geolayer widget (#8484)
* Prevent exception when geomap contains empty geolayer widget

* Convert testcase widget into testcase tiddler
2024-08-30 14:21:46 +01:00
btheado
5094096a87
Add import field to testcase tiddlers (#8499)
* Convert "import" field of testcase tiddlers into $data widget with $filter attribute

* Add documentation for testcase tiddler import field and fixed typo and grammar
2024-08-30 14:21:24 +01:00
Leilei332
98d411c08a
Add empty message to tag picker, search dropdown and advanced search (#8558)
* Add empty message to tag picker, search dropdown and advanced search

* Add empty message for tag-picker

* Use italic font
2024-08-30 10:39:33 +01:00
Jdigio0213
220156edee
Signing CLA (#8565) 2024-08-30 09:31:36 +01:00
Jeremy Ruston
7dfdbae812 Keyboard widget should not crash if the keyboard manager has not been initialised
A user reported a problem with using the keyboard widget within a startup action.
2024-08-29 17:25:30 +01:00
Leilei332
6b13614a6a
Fix duplicated search result in advanced search (#8485)
* Fix multiple search result in advanced search

* Use $list-empty widget
2024-08-28 15:24:56 +01:00
Bram Chen
c9f816fb53
Update chinese language files (#8495)
* Update chinese language files

* Add chinese translations of control panel UI for social media cards

* Update chinese language files

* Add chinese translations for Excise/DefaultTitle

* Update chinese language files

* Improve Simplified Chinese translation for SocialCard/Hint
2024-08-28 08:39:36 +01:00
Leilei332
d3cea5d730
Further fix search outline (#8552)
* Fix outline color not showing properly for dark palettes

A further fix after #7317

* Tweak outline style for firefox
2024-08-27 16:41:47 +01:00
Jeremy Ruston
fb9459a0dd Fix since-version docs macro to make extra information optional 2024-08-27 15:42:13 +01:00
Leilei332
98cd4a09b4
Make the default title created by excision translatable (#8500)
* Make the default title created by excision translatable

* Use $tw.language.getString to get language string
2024-08-27 09:26:42 +01:00
Jeremy Ruston
fa423e508f Put saver OPTIONS request: fix interpretation of success codes
Fixes #8554
2024-08-26 21:50:44 +01:00
Mario Pietsch
bcae5cc2ef
Fix 7142 search outline in chrome like browsers (#7317)
* fix 7142 search outline in chrome like browsers

* use moz-focusring only for FF, outline-initial for Chrome

* moz-focusring remove outline-offset

* remove box-sizing from base, because it's part of reset

* remove redundant box-sizing since it is part of reset

* fix distance between search input and first button to the right
2024-08-25 11:37:29 +01:00
Leilei332
6264aa22d0
Fix unwrapped oveflowed code blocks not showing scroll bars when setting "Wrap long lines in code blocks" to "No" in "Theme tweaks" (#8413)
* Fix unwrapped oveflowed code blocks not showing scroll bars

* Inline code should not follow "Wrap long lines in code blocks" option

* Revert "Inline code should not follow "Wrap long lines in code blocks" option"

This reverts commit 4615a04e59.

* Inline code should not obey "Wrap long lines in code blocks" option

Fix problem described in #8549
2024-08-24 13:57:24 +01:00
Leilei332
6d05afebc4
Fix scaled language icon in dropdown (#8546) 2024-08-22 17:32:29 +01:00
Jeremy Ruston
890b48ce91 Merge branch 'tiddlywiki-com' 2024-08-22 09:45:35 +01:00
Jeremy Ruston
38081b86c9 Filesystem adaptor should not crash with missing wiki folder 2024-08-21 18:56:34 +01:00
Jeremy Ruston
b8fb9e6b21 Fix DataWidget to allow titles to be overwritten
See https://talk.tiddlywiki.org/t/can-innerwiki-only-show-exactly-current-wiki/10452/5
2024-08-21 18:40:49 +01:00
Simon Baird
7fba40977b
Fix social media preview url tiddler name (#8496)
The control panel name and the name in the template don't match. I
figured the shorter name is better, but let me know if you like the
longer name.

This is a small fix for recently merged PR #8441.
2024-08-21 11:17:15 +01:00
Leilei332
c225013d1a
Add type attribute to input fields in control panel (#8518) 2024-08-21 11:16:13 +01:00
Leilei332
d73041245b
Normalize appearance of input element with other type (#8517)
* Normalize appearance of input element with other type

* Add url type
2024-08-21 11:15:41 +01:00
Mario Pietsch
999f74ee86
Fix tiddlywiki editions command (#8535) 2024-08-21 09:23:44 +01:00
Mario Pietsch
cd362c78c3
[Docs] Simplify the Railroad Plugin tiddler (#8536)
* [Docs] Simplify the Railroad Plugin tiddler

* Update Railroad Diagrams.tid

* Update Railroad Plugin.tid
2024-08-21 07:35:17 +01:00
Leilei332
3fe66bb80f
Fix scaled plugin icon (#8540) 2024-08-21 07:28:45 +01:00
Mario Pietsch
231a39e743
Fix whitespace in all plugins for v5.3.6 (#8285)
* Fix whitespace in all plugins for v5.3.5

* remove const to var chanes
2024-08-20 16:33:07 +01:00
Mario Pietsch
014f302af3
Fix whitespace in boot.js (#8318) 2024-08-20 16:31:17 +01:00
Mario Pietsch
990108cfab
Make pluginlibrary edition consistent with all other editions (#8265)
* make pluginlibrary edtion consistent with all other edtions

* pluginlibrary edition update docs

* fix typo in GettingStarted
2024-08-20 16:30:28 +01:00
Mario Pietsch
b75fa58746
Testcase widget improve containment (#8529)
* testcase improve containment using navigator-widget

* testcase implement minimal edit new-tiddler interface
2024-08-20 16:29:16 +01:00
Leilei332
f10d4eb58d
Localise description in language plugins (#8530) 2024-08-20 16:26:10 +01:00
Leilei332
53b808d723
Add support for language Chinese (Hong Kong) (#8531)
* Add support for language Chinese (Hong Kong)

* Remove error translation
2024-08-20 16:24:29 +01:00
Leilei332
ab2b79ef80
Let language plugins display properly (#8355)
* Fix language plugin viewtemplatebody

* Let config/ViewTemplateBodyFilters/plugin have higher priority

* Fix for file import
2024-08-19 11:50:23 +01:00
Jeremy Ruston
f32f8ba396 Merge branch 'tiddlywiki-com' 2024-08-19 10:33:37 +01:00
Jeremy Ruston
6798e58fc8 Prune plugins for tiddlywiki.com
Fixes #8528
2024-08-19 10:33:14 +01:00
Mario Pietsch
c51a233627
Make testcase default template more modular (#8514)
* make testcase default template more modular

* exclude state/popup/export from tabList

* fix state in linkcatcherActions

* use "explicitState" instead of "state" for tabs macro

* clean testcase-tablist code

* remove unwanted tiddler

* remove redundant parameters from export-filter
2024-08-18 22:35:36 +01:00
Leilei332
ec651539a6
Add stability badge colors for Solar Flare palette (#8521) 2024-08-18 22:29:32 +01:00
Jeremy Ruston
4da27f6a4b
Add support for social media cards (#8441)
* Initial Commit

* Fix Twitter description

* Improve image preview name

Thanks @simonbaird

* Add control panel UI for social media cards
2024-08-08 10:15:38 +01:00
Rob Hoelz
3707e10ef6
Add start/end properties for table row/cell elements (#8494)
* Add test for existing table parsing functionality

* Add expected start/end for tr elements in table wikitext test

* Populate start/end properties for tr elements

* Add expected start/end for th/td elements in table wikitext test

* Populate start/end properties for th/td elements
2024-08-08 10:06:44 +01:00
Jeremy Ruston
fd056d210a Merge branch 'tiddlywiki-com' 2024-08-07 23:33:29 +01:00
Jeremy Ruston
0674ac6389 Add code-of-conduct.md to root of repo 2024-08-07 14:36:11 +01:00
Leilei332
d3394aa1ba
Fix transposed palette filename for "Contrast" palettes (#8493) 2024-08-07 12:46:16 +01:00
Leilei332
0bfa12466e
Apply proper color for target footnote background in markdown (#8492)
* Use footnote-target-background index for the color of the background of target footnote

* Apply proper color to palettes
2024-08-07 12:07:22 +01:00
Jeremy Ruston
0e0818c8e9
Transliterate control characters in site title (#8339) 2024-08-07 11:42:46 +01:00
Jeremy Ruston
9b6baba5d5 Fix geospatial plugin popup demo 2024-08-06 21:32:04 +01:00
Mario Pietsch
a6ffcc1341
Update bug_report.yml (#8468)
Replace boilerplate text with "placeholder" text
2024-08-06 15:45:14 +01:00
Leilei332
885faf964b
Fix strange links in $:/plugins/tiddlywiki/highlight/usage (#8487)
* Normalize links in highlight usage

* Revert to use define
2024-08-05 15:29:16 +01:00
Jeremy Ruston
d9ac4a823f Fix crash with render command when filename filter returns empty result 2024-08-05 11:20:35 +01:00
Bram Chen
ac286dac82
Update chinese language files (#8473)
* update chinese descriptions for text/vnd.tiddlywiki-multiple
2024-08-04 23:47:37 +01:00
twMat
dbbf8ea90d
Update Intertwingled Innovations.tid (#8480)
typo
2024-08-04 13:26:17 +01:00
Mario Pietsch
c5c7279554
Eslint force double-quotes for strings -- avoidEscape:true (#8482) 2024-08-04 12:48:57 +01:00
Leilei332
2bc7ec4b94
Do not import "$:/build" (#8476) 2024-08-03 13:16:05 +01:00
lin onetwo
77335a42b5
Fix: add cascade configs (#8470) 2024-08-02 09:45:52 +01:00
lin onetwo
57d3e8e765
Feat: allow tags have its ViewTemplate tag and cascade (#8462)
* feat: allow tags have its ViewTemplate tag and cascade

* feat: quick addition of subtitle cascade

* docs: tag subtitle cascade control panel

* Update ControlPanel.multids
2024-08-01 18:01:22 +01:00
Mohammad Rahmani
5c43512a56
Shorter Title of Compound Tiddler in Type Field Dropdown Menu (#8469)
* Update text_vnd.tiddlywiki_multiple.tid

This PR addresses the idea in #8465

* Update text_vnd.tiddlywiki_multiple.tid

This addresses the idea in #8465 for de-DE language
2024-08-01 16:43:10 +01:00
poc2go
39bd45002e
Test to verify that reserved wikitext constructs are not parsed (#8384) 2024-08-01 11:47:37 +01:00
Mario Pietsch
792947bd8c
[Docs] Fix some typos: tidder -> tiddler (#8464) 2024-08-01 11:27:23 +01:00
Leilei332
22286aa569
Add image toolbar dropdown to markdown plugin (#8459)
* Add image toolbar dropdown to markdown plugin

* Escape special characters
2024-07-31 13:38:25 +01:00
Bram Chen
ada5af5af4
Update chinese language files (#8453)
* imrove simplied chinese translations for Snippets/ProcedureDefinition
* add chinese translations for text/vnd.tiddlywiki-multiple
2024-07-30 11:45:06 +01:00
Mario Pietsch
4acf7a580f
Add info about tc-tiddlylink-shadow tc-tiddlylink-resolves to the LinkWidget (#8454) 2024-07-30 10:00:22 +01:00
Mario Pietsch
8735d1ac93
Add vnd.tiddlywiki-multiple to the editor type dropdown (#8450)
* add text/vnd.tiddlywiki-multiple to editor type dropdown

* de-DE add text/vnd.tiddlywiki-multiple to editor type dropdown

* move text/x-tiddlywiki to classictools plugin

* remove image/x-icon from all languages files

* move type text/vnd.tiddlywiki-multiple to Developer
2024-07-29 22:04:06 +01:00
Bram Chen
9d21071200
Update chinese language files (#8444)
* Update chinese language files

* add chinese translations for OpenControlPanel/Hint in Buttons.multids

* Update chinese language files

* Add chinese translations for procedure and function snippet to "stamp button"
2024-07-29 13:18:34 +01:00
Mario Pietsch
27f3de2f88
Show wikitext formatting buttons for compound tiddlers (#8449)
* allow wikitext formatting buttons for types [prefix[text/vnd.tiddlywiki]] which is very permissive

* add 2 missing buttons
2024-07-29 13:08:45 +01:00
Mario Pietsch
d2302df197
Add procedure and function snippet to "stamp button" (#8445)
* Add procedure and function snippet to "stamp button"

* remove draft tiddler
2024-07-29 12:38:07 +01:00
Mario Pietsch
165c7e9825
Data widget add compound filter parameter (#8447)
* add $compound-filter parameter to data-widget

* update TestCaseTemplate to use $compound-filter parameter

* update data-widget, TestCaseTiddlers and CompoundTiddlers docs
2024-07-29 12:19:44 +01:00
Jeremy Ruston
077a747b6e Add an link to the prerelease 2024-07-28 22:51:29 +01:00
Jeremy Ruston
ea8e805e1c Improve prerelease presentation 2024-07-28 22:34:24 +01:00
Jeremy Ruston
c412ea52da Add Discord icon 2024-07-28 22:17:23 +01:00
Jeremy Ruston
561580f1b8 Merge branch 'tiddlywiki-com' 2024-07-28 22:16:04 +01:00
Jeremy Ruston
f294270701 Add Discord link to HelloThere 2024-07-28 22:13:42 +01:00
Mario Pietsch
e80c99791e
Add tag-tiddler to tag-pill drag & drop import, add hidden setting for TagPillDragFilter (#8182)
* add tag-tiddler to tag-pill drag & drop import, add hidden setting for TagPillDragFilter

* update docs to make Be Aware clearer

* exclude the tag tiddler and update hidden docs accordingly
2024-07-28 16:36:17 +01:00
Mohammad Rahmani
5794718047
Add Documentation for New Shortcutkey to Open Control Panel (#8440) 2024-07-28 16:34:31 +01:00
Jeremy Ruston
685d831cb1 Fix navigation vertical position when duration is zero
Fixes #8428
2024-07-28 14:20:37 +01:00
Jeremy Ruston
95863ae97b Merge branch 'tiddlywiki-com' 2024-07-28 13:51:00 +01:00
btheado
bb9c64b38e
Fix olc-decode and geopoint latitude and longitude order in the geospatial plugin (#8437)
* Reverse latitude and longitude in olc-decode tests to match proper geojson output format

* Reverse latitude and longitude in olc-decode to match proper geojson output format

* Reverse latitude and longitude in geopoint expected results to match proper geojson format

* Reverse latitude and longitude in geolookup expected results to match proper geojson format

* Corrected the Oxford to New York distances

* Oxford is actually 12 miles closer to New York than Winchester

Used calculator at https://www.nhc.noaa.gov/gccalc.shtml to check

Reversed latitude and longitude to correct the geojson

* Reversed the latitude and longitude turf.point arguments in the geopoint function

* Swapped latitude and longitude in geopoint function calls
2024-07-28 13:44:09 +01:00
Mohammad Rahmani
b452a1ee00
Wikitext Procedures (#8390) 2024-07-28 13:43:20 +01:00
Mohammad Rahmani
82bf4480de
Add Shortcut to Open Control Panel (#8439)
This PR adds a new keyboard shortcut key for opening the $:/ControlPanel
2024-07-28 13:41:53 +01:00
Mohammad Rahmani
6002235db7
Replace Macro with Myfun when Calling Example Function (#8277) 2024-07-28 13:40:58 +01:00
Mohammad Rahmani
b4597e7b1e
Remove Redundant Filter in ViewTemplateBodyFilters (#8434)
* Remove Redundant Filter in ViewTemplateBodyFilters

This PR closes #8426

* Space between filters are added
2024-07-27 18:38:56 +01:00
Mario Pietsch
189b6016b6
Fix empty-tag-node-template. removing redundant DOM elements if no list is shown (#8432) 2024-07-27 14:43:10 +01:00
Mario Pietsch
4d8932a836
Add NoBreak HTML entity (#8431) 2024-07-27 14:00:52 +01:00
Mohammad Rahmani
a620a6cc00
Add Copy to Clipboard Button to Code Template (#8430) 2024-07-27 13:58:19 +01:00
Jeremy Ruston
43b937d350 Merge branch 'tiddlywiki-com' 2024-07-27 09:02:31 +01:00
Jeremy Ruston
cbfe6b6c18 Jeremy's CLA signature for Intertwingled Innovations 2024-07-26 19:36:32 +01:00
Jeremy Ruston
8e8d5060e5 Jeremy's company is now Intertwingled Innovations 2024-07-26 19:36:16 +01:00
Val Packett
886514aa52
bootprefix: Tighten browser check to include the document global (#8423)
Deno's node emulation can run TiddlyWiki now that it supports the VM isolates API, but the window global exists in that environment, so both browser and node were being detected, causing the autoboot to trip up on nonexistent argv, as the boot was happening in the constructor right before argv was set.

Ref: https://github.com/denoland/deno/issues/19286
Ref: https://github.com/flexdinesh/browser-or-node
2024-07-26 08:54:02 +01:00
Val Packett
c175992949
Sign the CLA (#8424) 2024-07-26 08:49:51 +01:00
Jeremy Ruston
9069992163 Update release note 2024-07-25 18:23:57 +01:00
Jeremy Ruston
7a60e7c93e More rename Jermolene/TiddlyWiki5 to TiddlyWiki/TiddlyWiki5
These are the changes that have to be done on "master"
2024-07-25 17:44:52 +01:00
Jeremy Ruston
be22951973 Merge branch 'tiddlywiki-com' 2024-07-25 17:41:47 +01:00
Jeremy Ruston
6f8df68b28 Rename Jermolene/TiddlyWiki5 to TiddlyWiki/TiddlyWiki5 2024-07-25 17:41:28 +01:00
Jeremy Ruston
b1cd1306ef
Geospatial Plugin: Support for custom popups (#8404)
* Allow width, height and maxZoom to be specified

* Add images to city marker tiddlers

* Initial support for custom popups

* Custom popup templates for the US and Canadian example data

* Popups should use the geomap as their parent widget

This lets root widget messages work

* Typo in default popup template

* Clean up the use of popup templates

* Allow GeoJSON features to be hidden via a checkbox

* Popup template for volcano dataset

* Add Natural Earth country data

* Optimise marker SVG
2024-07-25 17:31:37 +01:00
Mario Pietsch
acb2602d78
Fix $:/core/ui/testcases/DefaultTemplate so narrative can use wikitext formatting (#8416) 2024-07-24 13:02:41 +01:00
Jeremy Ruston
0c9d61d4a3 Merge branch 'tiddlywiki-com' 2024-07-24 11:55:46 +01:00
Jeremy Ruston
2aec57213d Update URL of GitHub pages repo for tiddlywiki.com 2024-07-24 11:38:00 +01:00
Jeremy Ruston
995f3babce Update github URL for TW5 repo 2024-07-24 11:21:59 +01:00
Mario Pietsch
a27824af7e
Update Release Info for v5.3.5 (#8412) 2024-07-23 22:12:47 +01:00
webplusai
98df1c58e3
Signing the CLA (#8411) 2024-07-23 14:02:59 +01:00
btheado
b8ed59f7dc
Use .tid file extension in node.js for text/vnd.tiddlywiki-multiple (#8409) 2024-07-23 11:56:42 +01:00
btheado
adfb69a68c
Use the testcase widget for the $reveal widget examples (#8406)
* Use the testcase widget for the $reveal widget examples

* Convert $reveal testcase widget examples into testcase tiddlers

* Add expected results to $reveal test case tiddlers

These examples are intended to be interactive and the expect results
only test the initial rendering. Still that seems like useful verification
2024-07-22 09:05:40 +01:00
Leilei332
b5200483a1
Fix invisible stability badges on hover (#8407) 2024-07-22 08:59:51 +01:00
Jeremy Ruston
7c35ada55d Merge branch 'tiddlywiki-com' 2024-07-21 15:47:19 +01:00
springerspandrel
3d2e6e4895
Tweak empty-tag-node solution, to avoid interfering with technical plugins' use of tag-space (#8405) 2024-07-20 22:37:23 +01:00
Leilei332
bfb9c38c42
Make markdown wikitext links readable (#8402) 2024-07-19 08:52:57 +01:00
Jeremy Ruston
b48be91ec5
Fix tiddlers should not be interactive after being closed (#8344)
* Initial Commit

* Revert "Initial Commit"

This reverts commit 25edf0e212.

* Alternative fix
2024-07-19 08:51:48 +01:00
Mario Pietsch
bd936e2b7d
Update test-tags-operator.js (#8401)
Forgot to activate the tests :/
2024-07-18 17:12:22 +01:00
Jeremy Ruston
4f3f09d223 Merge branch 'tiddlywiki-com' 2024-07-18 08:29:55 +01:00
Mario Pietsch
2a8d664c09
tags-operator: add new test (#8392) 2024-07-17 21:51:31 +01:00
Mario Pietsch
da8b213be5
fix RSOD if tm-copy-to-clipboard param is empty (#8393) 2024-07-17 21:49:40 +01:00
Leilei332
a4649490de
Add more markdown toolbar buttons (#8395) 2024-07-17 21:37:27 +01:00
Mario Pietsch
67e7fa4b74
Improve :sort, sortsub, :sort examples and the railroad diagram (#8396)
* Improve :sort, sortsub, :sort examples and the railroad diagram

* Update Sort Filter Run Prefix (Examples).tid

undo changes.
2024-07-17 21:36:54 +01:00
Mohammad Rahmani
fcb28df82c
Update import.tid to delete the state tiddler for "select all" (#8399)
The leftover after canceling import operation is deleted now by adding:

```
<$action-deletetiddler $tiddler="$:/state/import/select-all"/>
```
2024-07-17 21:35:51 +01:00
Saq Imtiaz
e4041866e8
Updates phrasing of confirmation message in CLA check (#8386) 2024-07-16 12:52:07 +01:00
Simon Baird
da72ee9da1
Show version in site title for tw5.com edition (#8383)
The motivation is to make it easier for people looking at
https://tiddlywiki.com/ to see what the current version is.

As discussed here:
https://talk.tiddlywiki.org/t/can-we-put-the-version-of-tw-at-the-top-of-the-hello-there-tiddler/9694

This patch is based on the suggestion by @ericshulman in that forum
thread.
2024-07-15 21:49:20 +01:00
Cameron Fischer
a3a9fd3931
Fix for minor transclude wikimethod issue (#8382) 2024-07-15 16:38:27 +01:00
springerspandrel
bfd06198fb
Fix problem where view template disappears on interaction with tag pill (#8372) 2024-07-13 12:58:36 +01:00
Saq Imtiaz
da697f1a5b
Create workflow to be run when a CLA signature is merged (#8375) 2024-07-13 12:57:51 +01:00
springerspandrel
64eb1be708
Improve view templates to show tag children (#8362) 2024-07-11 14:58:17 +01:00
Saq Imtiaz
7e16424f44
Updates check-cla workflow (#8368) 2024-07-11 14:02:43 +01:00
Jeremy Ruston
4a907b85ae Merge branch 'tiddlywiki-com' 2024-07-11 11:08:08 +01:00
Jeremy Ruston
8f4bdce534 Fix illegal filename 2024-07-11 11:07:57 +01:00
Saq Imtiaz
7e2b035803
Check CLA signatures for new PRs (#8363)
Add a workflow that checks to see if the author of a PR has signed the CLA.
2024-07-11 10:16:20 +01:00
Jeremy Ruston
68d13601df Merge branch 'tiddlywiki-com' 2024-07-10 14:36:58 +01:00
Jeremy Ruston
c0f4bc3698 Preparing for v5.3.6-prerelease 2024-07-10 14:32:07 +01:00
Jeremy Ruston
62d01239e4 Revert "Preparing for v5.3.6-prerelease"
This reverts commit 7e2a4bd9e1.
2024-07-10 14:30:46 +01:00
Jeremy Ruston
7e2a4bd9e1 Preparing for v5.3.6-prerelease 2024-07-10 14:27:52 +01:00
Jeremy Ruston
a2426b5ed9 Version number update for v5.3.5 2024-07-10 14:07:28 +01:00
Jeremy Ruston
e2b40c3a14 Preparing for release of v5.3.5 2024-07-10 14:07:12 +01:00
Jeremy Ruston
46f6fe88a2 Update release note 2024-07-10 11:16:00 +01:00
Jeremy Ruston
1eb1af2589 Fixed version name typo
See https://github.com/Jermolene/TiddlyWiki5/pull/8351/files#r1671743415
2024-07-10 09:13:18 +01:00
Jeremy Ruston
98ebbc32f7 Merge branch 'tiddlywiki-com' 2024-07-10 09:02:52 +01:00
springerspandrel
d41fabd472
Remove stray quote-mark near end of tip in Dominant Append tiddler (#8360) 2024-07-09 20:56:11 +01:00
Mario Pietsch
906ac3817d
Fix 8347 tag-picker macro improve tagListFilter (#8351)
* improve tagListFiler defaults to [tags[]sort[]] now

* tag-picker - update docs
2024-07-09 20:55:51 +01:00
Michael McDermott
7071fdef8a
Adding CLA signature. (#8361) 2024-07-09 20:54:36 +01:00
Andrew Gregory
cec30738f4
Correct minlength purpose text (#8359) 2024-07-09 18:08:01 +01:00
Andrew Gregory
e644b5cb46
Signing CLA (#8358) 2024-07-09 18:07:24 +01:00
Jeremy Ruston
5758d0b313 Merge branch 'tiddlywiki-com' 2024-07-09 17:00:41 +01:00
springerspandrel
753b289ba9
Clarify opposite handling of de-duplication order for unique Operator vs Dominant Append (#8357) 2024-07-09 16:34:18 +01:00
springerspandrel
ad5661ef1c
Docs: Clarify wording on examples for tag-picker Macro (#8348) 2024-07-09 11:07:08 +01:00
springerspandrel
bc18bd9261
Make it easier to see which filter Operators are selection constructors (#8349) 2024-07-09 10:43:52 +01:00
springerspandrel
5aa889859a
Help beginners orient to empty filter parameters (#8353) 2024-07-09 10:40:14 +01:00
Jeremy Ruston
eb6f3a423a
Fix RSOE when editing the JSON of a plugin tiddler (#8354) 2024-07-09 09:47:38 +01:00
btheado
eeeb9f97a9
Add testcase to illustrate the bug in #8330 (#8336)
* Add testcase to illustrate the bug in #8330

* Move new testcase to tw5.com edition
2024-07-06 14:22:28 +01:00
Jeremy Ruston
8f1792df20 Testcase Widget: Fix import icon 2024-07-06 10:29:06 +01:00
Jeremy Ruston
e19f86482a Testcase Widget: Fix placement of toolbar dropdown 2024-07-06 10:28:50 +01:00
Jeremy Ruston
53924de313 Update release note 2024-07-05 12:27:14 +01:00
Jeremy Ruston
d2c2ada33c Fix full screen tour in zoomin storyview 2024-07-05 12:26:21 +01:00
Jeremy Ruston
b906515c69 Fix release note typo 2024-07-05 10:38:49 +01:00
Jeremy Ruston
8928b6e603 Update release note 2024-07-04 17:53:26 +01:00
Mario Pietsch
73163386c1
Datawidget: Add check if tiddler exists for $filter attribute to avoide rsod (#8333) 2024-07-04 17:37:40 +01:00
Mario Pietsch
32c75cbb68
Allow fieldmangler to catch unsaved tag changes (#8332)
* allow fieldmangler to catch unsaved tag changes

* fix typo in comment
2024-07-04 17:24:06 +01:00
Leilei332
b60abadf33
Fix transparent draft list (#8329) 2024-07-04 17:23:06 +01:00
Jeremy Ruston
a9b6de8c35 New Release Banner for v5.3.5 2024-07-04 16:07:25 +01:00
Mario Pietsch
84d1c81bb2
Revert to \define colour macro for backwards compatibility (#8327)
* revert to \define colour macro for backwards compatibility

* add color macro

* remove new functions
2024-07-01 22:12:04 +01:00
Jeremy Ruston
c25b8e3056 Merge branch 'tiddlywiki-com' 2024-07-01 10:21:33 +01:00
oeyoews
b81a1f22fe
Fix: remove extra "tags:" typo (#8322) 2024-06-30 18:26:19 +01:00
Jeremy Ruston
703edd154c Fix illegal filename 2024-06-30 18:21:11 +01:00
springerspandrel
64e6a9a946
Docs: Update Lists in WikiText.tid so css class targets a real class (#8302)
Replace dummy .MyClass with a functional class such as .tc-muted, so that the example renders in a way that shows a difference.
2024-06-29 13:26:09 +01:00
springerspandrel
068b76b07d
Docs: Update AutoSave.tid replace dead link to "SaverModule" with SavingMechanism (#8303)
AutoSave tiddler's first sentence currently points to SaverModule, which is a missing tiddler. SavingMechanism seems to be the retitled tiddler that wasn't relinked. (Perhaps more changes are warranted, but this minimal change avoids the embarrassment of a dead link at a place newbies might actually be depending on info.)
2024-06-29 13:25:52 +01:00
springerspandrel
f060ba75ff
Docs: Fix typo in Named Filter Run Prefix.tid (#8304)
Fix typo/mispelling. The phrase "prefixes were implemented" had an errant h yielding "where implemented".
2024-06-29 13:25:22 +01:00
springerspandrel
7beaddb293
Docs: Add InputActions example to EditTextWidget (#8306) 2024-06-29 13:25:03 +01:00
springerspandrel
1937789ee2
Docs: Make currentTab variable tiddler, link from it to tabs Macro (#8310) 2024-06-29 13:24:26 +01:00
springerspandrel
2f2806c00c
Docs: Add simple examples for EditWidget (#8308) 2024-06-29 13:23:30 +01:00
springerspandrel
87adbe0b14
Docs: Expand $:/language/Docs/Fields/_canonical_uri to note broader range of _canonical_uri types (#8313) 2024-06-29 13:22:03 +01:00
Jeremy Ruston
6554b5c9f4 Re-apply "Link to correct plugin instructions for Node.js #8246"
This change was accidentally missed when reverting #7821
2024-06-29 13:08:16 +01:00
Leilei332
c93d4c52fc
Add stability badges colors (#8317) 2024-06-28 18:09:47 +01:00
Mario Pietsch
f3b129c245
[DOCS] Improve TiddlyWiki Archive (#8320) 2024-06-28 18:06:30 +01:00
Leilei332
74c9e4465d
Signing the CLA (#8314)
Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>
2024-06-28 11:28:57 +01:00
springerspandrel
0f4bc93a7e
Signing CLA (#8307) 2024-06-28 11:27:35 +01:00
Jeremy Ruston
05bff57b65 Prepare for v5.3.5 2024-06-27 17:18:48 +01:00
Jeremy Ruston
0dcf7e91bf Version number update for 5.3.4 2024-06-27 17:05:52 +01:00
Jeremy Ruston
f50c2a2e64 Preparing for release of v5.3.4 2024-06-27 17:05:17 +01:00
Jeremy Ruston
a42dad6a5c Update readme 2024-06-27 17:05:06 +01:00
Jeremy Ruston
cff685ea11 Testcase widget: remove negative margins
The intention was to horizontally align the body text with the text within the test case. However, it also caused an overflow when used within vertical tabs (as in the release note)
2024-06-27 17:02:11 +01:00
Jeremy Ruston
791c7fac63 Merge branch 'tiddlywiki-com' 2024-06-27 16:47:57 +01:00
Jeremy Ruston
b90c3841c9 Add new release banner image to readme for v5.3.4 2024-06-27 09:11:06 +01:00
Bram Chen
a5e05e4eec
Update chinese language files (#8297)
* Add chinese translations for TestCaseImport button
2024-06-27 09:02:40 +01:00
Jeremy Ruston
05792a9de3 Update new release banner image 2024-06-27 09:01:13 +01:00
lin onetwo
1c1f0ff4e8
Docs: Update Alternative page layouts.tid (#8298) 2024-06-27 08:43:08 +01:00
Mario Pietsch
d253503335
Update German translation (#8300) 2024-06-27 08:34:27 +01:00
Jeremy Ruston
a16dab9710 Test case docs update 2024-06-26 10:26:42 +01:00
Jeremy Ruston
18152aa7c8
Testcase UI enhancements (#8292)
* Include the ExpectedResults in the displayed tabs

* Lighted testcase background

* Add testcase toolbar with export and import options

* Further styling tweaks
2024-06-26 10:23:54 +01:00
Jeremy Ruston
f15b6a26da Testcase widget: Improve docs 2024-06-24 17:47:32 +01:00
btheado
5d06b922d3
Fix wikitext-example-table-row to render output in block mode (#8288)
* Fix wikitext-example-table-row so example output table cell is rendered in block mode

* Use transclude with =block instead of empty line to force block mode parsing
2024-06-22 17:53:47 +01:00
Jeremy Ruston
0031a95dfe Merge branch 'tiddlywiki-com' 2024-06-22 16:56:39 +01:00
Jeremy Ruston
eecd40723e Avoid accented characters in filenames 2024-06-22 16:56:22 +01:00
Mario Pietsch
5b9f4751ea
Remove "debugger" statement from code - Make confetti examples more impressive (#8284)
* make confetti examples more impressive

* comment debugger statement
2024-06-21 14:15:31 +01:00
Mario Pietsch
b6cf098c5f
Make the tour confetti more impressive (#8286) 2024-06-21 14:14:46 +01:00
Jeremy Ruston
5c63262feb Merge branch 'tiddlywiki-com' 2024-06-21 09:09:55 +01:00
Jeremy Ruston
3b88f0e741 Tweak wording 2024-06-21 09:09:44 +01:00
Mohammad Rahmani
b49ecf886b
Correction to Minlength Operator (#8281) 2024-06-21 09:08:38 +01:00
Mario Pietsch
02ccec7ea8
Improve docs for TranscludeWidget and Transclusion tiddler (#8282) 2024-06-21 09:07:41 +01:00
Mario Pietsch
14c5628d35
Fix: Edge-Browser - Opening HelloThere with debugger "Pause on caught exceptions" causes a break (#8283) 2024-06-21 09:06:33 +01:00
Mario Pietsch
4bd3576432
improve ControlPanel Settings style-ability (#8275) 2024-06-19 18:01:34 +01:00
Jeremy Ruston
756ef697dd Merge branch 'tiddlywiki-com' 2024-06-19 14:35:20 +01:00
Bram Chen
11f562a918
Update chinese language files (#8274)
* Add chinese translations of palette colour names used for stability badges
2024-06-19 12:42:15 +01:00
Jeremy Ruston
083489102e Tour plugin: Improve layout
See https://talk.tiddlywiki.org/t/final-checks-before-release-of-v5-3-4/9934/19
2024-06-19 12:41:39 +01:00
Jeremy Ruston
cd8c483f67 Stability badges: further fix to palette usage 2024-06-19 12:28:31 +01:00
Jeremy Ruston
c8cbf6853e Stability badges: Use palette colours
I am happy to merge translations of these strings before v5.3.4 releases /cc @BramChen
2024-06-19 10:24:47 +01:00
Jeremy Ruston
153b66e4ee Tour plugin: search for "home" instead of "help" 2024-06-19 10:08:53 +01:00
Jeremy Ruston
93c9323d0f Tour plugin: do not offer further tours if none are loaded 2024-06-19 10:08:36 +01:00
Jeremy Ruston
4cd66697ad Tour plugin: remove unfinished "Using Tags" tour 2024-06-19 10:08:19 +01:00
lin onetwo
741aef55e4
Fix: transcludes and backtranscludes operators to always include self-referential transclusion (#8257)
* fix: ignore self-referential transclusion

* feat: support old <$transclude tiddler param

* fix: restore old behavior: include itself like backlinks[]

* refactor: use LinkedList in transcludes[] and backtranscludes[]

* fix: only fallback to title when {{!!xxx}}, not when input is empty

* refactor: move transcludes ast extractor to a file

* refactor: move links ast extractor to a file

* Revert "refactor: move links ast extractor to a file"

This reverts commit 5600a00cd8.

* Revert "refactor: move transcludes ast extractor to a file"

This reverts commit 61d5484f09.

* lint: use pushTop and remove space
2024-06-19 09:38:02 +01:00
Jeremy Ruston
8eb08820ac Update release note 2024-06-18 20:57:24 +01:00
Jeremy Ruston
4ca883fd9b Revert #7821
See https://github.com/Jermolene/TiddlyWiki5/pull/7821#issuecomment-2176843674
2024-06-18 20:52:35 +01:00
twMat
2f4c21e374
Update Procedures.tid (#8273)
Clarifying of the "tip" assuming this is what the tip is after.
2024-06-18 18:17:29 +01:00
Jeremy Ruston
6239384e7b Geomap: Do not attempt to render to fakedom 2024-06-18 15:50:15 +01:00
Jeremy Ruston
ead36cf329 Geomap docs typo 2024-06-18 15:45:40 +01:00
Mario Pietsch
cdd3f4b6a2
Update German translations - fix some typos (#8261)
* Update German translations - fix some typos

* fix typo
2024-06-18 10:29:13 +01:00
Mario Pietsch
fdb86e7881
Remove NEW ribbon from "Saving with Polly" and "TiddlyBucket " (#8266) 2024-06-18 09:11:50 +01:00
Mario Pietsch
b4ac1e6b35
Update description field for Release v5.3.2 and v5.3.3 (#8267) 2024-06-18 09:11:24 +01:00
btheado
91e0b2afb6
Use the testcase widget to add some simple tm-http-request examples (#8260) 2024-06-15 09:25:12 +01:00
Jeremy Ruston
2d5b935b1c Fix server header authentication when header is missing
Fixes #8237
2024-06-14 09:58:06 +01:00
Jeremy Ruston
177ba4b56e Update archive
@pmario v5.3.2 appears to be missing, is that something you could kindly help with?
2024-06-14 09:54:48 +01:00
Andrei Rybak
6f248bf5b5
Docs: Link to correct plugin instructions for Node.js (#8246)
If a user of a Node.js (aka "client-server") installation of TiddlyWiki5
goes through instructions of "Installing a plugin from the plugin
library" [1], they will encounter a dead end, quote:

	The official plugin library is disabled when using the
	client-server configuration. Instead, plugins should be
	installed via the `tiddlywiki.info` file, as described here.

The word "here" links to the same tiddler [1], sending the user into a
endless loop.

Instead, link to "Installing official plugins on Node.js" [2], which
actually contains the instructions for editing `tiddlywiki.info` file.

[1] https://tiddlywiki.com/#Installing%20a%20plugin%20from%20the%20plugin%20library
[2] https://tiddlywiki.com/#Installing%20official%20plugins%20on%20Node.js
2024-06-12 22:26:52 +01:00
Jeremy Ruston
4bda8cfee6 Tweak release note 2024-06-12 11:54:33 +01:00
Jeremy Ruston
93d32d59aa Fix spotlight effect when scrollbars visible 2024-06-12 11:54:24 +01:00
Jeremy Ruston
e30746d5e5 Button widget should refresh when tooltip attribute changes
Fixes #8253
2024-06-12 10:20:40 +01:00
Jeremy Ruston
3e1d8fa598 Tweak release note 2024-06-12 10:02:51 +01:00
lin onetwo
32cbc97a0c
Fix/self transclude (#8254)
* fix: ignore empty tiddler param when extract transcludes

* test: about self transclude
2024-06-12 09:39:43 +01:00
Mateusz Wilczek
d276e0aa25
Improve docs of transcludes and backtranscludes operators (#8247)
* Improve docs of transcludes and backtranscludes operators

* Improve docs: cross reference hard/soft links and transclusions
2024-06-10 11:36:44 +01:00
Andrei Rybak
3243adc3a5
Sign the CLA (#8245)
Sign the CLA for Andrei Rybak, https://github.com/rybak
2024-06-09 15:52:55 +01:00
Jeremy Ruston
bf9865af20 Update release note 2024-06-09 09:12:47 +01:00
Saq Imtiaz
08c7a8805b
Fix: action-log should not evaluate functions (#8239) 2024-06-08 17:12:51 +01:00
Mario Pietsch
12c551ef05
Make sure split(regex) returns an array of strings (#8222)
* make sure split(regex) returns an array of strings

* remove "undefined" from the output

* add info about capture groups to the docs
2024-06-08 17:09:21 +01:00
btheado
a67c0e1399
Use the testcase widget for the -deletefield widget examples (#8243) 2024-06-08 16:53:32 +01:00
btheado
7ec8334005
Use the testcase widget for the $action-deletetiddler widget examples (#8242) 2024-06-08 16:51:55 +01:00
Jeremy Ruston
1a57d08feb Tweak #7866 to omit "rule" property when unset, instead of leaving it null
Also make tests pass
2024-06-08 16:51:00 +01:00
Jeremy Ruston
5db3eeeaa2 Update release note 2024-06-08 16:41:32 +01:00
Jeremy Ruston
e4c682d04b Merging #7866: Add start and end properties to WikiText AST nodes
commit 5687d9f44b
Author: Gk0Wk <nmg_wk@yeah.net>
Date:   Wed Dec 6 11:33:43 2023 +0800

    Fix for html parser

commit df0a1b184e
Author: Gk0Wk <nmg_wk@yeah.net>
Date:   Wed Dec 6 02:47:47 2023 +0800

    Fix HTML AST node boundary parsing in WikiText

commit ac8dda0a1a
Author: Gk0Wk <nmg_wk@yeah.net>
Date:   Sat Dec 2 13:02:52 2023 +0800

    update test-wikitext-parser.js, change for-const-of -to .utils.each, add more range attributes

commit e2b9a4ed57
Author: Gk0Wk <nmg_wk@yeah.net>
Date:   Wed Nov 29 22:35:39 2023 +0800

    Add more start-end range attributes for AST

commit d3e62ec56a
Author: Gk0Wk <nmg_wk@yeah.net>
Date:   Wed Nov 29 20:45:00 2023 +0800

    Add rule attribute for WikiText AST nodes

commit 4200495055
Author: Gk0Wk <nmg_wk@yeah.net>
Date:   Wed Nov 29 15:48:38 2023 +0800

    Add start and end properties to AST nodes for list, codeblock, and all other elements
2024-06-08 16:40:20 +01:00
Jeremy Ruston
240496d85c Update release note 2024-06-08 15:04:24 +01:00
lin onetwo
78ace99685
Feat: translatable plugins and docs (#7821)
* feat: t macro and docs

* feat: support block mode so you can transclude whole tiddler

* refactor: use lingo and procedure

* refactor: use function instead of set variable

* docs: about  mode:"inline"

* Update LingoMacro.tid

* docs: more usage about inline

* refactor: update translate macro to reuse lingo macro

* Delete translateMacro.tid

* refactor: update translation of tiddlyweb

* docs: more tiddlyweb l10n

* feat: add comment, so when use <$text text=<<lingo>> by mistake, it shows

* i18n: add more l10n

* feat: add tree to plugin to reveal l10n structure

* i18n: add menubar translation for example

* i18n: more for menubal

* docs: Headings -> Heading

* refactor: remove the "tree" tid

* Revert "refactor: remove the "tree" tid"

This reverts commit fb70f0b146.
2024-06-08 14:58:21 +01:00
Jeremy Ruston
3ddd10d373 Update release note 2024-06-07 18:13:18 +01:00
Jeremy Ruston
6833ccdb97 Revert "Improve command line logging (#3704)"
This reverts commit 25ec52b912.
2024-06-07 18:09:50 +01:00
Jeremy Ruston
36a9e3f54e Merge branch 'tiddlywiki-com' 2024-06-06 17:16:13 +01:00
Jeremy Ruston
789d64f768 Merge PR #7661 2024-06-06 17:15:41 +01:00
Jeremy Ruston
25ec52b912
Improve command line logging (#3704)
* Initial improvements

* Fix broken merge
2024-06-06 16:46:10 +01:00
Jeremy Ruston
4be81b2bf4 Merge branch 'tiddlywiki-com' 2024-06-06 13:30:02 +01:00
Jeremy Ruston
423075e89d AWS Plugin: Fix for SJCL changes 2024-06-06 11:29:02 +01:00
Mario Pietsch
51ad11401b
Docs: fix broken internal links (#8159)
* fix broken internal links

* reset modified fields
2024-06-06 11:25:03 +01:00
Cameron Fischer
352272905e
Fixed issue where $parameters did nothing with no $transclude (#8203)
* Fixed issue where $parameters did nothing with no $transclude

* Figured I should test \parameters too
2024-06-06 11:20:35 +01:00
Saq Imtiaz
eb15dc8408
Docs: Corrects tag on parsermode pragma documentation (#8235)
* docs: Corrects tag on parsermode pragma documentation

* Update Pragma_ _parsermode.tid

reset modified date
2024-06-04 19:42:22 +01:00
Saq Imtiaz
33bc77f46f
fix: nested functions should resolve filter run variables (#8233) 2024-06-04 18:19:41 +01:00
lin onetwo
4860b14315
Import global macros when render title (#8097)
* fix: import lingo macro when render title

* refactor: only import lingo macro for title to save memory

* Revert "refactor: only import lingo macro for title to save memory"

This reverts commit 36bf0848e0.
2024-06-04 17:13:41 +01:00
Jeremy Ruston
913d15dc53 Fixed editor layout
Fixes #8217
2024-06-04 11:50:55 +01:00
lin onetwo
9e1babdf82
Update backtranscludes.tid (#8014) 2024-06-04 11:39:51 +01:00
Jeremy Ruston
ea173ec83d
Add basic authentication support for tm-http-request (#8109) 2024-06-03 19:20:12 +01:00
Jeremy Ruston
40801f3c29 Update release note 2024-06-03 09:21:51 +01:00
twMat
312b3b2037
Typo in Procedures.tid (#8229) 2024-06-02 10:25:30 +01:00
Xavier Cazin
f8ae96118a
Catchup with fr-FR translation (#8231)
* fr-FR description of the `stability` core field

* fr-FR translations for testcase-related description strings

* fr-FR translations for testcase-related palette descriptions

* fr-FR translation for emergency download button caption

* Replace operand with parameters in fr-FR description of isfilteroperator

* fr-FR description of the `class` core field

* fr-FR update of a --command example

* better fr-FR description for main types

* Clearer fr-FR description of the `server` command

* Complete the fr-FR translation for the --savewikifolder description
2024-06-02 10:17:03 +01:00
Jeremy Ruston
7337b6da63 Missing contributor from release note 2024-05-31 14:42:39 +01:00
Jeremy Ruston
416c6ee0d4 Fix URL of geospatial demo 2024-05-31 14:02:21 +01:00
Jeremy Ruston
743bc4933f Update release note 2024-05-31 13:46:27 +01:00
Jeremy Ruston
4055501f71
Add Geospatial plugin (#7406)
* Add XLSX import spec for demo real estate spreadsheets

* Fix fieldname

* Improve map pin

* RealEstate demo: Set lat, long, price fields to be numeric

* Clean up Flickr demo

* Update geomap widget to refresh properly

* Add Leaflet MasterCluster plugin

* Setup the marker cluster plugin

* Rearrange real estate demo

* Reduce default cluster radius

* Beginnings of real estate demo

* Fix interpretation of HTTP status codes

* Real estate demo: Make columns hideable

* Real estate demo: sortability

* Real estate demo: search and limit

* Fix typo

* Fix lat long transposition

* Fix startup ordering

* Add geolookup operator

* Real Estate Demo: Add support for computed columns

* Real estate demo: Increase result limit

* Remove demo data

* Track map pan and zoom state in a state tiddler

* WIP

* Use geojson extension for geojson file

* Use geojson extensions for another geojson file

* Split demo from the geospatial plugin into its own edition

* Add build targets required by ./bin/site-build.sh...

... when building the geospatial edition as the main edition, making it easier to find on Vercel

* CI Fixes

* Fix default tab

* Rearranging geospatial plugin vs. edition

* More refactoring between demo and plugin

* Start of plugin docs

* Display GeoJSON properties on click

* Fix layer lookup demo

* Restore XLSX Utils plugin and dependencies

* Cleanup docs

* Remove 5.2.8 release note

* Remove 5.2.8 release note

* Docs update

* Fix minor refreshing bug for geomap widget

* Docs updates

* Add jsonset operator

* Add geonearestpoint operator

* jsonset: support for other data types and documentation

* Add logo

* Add link to preview build

* jsonset: add support for assigning JSON strings

* Fix nonstandard initialisation code for fill/parameter/slot widgets

* Introduce testcase widget so that we can reuse testcases as documentation examples

There's still a bit to do: adding tabs to the source panel of the testcase display, and tweaking the CSS.

* Update logo

* Testcasewidget: Add tabs for switching between source tiddlers

* Testcase appearance tweaks

* Switch to fluid-fixed layout

* Docs for the testcase-transclude and testcase-view widgets

* Split docs into separate tabs

* Extend testcase-view to be able to view other fields

* Extend default testcase template to show all fields of payload tiddlers

* Add some geomap examples

* Fix testcase rounded corners

* Add a geomap layer demo

* Add favicon

* Switch from building the geospatial plugin as the main build back to tw5.com

To make it easier to get to the documentation for the new features

* Remove obsolete comment

* Remove geospatial plugin from tw5.com build

* Fix build link

* Add note about core enhancements included in this branch

* Refactor data widget implementation

To avoid code duplication

* Integrate test cases with the docs

* Remove erroneously pasted docs material

* Remove erroneously copied olc-encode tests within old-decode test case

* Refactor compound tiddler handling into data widget

And add some tests for the data widget

* Default test case template tweaks

* Move Flickr macros into geospatial plugin from the demo edition

* FlickrDemo: Simplify UI

* FlickrMacros: Use a template to define photo tiddler fields

* Remove geospatial plugin from prerelease default tiddlers

* Extend Flickr helpers to support photoTiddlerTemplate parameter

* Update modification times of doc tiddlers

So that they are at the top of the recent tab

* Update 5.3.0 release note

* Remove custom CI step for this branch

* Restore standard sitetitle

* Flickr macro docs

* Rename $:/tags/GeoLayer to $:/tags/GeoFeature

And make sure that it works with all GeoJSON features, not just polygons

* More test data (from leaflet.js)

* Captions should be transcluded, not viewed raw

* Make HTTP handler use wiki of widget that sent the message

* Switch testcase widget to use an intrinsic template

Makes things much simpler

* Complete Flickr demos

* Extend geonearestpoint operator to work with feature collections

* Extend realestate demo to show data on nearest volcano

* Flickr macros: fix pagination after first page

Make sure that the widget we create to run the actions also has access to the event handlers attached to the rootwidget.

* Real estate demo: Fix nearest volcano

* Testcase docs update

* Testcase template: put title at the top and remove header row

* Docs correction

* New geonearestpoint test case

* Make test cases editable

* Test case default template: Always put "Output" tab first

* Initial Commit

* HttpClient object shouldn't need to know about events

* Add support for cancelling HTTP requests

* Make the number of outstanding HTTP requests available in a state tiddler

* Add a network activity button

Click it to cancel outstanding requests

* WIP

* Fix typo

Thanks @btheado

Co-authored-by: btheado <brian.theado@gmail.com>

* Data widget: parse carriage returns in compound tiddlers

* Fix crash when cancelling more than one HTTP request

Thanks @saqimtiaz

* Further fixes to cancelling outstanding HTTP requests

* Don't have data widget rendering its own JSON

Making the data widget render its raw JSON (introduced in 683ec33004) was a bad idea as it messes up the innerwiki use of the data widget. Instead we use the testcase widget with a special template to render the raw JSON of the payload of a testcase, thus giving us a way to test the data widget

* Fix missed docs update

* Introduce geolayer widget for specifying layers for geomap

* Fix breaking tests

* Remove docs references to obsolete widgets

* Tests for geounion, geointersect and geodifference

* Support for multiple base layers

* Make the layers control visible which allows the base layer to be chosen, and individual overlay layers to be hidden
* Add tiddlers tagged $:/tags/GeoBaseLayer to define some useful map base layers
* Add geobaselayer widget to define base layers

* Add a satellite base layer and another terrain base layer

* Add a note where to get more base layers

* Docs update

* Geomap widget: fix default base layer rendering

* Add startPosition and layersPanel attributes to geomap widget

* Update geolayer widget docs with missing attributes

* Add interactive demos for geounion, geodifference, geointersection

* Open geofeature and geomarker maps on the bounds of their content

* Move settings from demo into plugin

Because now the Flickr macros are part of the plugin

* Icon for geospatial plugin

* Fix missing body

* Flickr Demo typo

* Docs update

* Add support for draggable markers

* Removed accidentally committed file

* Remove unwanted log

* Add support for tm-request-geolocation message

* Fix typo

* Fix bug when fitting to non-extistent bounds

* Update main wiki greeting

* Use "Flickr helpers" instead of "Flickr macros"

* File renames for 05d3271603

* Fix testcase widget example

Thanks @btheado

* Fix testcase widget refreshing

* Fix failing tests from 03b6413c7a

* Docs: Clarify that template must be in the payload

* Testcase widget: Exclude tab state tiddlers

See https://github.com/Jermolene/TiddlyWiki5/pull/7406#discussion_r1327971965

Thanks @btheado

* Remove obsolete setquerystring operator

Instead we have the query- parameters to the http request message

* Remove obsolete change to --setfield command

* Fix tiddler name typo

* Initial Commit

* Add note to preview build

* Fix whitespace and indenting

Thanks @pmario

* Fix crash with unset $tiddler attribute on <$data> widget

Thanks @CodaCodr

* Remove Stamen baselayers

They have stopped making them available for free - see https://maps.stamen.com/stadia-partnership/

* Disable test that won't run in browser CI

* Disable broken tests

* Update olc-encode.tid (#7885)

Correct spelling

* Don't duplicate "description" field in test cases

* Use different background colours for nested testcase widgets

* Extend the testcase widget to run tests

* Add testcases to control panel

* Add a view template body template to render testcase tiddlers

* Test edition should display testcases

* Whitespace fixes

* Make testcase tiddler tempalte link to itself

* Styling tweaks

* Docs improvements

* Styling tweaks

* Run the new tw5.com testcases in the test edition

* Update data widget to display its content in JSON

* Add testcase convenience procedure

* Clearer testcases for data widget, and docs tweaks

* Don't expect our intentionally failing test to pass

* Extend testcase default template so that the display format can be chosen

It is selected by setting the variable "displayFormat"

* DataWidget docs typo

* Mark Geospatial plugin as experimental

* Update to Leaflet v1.9.4

* Remove unneeded template

Left over from when the testcase widget was first implemented

* Don't hide the volcanoes of the world data set

* Update Flickr demo docs

* Fix subtle typo that was preventing popups from working correctly

* Go back to hiding the volcanoes of the world by default

Too much data for a small device now that the markers are displayed correctly

* Clarify docs for tm-request-location

* Update modified testcase from master

* Prepare for merging

---------

Co-authored-by: btheado <brian.theado@gmail.com>
Co-authored-by: Drevarr <drevarr@gmail.com>
2024-05-31 13:31:30 +01:00
Jeremy Ruston
ac855b0065 Improve refreshing of the data widget 2024-05-31 12:43:21 +01:00
Jeremy Ruston
7a50b2b554 Fix tm-copy-to-clipboard crash
See https://github.com/Jermolene/TiddlyWiki5/pull/8211#issuecomment-2138600286
2024-05-30 17:58:07 +01:00
Matt Lauber
65d9384261
Add useDefaultHeaders flag to tm-http-request (V2) (#8225)
* Add defaultHeaders flag that controls helpful default heders that can sometimes interfere with apis

* Bump version number

* rename parameter to useDefaultHeaders, and catch one location where the default was not being set properly.

* Use a better comparision operator

* remove bad change
2024-05-30 17:53:22 +01:00
Jeremy Ruston
da8d4ecfae Tweak #8214 by avoiding renaming boot.css
Improves the continuity of our GitHub history
2024-05-30 17:29:12 +01:00
Bram Chen
6a84ae332d
Update chinese language files (#8224)
* Improve traditional chinese translation of "Standard Layout"
2024-05-30 08:27:55 +01:00
Jeremy Ruston
e35793bc38 Update release note 2024-05-29 21:29:47 +01:00
lin onetwo
3af2a0ae6f
Rename default layout to "Standard Layout" (#8172)
* refactor: default PageTemplate -> DefaultLayout

* refactor: DefaultLayout -> StandardLayout

* i18n: Default ~PageTemplate -> Standard Layout
2024-05-29 16:47:52 +01:00
Jeremy Ruston
f3614c1e47 Simplify splash screen 2024-05-29 15:14:13 +01:00
Jeremy Ruston
78fb4a2c1d
Custom copy clipboard notifications (#8211)
* Initial Commit

* Improve plugin tests

Fixes #8209

* Fix RSOE

* Fix extraneous copy to clipboard at startup
2024-05-29 15:06:33 +01:00
Jeremy Ruston
928f3fc413 Revert "Add defaultHeaders flag that controls helpful default heders that can sometimes interfere with apis (#8152)"
This reverts commit 6910be795f.
2024-05-29 13:55:32 +01:00
lin onetwo
47029bac9e
Fix/backlink binary (#8098)
* fix: prevent check binary tiddler for backlink

* refactor: test for backlink
2024-05-29 11:53:44 +01:00
Matt Lauber
6910be795f
Add defaultHeaders flag that controls helpful default heders that can sometimes interfere with apis (#8152)
* Add defaultHeaders flag that controls helpful default heders that can sometimes interfere with apis

* Bump version number
2024-05-29 11:42:50 +01:00
yaisog
cd2d4b3eb7
Clarify handling of title lists in ActionListopsWidget documentation (#8184)
* Improve section on subfilter expressions

* Further refinement of the info box.
2024-05-29 11:39:41 +01:00
Mario Pietsch
5856bd8342
Fix get variable info params (#8179)
* return params for every variable type

* add tests for widget getVariableInfo.params

* make param values different to names
2024-05-29 11:14:21 +01:00
Jeremy Ruston
15001020fe Update release note 2024-05-29 10:33:08 +01:00
Jeremy Ruston
0f17ff0f6c Testcase widget should treat test cases without a test as if they had passed 2024-05-29 10:25:34 +01:00
Jeremy Ruston
4274e8fd7f Fix tests broken in 1b6e8e1a79 2024-05-29 08:36:52 +01:00
Jeremy Ruston
1b6e8e1a79 Testcase widget should only run tests if expected results are specified
Fixes #8218
2024-05-29 08:28:34 +01:00
Jeremy Ruston
9756b79683 Fix currentTiddler in testcase renderings
See eb4e9d86ac (r142368175)
2024-05-28 14:30:59 +01:00
Jeremy Ruston
613ee13294 Testcase docs: add note about description field overwriting Description payload tiddler 2024-05-28 13:37:50 +01:00
Jeremy Ruston
b5bd4c9673 Fix testcase heading link destination 2024-05-28 13:22:44 +01:00
Jeremy Ruston
2312cd3301 Improve wording for failing test
See https://talk.tiddlywiki.org/t/introducing-the-testcase-widget/9847/11
2024-05-28 13:17:35 +01:00
lin onetwo
dbe912ba5d
Fix boot.css bug from #8099 (#8214) 2024-05-27 12:45:29 +01:00
lin onetwo
a463783283
Fix/sjcl variable (#8099)
* refactor: use files to add prefix

* fix: always use $tw.sjcl

* refactor: move sjcl to lib/sjcl

* fix: require sjcl in lib/

* refactor: move sjcl.js back into /boot
2024-05-26 15:56:25 +01:00
Bram Chen
e3f9be995b
Update chinese language files (#8204)
* Add chinese description for field `stability`
2024-05-25 12:12:19 +01:00
Cameron Fischer
e932b09016
More robust infinite recursion handling with custom exception (#7882)
* Introduced preliminary idea for infinite recurse exception

* Better handling of infinite recursion

But it could be better still...

* the TransclusionError is a proper error

Moved the magic number to be on the error's class. Not sure if that's
a great idea.

* Fixed minor minor issue that came up in conflict

The minor fix to the jasmine regexp that escaped a '+' somehow
broke some random test.
2024-05-25 10:56:19 +01:00
Mario Pietsch
074d35c388
Make the linter happy (#8210) 2024-05-23 18:13:52 +01:00
Jeremy Ruston
18d23048da Improve plugin test implementation 2024-05-23 16:47:28 +01:00
Jeremy Ruston
970f829c83 Fix bug in f9df4f0741 2024-05-23 16:34:24 +01:00
Jeremy Ruston
f9df4f0741 Plugin tests should only apply to core plugins
Hi @pmario could you kindly try this?

Fixes #8207
2024-05-23 16:28:08 +01:00
Jeremy Ruston
fc0de10cd1 Fix plugin library URLs 2024-05-22 11:50:15 +01:00
Cameron Fischer
01b2e864c1
Fixed issue with fakedome TW_Node inheritence (#8195) 2024-05-21 22:02:37 +01:00
Jeremy Ruston
0adc6024d1 Fix plugin library URLs broken by #8198
Thanks @pmario
2024-05-21 18:33:04 +01:00
Jeremy Ruston
4d2aa1dc95 Fix plugin tests in the browser 2024-05-21 11:26:24 +01:00
Jeremy Ruston
5aa3646df5
Add plugin stability badges (#8198)
* Initial Commit

* Fix plugin library URL

* Need to set plugin library location for prerelease

* Styling tweaks

* Docs

* Add tests that the core plugins all have a valid stability field
2024-05-21 11:22:39 +01:00
Erwan
3e27093c94
sign the CLA (#8202)
Signing the CLA for CyberFoxar
2024-05-20 23:05:53 +01:00
Bram Chen
71d77fe428
Update chinese language files (#8200)
* Update chinese language files

* Add chinese translations for the new `<$testcase>` widget

* Update chinese language files

* Add chinese translations for the new <$testcase> widget
2024-05-20 16:32:55 +01:00
Jeremy Ruston
ece8b0ee01
Add <$testcase> widget (#7817)
* Initial Commit

* Add note to preview build

* Fix whitespace and indenting

Thanks @pmario

* Fix crash with unset $tiddler attribute on <$data> widget

Thanks @CodaCodr

* Don't duplicate "description" field in test cases

* Use different background colours for nested testcase widgets

* Extend the testcase widget to run tests

* Add testcases to control panel

* Add a view template body template to render testcase tiddlers

* Test edition should display testcases

* Whitespace fixes

* Make testcase tiddler tempalte link to itself

* Styling tweaks

* Docs improvements

* Styling tweaks

* Run the new tw5.com testcases in the test edition

* Update data widget to display its content in JSON

* Add testcase convenience procedure

* Clearer testcases for data widget, and docs tweaks

* Don't expect our intentionally failing test to pass

* Extend testcase default template so that the display format can be chosen

It is selected by setting the variable "displayFormat"

* DataWidget docs typo

* Fix data widget not refreshing

* Links in testcase output switch to the tab containing that tiddler

Thanks to @btheado for the suggestion

* Docs update for 648855e8a5

* Wording tweak

* Add support for narrative tiddlers in test cases

* Documentation improvements

* Cleanup comments

* Remove obsolete code comments

* Simplify template

* Docs update

* Rename $:/core/ui/testcases/DefaultTemplate/SourceTabs from $:/core/ui/testcases/DefaultTemplate/Source

* Use the view template body for failing tests

* Don't reference the geospatial plugin

* "Test case" should be two words

* Fix handling of currentTiddler variable

Fixes problem reported by @btheado in https://github.com/Jermolene/TiddlyWiki5/pull/7817#issuecomment-2103704468

* Prepare for merging
2024-05-20 11:30:30 +01:00
Joshua Fontany
f1299120a6
Block Quotes - fix parsing error with spaces before reEndString (#8186)
* fix parsing error with spaces before reEndString, update docs to clarify block mode inside block quotes.

* additional advanced example

* oops, convert spaces back to tabs.

* reset indentation

* final tabs

* missed some

* wikitext classes are appended to other leading wikitext, no need to skip whitespace here.
2024-05-15 12:25:02 +01:00
Jeremy Ruston
0b475628de Merge branch 'tiddlywiki-com' 2024-05-14 09:17:22 +01:00
twMat
24dceb1bce
Update Filter Run Prefix.tid (#8188)
add relevant links
2024-05-14 08:38:30 +01:00
Jeremy Ruston
64f5dd942c Update release note 2024-05-02 11:39:25 +01:00
Jeremy Ruston
9007e0b8c8 Merge branch 'tiddlywiki-com' 2024-05-01 12:46:20 +01:00
sarna
07a048975d
Improve Polish date translation (#8170)
* Make month and weekday names lowercase

* Replace AM and PM with Polish words

* Adhere to recommendations wrt short weekday names

https://sjp.pwn.pl/poradnia/haslo/dni-tygodnia-i-inne-roznosci;1788.html

* Fix a typo

* Inflect month names

I assume they're always used as part of the full date,
and in this case months are always inflected in Polish.

* Use roman numerals in place of short month names

I could not find any actual use of short month names in Polish.
The only mentions are from people trying to translate English
conventions into Polish - typically in software.

In https://sjp.pwn.pl/poradnia/haslo/dni-tygodnia-i-inne-roznosci;1788.html
Mr. Bańko answered (translation mine):
  Abbreviations of month names are less common, numbers are used instead.
  Such abbreviations can be created [...]. However, one must take into account
  that the reader will not understand them.

I decided to go with a convention that's in actual use, rather than to
force an English convention which is alien to non-software dev Poles.
2024-04-28 19:23:31 +02:00
sarna
b4e0a9b28b
Signing the CLA (#8171) 2024-04-28 19:22:58 +02:00
FSpark
67845f8ebe
Fix: some plugin subtiddlers do not have title in savewikifolder command (#8151)
* fix: some plugin subtiddlers do not have title in savewikifolder command

* fix: following coding style
2024-04-25 18:29:09 +02:00
Matt Lauber
a081e58273
HTTP Client: Return success calls for all 2XX response codes (#8150)
APIs especially use 2XX response codes outside of 200, 201, 204 for responding to responses.  Treat all "Successful" response codes (i.e. anything between 200-299) as successes, and pass the responseText.
2024-04-16 16:24:53 +01:00
Jeremy Ruston
1d48909012 Docs: Remove reference to restrictions on field names
Fixes #8146
2024-04-16 10:34:49 +01:00
Joshua Fontany
d3722a6602
Docs for use-browser-cache (#8142)
* docs for use-browser-cache

* Update WebServer Parameter_ use-browse-cache.tid

remove timestamps

* revert last change

* move to webserver folder

* clarify, typos

* dedupe
2024-04-13 10:08:40 +01:00
Joshua Fontany
5f74f4c2fa
Fix bug 7878: Save command (#8140)
* first pass at fixing bug 7878, needs testing

* clarify default behaviour in comment

* fix property typo, tested and works as intended

* remove debugger
2024-04-11 21:54:46 +01:00
Joshua Fontany
9167b190d2
Fix bug 8138: server cache-control (#8141)
* cache-control no-store by default

* clarify comment spec reference

* comment typo

* fix else formatting

* Update server.js

allow route definitions to set their own cache-control
2024-04-11 19:23:32 +01:00
Cameron Fischer
df8731f760
Made library boot module requirements consistent (#8083) 2024-04-10 10:52:22 +01:00
andjar
1fb9098c76
Update cla-individual.md (#8133)
Signing the CLA
2024-04-09 22:22:18 +01:00
Rob Hoelz
e9aa3c6c93
Add $timestamp argument for <$action-deletefield> widget (#8115)
* Start on some tests for <$action-deletefield />

* Only update modified field if we actually delete a field

…in the <$action-deletefield /> widget.

Fixes a bug where <$action-deletefield foo /> would update the modified field
if the "foo" field wasn't present on a tiddler.

* action-deletefield: Test when modified does and doesn't exist

* Add $timestamp argument to action-deletefield

To make it more consistent with other tiddler-manipulating action widgets

* Add docs for action-deletefield $timestamp
2024-04-04 16:03:15 +01:00
Jeremy Ruston
105e8195d5 Merge branch 'tiddlywiki-com' 2024-04-03 21:51:13 +01:00
Simon Huber
eeb4e7a7f7
Add a "Refresh Browser" keyboard shortcut (#8121)
* Create a `refresh` keyboard shortcut

This creates a `refresh` keyboard shortcut that refreshes the page.
In TiddlyDesktop <kbd>ctrl-R</kbd> doesn't work

* Update refresh.tid

* Update shortcuts-not-mac.multids

* Update shortcuts-mac.multids

* Update ShortcutInfo.multids
2024-04-03 09:58:56 +01:00
Simon Huber
7ce85a2ddb
Update reset.tid to use modern-normalize 2.0.0 (#8120)
This PR updates the vanilla/reset stylesheet to use the newer `modern-normalize 2.0.0`
2024-04-02 17:35:10 +01:00
Crystal Person
804f227815
Signing CLA (#8126) 2024-03-31 17:08:09 +01:00
Rob Hoelz
9939759690
Report throttled refreshes (#8116)
Fixes GH #6054
2024-03-29 14:47:22 +00:00
Mario Pietsch
b595651fe1
Fix hide-show button code needs to be transcluded mode=block (#8082) 2024-03-28 21:50:22 +00:00
Mario Pietsch
9cd6affcae
Minor changes to Widgets tiddler (#8107) 2024-03-28 19:29:57 +00:00
Mario Pietsch
e43cd2d989
Use v5.3.x syntax for $:/core/ui/PageTemplate/pagecontrols (#8088) 2024-03-28 19:29:16 +00:00
Mario Pietsch
f1e707bff4
Refactor GitHub-fork-ribbon plugin for better compatibility (#8075) 2024-03-28 19:27:58 +00:00
Mario Pietsch
2d92a6fd78
Tag picker rewritten using new v5.3.x syntax (#7978)
* tag-picker add Examples

* tag-picker - use new v5.3.x wikitext syntax

* tag-picker - more inline docs

* tag-picker - fix add button

* rename local functions: tag, userInput to _tf.getTag and _tf.getUersName to make the code and variable scopes more understandable

* tag-picker - move local variables definitions into one place: tag-picker macro

* tag-picker - replace reveal-widget with conditional IF syntax

* tag-picker - remove logs and test tag-picker - actions parameer -> OK

* tag-picker - add tag-picker Macro docs

* tag-picker docs - change \define -> \procedure

* tag-picker -- fix problem with focus loss if elements selected by mouse click

* tag-picker -- add tf. prefix only to new function definition names for backwards compatibility.

* tag-picker -- update example docs

* re-add tags: $:/tags/Macro
2024-03-28 19:09:31 +00:00
Mario Pietsch
2e0e541ebf
Add tc-tag-missing or tc-tag-exists to tag pills including docs (#7951)
* add tc-tag-missing or tc-tag-exists to tag pills including docs

* changes as requested

* macros not needed anymore - so remove

* fix the tag Macro docs
2024-03-28 19:07:54 +00:00
Mario Pietsch
b4d7e34a5a
Add unusedtitle macro tests - should have full code covery (#7939)
* add unusedtitle macro tests - should have full code covery

* remove numbering from tests
2024-03-28 18:39:57 +00:00
Mario Pietsch
b6eab1afd6
Add theme font size settings to Open in New Window CSS (#7945)
* add theme font size settings to Open in New Window CSS

* add DOCTYPE html to New Window startup template

* fix merge typo

* fix merge typo one more time
2024-03-28 18:36:33 +00:00
Télumire
32cbd53423
Set a proper doctype for the open window template (#8095) 2024-03-27 18:20:35 +00:00
Jeremy Ruston
90a6f31db2 Merge branch 'tiddlywiki-com' 2024-03-27 10:10:26 +00:00
Jeremy Ruston
d37d6595b5 Docs: Add link to Basic Auth example 2024-03-27 10:09:46 +00:00
Jeremy Ruston
e02cafb938 Add docs about using Basic Authentication in HTTP requests 2024-03-27 08:35:56 +00:00
Jeremy Ruston
801ed0ea11 Fix cycle operator crashing if step size is larger than the number of operands
See https://talk.tiddlywiki.org/t/bug-report-javascript-error-at-tw-com-within-cycle-operator-try-it/9430/1
2024-03-26 16:04:13 +00:00
Mario Pietsch
31ec1bdd50
Add tag parameter to reveal-widget to fix regression (#8084) 2024-03-18 09:08:11 +00:00
Jeremy Ruston
62a5fc075b Merge branch 'tiddlywiki-com' 2024-03-16 22:05:51 +00:00
Mario Pietsch
0b6db6e860
Fix indentation for tiddlers that set tv-config-toolbar-class (#8079)
human readable in preparation to add data-title=<<listItem>>
for better UX defining a "read only" theme

Changes to be committed:
	modified:   core/ui/EditTemplate/controls.tid
	modified:   core/ui/PageControls.tid
	modified:   core/ui/PageControls/more-page-actions.tid
	modified:   core/ui/ViewTemplate/title.tid
	modified:   core/ui/ViewToolbar/more-tiddler-actions.tid
	modified:   plugins/tiddlywiki/menubar/items/pagecontrols.tid
2024-03-16 19:03:36 +00:00
poc2go
09f04cb5a6
Signing the CLA (#8077) 2024-03-16 17:33:13 +00:00
Mario Pietsch
511d480a60
Fix wikitext-macros example block mode (#8071) 2024-03-15 18:08:37 +00:00
Mario Pietsch
3342cfc886
Docs: fix doubled list in: Deprecated - What does it mean (#8060) 2024-03-13 22:08:11 +00:00
Mario Pietsch
ec0b264426
Docs: add Procedures railroad syntax description (#8061) 2024-03-13 22:07:39 +00:00
Mario Pietsch
8f741e8e67
Docs: deprecate Macro call railroad syntax (#8062) 2024-03-13 22:06:23 +00:00
Mario Pietsch
32bf9fd7a1
Docs - wikitext-macros new v5.3.x syntaxWikitext macros (#8059)
* docs - wikitext-macros new v5.3.x syntax

* fix flexcard macro wrong link
2024-03-13 22:02:56 +00:00
Jeremy Ruston
3657e59a08 Merge branch 'tiddlywiki-com' 2024-03-13 18:03:23 +00:00
Mateusz Wilczek
21a5841aab
Add links to and instructions about Saq's PR Maker in docs (#8068) 2024-03-13 12:17:14 +00:00
Mateusz Wilczek
edfd27fa45
Improve filter run prefix docs (#8067) 2024-03-12 20:54:45 +00:00
Jeremy Ruston
0e7d566df7 Add link to demo of TiddlyWiki as a library in other Node.js apps 2024-03-12 17:16:51 +00:00
Mario Pietsch
8481b7d137
Dev edition: change layout to fluid-fixed (#8063) 2024-03-12 08:56:12 +00:00
Mario Pietsch
0fbfdce4b6
Add $:/StoryList to gitignore for tiddlywiki-com branch (#8065) 2024-03-12 08:54:09 +00:00
Jeremy Ruston
9079186b18 Merge branch 'tiddlywiki-com' 2024-03-11 12:15:06 +00:00
Jeremy Ruston
e67eaca030 Revert "Docs - wikitext-macros new v5.3.x syntax (#8033)"
This reverts commit 0fb10da8b3.
2024-03-11 12:13:25 +00:00
Jeremy Ruston
1222bed0de Merge branch 'tiddlywiki-com' 2024-03-10 15:11:03 +00:00
Mario Pietsch
78a09fcf56
Docs - download empty button new syntax - v5.3.x (#8034)
* docs - download empty button new syntax - want to keep stuff like this for the time beeing

* use \procedure instead of \define for consistency
2024-03-10 15:07:56 +00:00
Mario Pietsch
0f395ce81d
Add code-body field to doc-styles tiddler (#8054) 2024-03-10 15:07:28 +00:00
Mario Pietsch
b28f420430
Some more tv-macros changed to new syntax. Plus adjusted doc tiddlers (#8056) 2024-03-10 15:06:04 +00:00
Mario Pietsch
0b7914785c
Minor adjustments to existing doc tiddlers without changing modified date (#8057) 2024-03-10 15:05:26 +00:00
Jeremy Ruston
967e2b7fef Import variables should not parse with whitespace trim
Fixes #7909
2024-03-10 15:03:52 +00:00
Mario Pietsch
8d36ecd6bc
Add list-links to $:/deprecated tag (#8053) 2024-03-10 14:30:21 +00:00
Mario Pietsch
c2b436371b
Docs: tiddler-info-source - change sources tab to new syntax and add link to pr-creator (#8029)
* tiddler-info-source - change sources tab to new syntax and add link to pr-creator

* remove class from plain text elements as requested
2024-03-10 11:08:00 +00:00
Mario Pietsch
24e474bd72
Doc-macros, styles and documentation overview tiddler (#8037) 2024-03-10 10:41:09 +00:00
Mario Pietsch
a75d4ca003
Docs - operator macros, templates and filter-run template (#8035) 2024-03-10 10:39:16 +00:00
Mario Pietsch
0fb10da8b3
Docs - wikitext-macros new v5.3.x syntax (#8033) 2024-03-10 10:37:26 +00:00
Mario Pietsch
0202d7b463
Docs - make .from-version and .deprecated-since macros more readable (#8032) 2024-03-10 10:36:49 +00:00
Mario Pietsch
b22570a91f
Doc-macros - variable-macros new v5.3.x syntax (#8031)
* doc-macros - variable-macros new v5.3.x syntax

* change modified back to old value
2024-03-10 10:35:31 +00:00
oeyoews
00bd6f8ee8
Remove unnecessary prefix field for highlight plugin (#8048) 2024-03-09 15:45:38 +00:00
Jeremy Ruston
43a2399698 Merge branch 'tiddlywiki-com' 2024-03-09 14:49:55 +00:00
Télumire
35d1609a2b
Add a warning for potential image map scaling issues + responsive alternative with SVG (#8044)
* Add a warning for potential image map scaling issues + alternative with SVG

* Update ImageWidget.tid

fix phrasing
2024-03-09 14:39:15 +00:00
Jeremy Ruston
a90b1dbb49 Docs for bags and recipes
Prompted by https://talk.tiddlywiki.org/t/whats-a-bag-and-whats-a-tiddlywebadaptor/9278
2024-03-09 14:24:42 +00:00
Jeremy Ruston
72c4b92a4c Move some docs tiddlers to the correct directories 2024-03-09 14:23:45 +00:00
Simon Huber
bf9eafbad9
Update draggable.js - fix the call to updateDomNodeClasses (#8045)
* Update draggable.js - rename updateDomNodeClasses to assignDomNodeClasses

If I'm not wrong then the "updateDomNodeClasses" is unused and the "assignDomNodeClasses" is missing

This renames "updateDomNodeClasses" to "assignDomNodeClasses"

* Use "updateDomNodeClasses"
2024-03-09 10:00:27 +00:00
Mario Pietsch
28791287b2
Add sha256() function to $tw.utils (#8043) 2024-03-08 17:34:30 +00:00
Mario Pietsch
9082f36008
Docs: Add example for sha256 operator (#8042) 2024-03-08 17:29:17 +00:00
Jeremy Ruston
e64aa6c8f9 Remove accidentally committed dependencies
Fixes #8040
2024-03-07 08:24:51 +00:00
lin onetwo
6f9cabd352
DevDocs: about modern frameworks in TiddlyWiki (#8027)
* docs: abount modern frameworks

(cherry picked from commit 783547bac2d1bfaa20def3eeda0dc10b6b465d8d)

* docs: modified time

(cherry picked from commit c8db907fe273a414768f5292f61986800e092dfe)
2024-03-06 17:35:42 +00:00
Jeremy Ruston
69e828fc30 Fix csvtiddlers macro crash with missing tiddlers
Fixes #8039
2024-03-06 08:36:37 +00:00
Jeremy Ruston
7d25b13970 Merge branch 'tiddlywiki-com' 2024-03-04 14:13:41 +00:00
lin onetwo
bede60d362
Feat: New icon for default layout (#8020)
* feat: icon for default layout

* feat: new icon for default layout

* Update default-layout.tid

* Update default-layout.tid

* Update LayoutSwitcher.tid

* Update PageTemplate.tid
2024-03-04 11:38:29 +00:00
TonyM
f02fafe365
Update RefreshThrottling.tid (#8024)
Change word "preciously" to "previously" as I believe was intend.
2024-03-02 20:03:59 +00:00
Mario Pietsch
4fba206606
move tip to the end of the tiddler so it does not distract reading (#8019)
* move tip to the end of the tiddler so it does not distract reading

* reset modified
2024-02-29 19:26:19 +00:00
Jeremy Ruston
070327cb57 Include $:/tags/Macro on core macros for backwards compatibility
This avoids breaking existing code that expects to be able to import the core macros with just $:/tags/Macro

@pmario - I suggest that future updates use the same approach

Thanks to @ericshulman for reporting the problem
2024-02-29 12:39:41 +00:00
Jeremy Ruston
755a09be10 Tour plugin: Fix selector for "Recent" tab button 2024-02-29 09:43:38 +00:00
Bram Chen
9d874befa4
Update chinese language files (#8016)
* Add chinese captions for new emergency tiddlers download button
2024-02-28 18:05:22 +00:00
Jeremy Ruston
f1effdd2cd Merge branch 'tiddlywiki-com' 2024-02-28 18:04:35 +00:00
Jeremy Ruston
5b2d35e8d1 Revert "Update backtranscludes.tid (#8010)"
This reverts commit 32de6eca22.
2024-02-28 18:04:16 +00:00
Jeremy Ruston
a75fd2a64a Remove forced error in accidentally left in #7966
Thanks @pmario
2024-02-28 12:01:42 +00:00
catter-fly
4ae6f1ffd4
Adjusting saving w/r/t FireFox (#7669) 2024-02-28 11:38:00 +00:00
Mario Pietsch
ace6dbc514
CI: Fix archive output paths (#7919) 2024-02-28 11:35:50 +00:00
etardiff
4cca77b72d
Rewrite tag-picker macros as procedures (#7883)
This PR attempts to modernize the tag-picker macros as procedures, as @Jermolene suggested in [#7548 (comment)](https://github.com/Jermolene/TiddlyWiki5/pull/7548#issuecomment-1825458523).

What I changed:

* rewrote macros as procedures/replaced text substitutions with variables
* replaced nested $set and $var widgets with $let widgets/functions
* minor rewrites to reduce redundant code
* some additional linebreaks for clarity

*This is functionally identical to my initial PR, [#7880](https://github.com/Jermolene/TiddlyWiki5/pull/7880)*, minus the extra file I'd accidentally added. Thank you for bearing with me as I learn to navigate GitHub.
2024-02-28 11:32:48 +00:00
Jeremy Ruston
3543fe53ff
RSOE: Add emergency tiddlers download button (#7966) 2024-02-28 11:29:32 +00:00
Mario Pietsch
70178dce78
Add more classes to ControlPanel-Settings elements, so they can be styled using relatively simple CSS rules (#8000) 2024-02-28 11:28:27 +00:00
Mario Pietsch
9e6e50eccf
Add StoryList to gitignore (#8013) 2024-02-28 11:27:00 +00:00
Jeremy Ruston
898cac7f71 Remove accidentally committed $:/StoryList tiddlers 2024-02-28 11:26:40 +00:00
lin onetwo
32de6eca22
Update backtranscludes.tid (#8010)
* Update backtranscludes.tid

(cherry picked from commit dbce31764937e90ec0d678a29e426b22eacb122b)

* from-version 5.3.4
2024-02-26 14:33:17 +00:00
Jeremy Ruston
09e6117fe2 Update Macedonian language description 2024-02-26 13:13:06 +00:00
Robin Munn
984863065e
Fix "sjcl not found" errors in TiddlyDesktop (#8007) 2024-02-26 11:36:46 +00:00
Jeremy Ruston
c947ba4310 Make sure Macedonian is included in the translators edition 2024-02-26 10:19:42 +00:00
Jeremy Ruston
b33cfeab06 Add Macedonian language
Thanks Nikola Dio Petkovski
2024-02-26 10:17:16 +00:00
Jeremy Ruston
540b3ff81e Remove superfluous comma 2024-02-24 09:32:19 +00:00
Jeremy Ruston
c9675092ed Merge branch 'tiddlywiki-com' 2024-02-24 09:27:49 +00:00
Mateusz Wilczek
d29df793a4
Docs: Improve .from-version macro (#7874)
* Docs: Improve `.from-version` macro

* Restore icons in version badges
2024-02-24 09:26:41 +00:00
Mateusz Wilczek
e57123936f
Fix spacing in Standard and Filter tabs of Advanced Search (#7889)
* Fix spacing in Standard and Filter tabs of Advanced Search

* Move changed files to appropriate folder

* Restore original title/tags fields
2024-02-23 17:41:12 +00:00
Jeremy Ruston
6d721c728f Confetti Plugin: Don't pass undefined for missing parameters 2024-02-22 17:17:38 +00:00
Jeremy Ruston
ae9250622f Let's have performance instrumentation in the prerelease
I believe it was turned off by accident at some point
2024-02-22 17:17:23 +00:00
Jeremy Ruston
4dd9db3b46 Merge branch 'tiddlywiki-com' 2024-02-19 09:55:34 +00:00
lin onetwo
36fc8170a4
Basic Backtranscludes filter (#6081)
* feat: add transcludes and backtranscludes filter and its relying indexer

* feat: add test about backtranscludes

* docs: add doc about transcludes and backtranscludes Operator

* refactor: merge backlinks and backtranscludes indexer

* fix: test not executed

* fix: latest transclude use $tiddler instead of tiddler

* feat: A tiddler transclude with template will still use the tiddler as result.

* docs: wrong comment
2024-02-18 09:14:23 +00:00
Bram Chen
96e11fa8b0
Update chinese language files (#7993)
* Replace "運算元" (operand) with "參數" (parameter)
2024-02-17 09:35:29 +00:00
Bimba Laszlo
6236e7777c
Fix URLs of bimlas plugins (#7994) 2024-02-17 09:34:48 +00:00
Jeremy Ruston
af02349e47 Merge branch 'tiddlywiki-com' 2024-02-16 15:57:34 +00:00
Mario Pietsch
a21e7b2aac
$:/core/ui/EditTemplate/tags - rewrite to use v5.3.x syntax (#7981)
* $:/core/ui/EditTemplate/tags - rewrite to use v5.3.x syntax

* tag-macro -- change tag-styles function to make it more readable

* tags EditTemplate - improve code readability

* tags EditTemplate -- use hardcoded style colours as requested
2024-02-16 10:27:51 +00:00
Mario Pietsch
a09106f33b
Core-macro-diff-new-syntax (#7986)
* $:/core/macros/diff use v5.3.x syntax and add indentation for better readability -- all tests pass

* diff - set tags: $:/tags/Global
2024-02-14 19:45:11 +01:00
Mario Pietsch
699d8b9416
css-macro -- change tags to $:/tags/Global (#7987)
* $:/core/macros/CSS use v5.3.x syntax

* css-macro -- change tags to $:/tags/Global
2024-02-14 19:44:22 +01:00
Mario Pietsch
53ccc29209
Copy-to-clipboard macro - change tags to $:/tags/Global (#7988)
* copy-to-clipboard-macors -- new v5.3.x syntax

* copy-to-clipboard - change tags to $:/tags/Global
2024-02-14 19:36:32 +01:00
Simon Huber
a3521eb67d
Use qualified-preview-state in default body-editor for reuse in preview button (#7795)
* Use qualified-preview-state to reuse in preview button

Somehow the editor-body template and the preview button don't qualify the same showeditpreview anymore

* Update preview.tid to use qualified-preview-state

* Update preview.tid

* Update default.tid

* Update preview.tid
2024-02-14 17:22:54 +01:00
Simon Huber
d4f6befb9b
Remove overflow: auto from tiddler preview (#7985)
This removes `overflow: auto` from the tiddler preview.
I'm not sure anymore why it was added.
It causes some problems in the preview with popups for example, see screenshots
2024-02-14 17:21:08 +01:00
Mario Pietsch
a49436160d
Improve Filter Syntax documentation (#7368)
* Improve Filter Syntax documentaion / navigation

* update links and missing diagrams

* rename legacy prefix to shortcut prefix

* Update editions/tw5.com/tiddlers/filters/Filter Operators.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* add most changes a suggested by yaisog

* fix copy / paste from-version

* replace operand with parameter in the docs

* fix typo

* fix typos and improve railroad diagrams consistency

* move "new from version" info for filter run prefixes below the table

* fix typo transclusion and substitution

* Move Filters tiddler to the top level in the TOC

* wip-breadcrumbs

* breadcrumbs & breadcrumbsList macro final

* remove files that do not belong to this PR

* restore release banner

* add simple / story mode to breadcrumbs

* .breadcrumbs macro update comments

* new breadcrumbs CSS, woks with small screens

* make CSS configurable using hidden-settings

* improve CSS fro small screens

* remove the initial: recursiveParentTag macro

* improve location info for breadcrumbs nav. add "alt-text" for Edge ::after element

* breadcrumbs add mode=field

* bc add initial docs

* breadcrumbsField will also respect the story ordering

* add configurable global filterMode setting

* improve arrow CSS for browser zooming

* add bc links use bc-caption if caption field is non-empty

* breadcrumbs improve comments

* breadcrumbs aria-lable uses caption if there is one

* breadcrumbs improve documentation

* breadcrumbs improve docs for sort param

* fix showArrows docs

* remove .bc-link aria-label .. it's not needed if caption is resolved properly

* use subfilter instead of enlist to evaluate the "excluded" variable. Be consistent with toc-macros

* remove breadcrumbs macros - they have their own PR now

* resolve conflict

* add back doc-macros tiddler

* integrate :then filter run prefix

* remove .breadcrumbs macros and their config tiddlers

* fix typos as requested

---------

Co-authored-by: yaisog <m@rcuswinter.de>
2024-02-14 17:20:32 +01:00
lin onetwo
aaad420c3f
Docs: add contribution graph to readme (#7980) 2024-02-11 16:15:05 +01:00
eschlon
70f0a52842
Fix incorrect state reference in core/ui/AdvancedSearch/Standard (#7975)
This PR fixes #7973
2024-02-10 15:41:56 +01:00
eschlon
abab9164c5
Signing the CLA (#7974) 2024-02-10 14:45:06 +01:00
Jeremy Ruston
0cf80e824f Remove obsolete banner from Confetti plugin 2024-02-05 22:50:01 +00:00
Jeremy Ruston
b0bb911103 Fix "introduction" edition
Fixes #7965
2024-02-05 17:47:43 +00:00
lin onetwo
111f71bcf5
Add doc xls ppt file type information (#7927)
* fix: add doc xls ppt type

* Add application/vnd.ms-excel
2024-02-05 17:02:10 +00:00
lin onetwo
2b1efac6ee
Fix: on Windows, tiddlywiki.files title source shoud use / instead of \ (#7949)
* fix: on Windows, tiddlywiki.files title source shoud use / instead of \

* fix: split path.sep instead of /
2024-02-05 17:00:09 +00:00
Mateusz Wilczek
bc3132ab2c
Add explicit docs on temporary tiddlers (#7957) 2024-02-02 17:15:51 +00:00
Jeremy Ruston
94e0f05af5 Merge branch 'tiddlywiki-com' 2024-01-31 15:34:59 +00:00
Jeremy Ruston
eaa21589e6 Fix link to Nicolas Petton's Notebook theme 2024-01-31 14:34:17 +00:00
lin onetwo
207720cb30
Add WASM content type info (#7948)
Allows WASM modules to be loaded
2024-01-27 14:25:30 +00:00
Jeremy Ruston
9bf3c0602d HTTP Requests should return data even if there was an error
The body data is often used for API error messages in the event of failure
2024-01-26 13:37:46 +00:00
Jeremy Ruston
a9f9ffd409
Introduce Tour Plugin and Confetti Plugin, improve Dynannotate Plugin (#7734)
* First commit

* Typo

* Add support for delay parameter

* Add confetti widget

* Add tour plugin

* Add element spotlight to dynannotate plugin

Useful for highlighting on screen elements for the user

* More and bigger confetti by default

* Use new element spotlight to provide hints

* Adjust hint selectors for create tiddler tour step

* Include confetti plugin in prerelease

* Clarify wording of confetti demo

* Don't link TiddlyWiki in the tour panel

* Tweaks to tour buttons

* Mark dependents of the tour plugin

* Add full screen section of tour and tour edition

* Remove Anna Freud references from welcome tiddler

* Build the tour edition in the preview

* Fix typo in build script

* Populate tour edition with solar system data

From Simple English Wikipedia

* Missing tag

* Add page control button to start tour

Also make the tour controls visible in full screen mode

* Refactor to use global procedures to control the tour

* Change "startup-actions" field to "enter-actions" to avoid confusion

* Add a tour logo

* Refactor to allow multiple tours to be loaded at once

* Remove wikification from welcome tour step

* Update docs

* Simplify styles for top bar

* Tours should have a $:/tags/Tour tag

* Tour should autostart in the tour edition, but not in the main wiki

* Better labelling for the main preview

* Fix build process

We build a separate tour.html wiki, but can include the tour in other wikis too

* Remove obsolete text

* Add "using tags" as a separate tour

* Remove old debugging code

* Add tour chooser

* Ensure that the current tour isn't listed as an option in the final step

* Use whitespace trim

Note that the setting is inherited by procedure and widget definitions

* Simplify tour step format

* Remove obsolete state tiddler

Not needed because now we initialise it in startup actions

* Fix gap between navigation buttons

* Clean up tiddler titles within the introduction tour

* Finish allowing the name "TiddlyWiki" to be customised

Some of the code was in the previous commit. Next we'll wire up the user interface

* Clarify docs

* Add a settings pane giving a birds eye view of a tour

* Avoid having to embed confetti in the final step

* Update docs

* Tweak styling of tour chooser dropdown

* Add a button to launch tour steps directly, and give them captions

* Expose custom tour settings

* Use the tour step caption as the heading

* Fix initialisation when jumping to a tour step

* Introduce step about tags

* Improve wording

* Improve styling of task call-to-action and nav buttons

* Adopt new conditional shortcut syntax

* Wording and ordering tweaks

* Fix typos

Thanks @pmario

* Simplify styling of tour overlay

* Use custom palette colours

Makes it easier for people to use their own colour scheme for the tour

* More custom colours

* Tour wording tweaks

* Extends the tour plugin with a condition field (#7861)

* feat: support condition field to determine whether a step should be shown

* feat: add support for overriding the hint text using the field 'hint' from the step tiddler

* fix: roll back tour display procedure for now until an override mechanism has been discussed

* fix: renamed advance-criterion field and associated variables to step-success-filter

* fix: renamed hint field to hint-text and selector to hint-selector

* refactor: to create function to get all tour tiddlers filtered by their condition field

* refactor: rename globals tiddlers to variables and avoid making any of the tour procedures global

* fix: also rename globals.tid file to variables.tid

* docs: cover all tour steps tiddler fields

* fix: improve spacing in Tour HUD

* WIP

---------

Co-authored-by: Jeremy Ruston <174761+Jermolene@users.noreply.github.com>
Co-authored-by: Saq Imtiaz <saq.imtiaz@gmail.com>
2024-01-25 12:53:35 +00:00
Jeremy Ruston
c3de9df84f Merge branch 'tiddlywiki-com' 2024-01-24 14:19:56 +00:00
yaisog
2099e687cc
improve the documentation on transclusions (#7914) 2024-01-24 11:40:55 +00:00
oeyoews
575d80dfe9
Fix Editor preview width #7787 (#7922) 2024-01-24 11:40:05 +00:00
Saq Imtiaz
bc3d64f4b8
Refresh edit widget when the editor type has changed (#7943) 2024-01-24 11:37:15 +00:00
Saq Imtiaz
aa4aeb187c
Fixes functions to use variables set by filter runs (#7906)
* fix: functions should use variables set by filter runs

* refactor: code clean up

* chore: added more tests
2024-01-24 11:33:50 +00:00
btheado
fb85e91f82
Allows whitespace-only macro/procedure to be closed by \end (#7911)
* Added some passing macro definition parsing tests

* Added two failing tests to illustrate bug #3460

* Allow \end to end an whitespace only/empty macro definition. Fixes #3460

* Added some passing procedure definition tests

* Added two failing procedure tests to illustrate bug #3460

* Allow \end to end a whitespace only/empty procedure/function/widget definition. Fixes #3640

* Fixed wording of comment
2024-01-24 11:32:58 +00:00
Mario Pietsch
100eaeff30
Moves some exsiting macro tests to their own folders (#7940) 2024-01-22 17:43:23 +00:00
Bram Chen
518c5d3ef6
Update chinese language files (#7937)
* Add description for "class" system field
2024-01-19 08:41:23 +00:00
Rob Hoelz
38187d26f4
Add documentation for "class" system field (#6990)
Fixes #6915
2024-01-18 16:40:29 +00:00
Rob Hoelz
8ac4a448ef
Fix link refresh bug (#7935)
See https://talk.tiddlywiki.org/t/possible-bug-with-links-to-missing-tiddlers-in-5-3-3/8910 for report and reproduction instructions
2024-01-18 16:37:12 +00:00
Jeremy Ruston
83dfec471d
Fix TiddlyWiki Classic Build Process (#7933) 2024-01-18 08:56:18 +00:00
Jeremy Ruston
1015a1605d Update package.json for v5.3.4-prerelease 2024-01-17 11:51:51 +00:00
Jeremy Ruston
f08d3d6030 Update for 2024 2024-01-02 09:10:06 +00:00
Jeremy Ruston
232afb4249 Merge branch 'tiddlywiki-com' 2024-01-02 09:08:24 +00:00
Jeremy Ruston
22f7af05de Extend ScrollableWidget example to have buttons to scroll up/down by 10 pixels 2023-12-31 17:14:59 +00:00
Jeremy Ruston
17665233a2 Temporary new release banner for v5.3.4 2023-12-25 20:09:15 +00:00
Jeremy Ruston
a8f477a3ab Revert "Temporary new release banner for v5.3.4"
This reverts commit 9d10e2b3a7.
2023-12-25 20:08:37 +00:00
Jeremy Ruston
9d10e2b3a7 Temporary new release banner for v5.3.4 2023-12-23 15:48:28 +00:00
Jeremy Ruston
907aed3eab Version number update for 5.3.3 2023-12-23 10:26:43 +00:00
Jeremy Ruston
83220be7d9 Preparing for release of v5.3.3 2023-12-23 10:25:50 +00:00
Jeremy Ruston
a3cba681e0 Merge branch 'tiddlywiki-com' 2023-12-23 10:20:49 +00:00
Jeremy Ruston
4f01a53917 Include banner image in release note 2023-12-23 10:20:32 +00:00
Jeremy Ruston
5cb31b7adb New release banner for v5.3.3 2023-12-23 09:41:25 +00:00
Jeremy Ruston
6a9dc9dcd5 Update release note 2023-12-21 11:53:08 +00:00
Saq Imtiaz
46a22ef585
Fix: resolved issues with select widget after refactoring (#7905) 2023-12-21 11:50:33 +00:00
Jeremy Ruston
3d712127ad Update release note 2023-12-21 10:42:01 +00:00
Jeremy Ruston
a3e5ace458
Remove whitespace immediately after pragmas (#7895)
This is intended to revert some of the behaviour introduced in #7835, see the discussion here: https://github.com/Jermolene/TiddlyWiki5/pull/7888#issuecomment-1856184592
2023-12-21 10:36:45 +00:00
Jeremy Ruston
6fa81feeba
Restore comma before skinny tiddlers (#7897)
* Restore comma before skinny tiddlers

Fixes #7896

* Fix problem that showed up in CI tests
2023-12-21 10:36:29 +00:00
yaisog
95e270a8a6
Fix per-tiddler previews (#7900)
* Initial commit

* Put SVG back into a span

Needed in case this is targeted in CSS; DOM structure should not be changed.

* Fix the fix

Do it once, do it right.
2023-12-21 10:36:08 +00:00
Jeremy Ruston
e2d4388c48
Fix for list widget with an empty paragraph as inline template (#7903)
Fixes #7902
2023-12-21 10:35:40 +00:00
Mario Pietsch
f68fa89a29
Docs: fix #7899 recursive "release" tabs problem (#7901) 2023-12-20 13:14:31 +00:00
Jeremy Ruston
d2d00ffa4d Merge branch 'tiddlywiki-com' 2023-12-17 19:51:17 +00:00
Jeremy Ruston
c6a72875ba Docs: Warn about textual substitution with nested macros 2023-12-17 18:57:16 +00:00
Jeremy Ruston
aaf7dc355d Add docs for "remappable' attribute of genesis widget 2023-12-14 09:40:21 +00:00
Jeremy Ruston
e131dd3761 Revert "Update ViewWidget.tid to include common variants (#3895)"
This reverts commit cdfa4b6082.
2023-12-14 09:05:48 +00:00
Drevarr
f697f008b1
Signing the CLA (#7886) 2023-12-14 08:22:33 +00:00
TonyM
cdfa4b6082
Update ViewWidget.tid to include common variants (#3895)
* Update ViewWidget.tid to include common varients

The provision of common variates to the view widget provides new an experience user examples of the different variants of the ViewWidget. The copy to clipboad method allows each variant to be quickly accessed and pasted into their wiki.

To facilitate this a new macro wikitext-example-compact has being added to 
$:/editions/tw5.com/wikitext-macros

* Update ViewWidget.tid

Two colons added to maintain indenting in new content.
2023-12-13 18:16:57 +00:00
TonyM
8051a3dea2
Update WidgetMessage_ tm-delete-tiddler.tid (#3924)
Adding the line 

Use the [[ActionDeleteTiddlerWidget]] to delete a named tiddler without getting the "Do you wish to delete the tiddler" prompt.

However If someone knows how to make "WidgetMessage: tm-delete-tiddler" do this please explain.
2023-12-13 18:12:41 +00:00
Jeremy Ruston
267521ad1b Preparing for v5.3.3-prerelease 2023-12-13 08:16:59 +00:00
Jeremy Ruston
e82229210e Version number update for 5.3.2 2023-12-13 08:11:32 +00:00
Jeremy Ruston
c13c321a61 Preparing for release of v5.3.2 2023-12-13 08:10:38 +00:00
Jeremy Ruston
0d2aeb8253 Merge branch 'tiddlywiki-com' 2023-12-12 15:48:52 +00:00
Jeremy Ruston
9d94459c5d Syncer: fix object reference
We should be passing the syncer object, not the task object
2023-12-12 15:48:09 +00:00
Jeremy Ruston
5c283f843b Add banner details to the release note 2023-12-12 09:06:38 +00:00
Jeremy Ruston
51862f8128 Update New Release Banner for v5.3.2 2023-12-12 09:04:37 +00:00
Jeremy Ruston
15e53b8cd1 Revert: #7768 Ensure {{}} doesn't cause a recursion error
See https://github.com/Jermolene/TiddlyWiki5/pull/7768#issuecomment-1850578638
2023-12-11 17:56:11 +00:00
Jeremy Ruston
4a9b3009dd Further fix for d1c7f79dd2
The plus sign needs escaping on some regex engines
2023-12-11 15:21:03 +00:00
etardiff
c9be572baf
Signing the CLA (#7879) 2023-12-10 10:01:30 +00:00
Robin Munn
4e06c31022
Move list-join example onto single line (#7877)
It's a little less readable this way, but avoids the whitespace issue.
2023-12-07 08:34:07 +00:00
Mateusz Wilczek
5578fa5f94
Improve jsonset operator docs (#7873)
* Update docs of jsonset operator

* Move jsonset examples into a separate tiddler

* Update jsonset operator docs
2023-12-04 15:24:33 +00:00
Saq Imtiaz
2b0675cac5
Docs: fixes typos in conditonal shortcut syntax docs (#7872)
* Docs: Conditional Shortcut Syntax corrections

* Update Conditional Shortcut Syntax.tid

Add a link to Filter Expression tiddler
2023-12-04 08:53:24 +00:00
Jeremy Ruston
155db0f6f8 Improve release note 2023-12-04 08:13:23 +00:00
Jeremy Ruston
4e67aafeb7 Scrollable hotfix: Avoid setTimeout
See #7869
2023-12-02 08:58:35 +00:00
yaisog
e60ddf0b0a
Handle switching the bound tiddler (#7868) 2023-11-30 18:26:26 +00:00
Jeremy Ruston
f7359671aa Defer scrollable widget updating bound tiddler for 100ms
See discussion https://talk.tiddlywiki.org/t/5-3-2pre-scroll-binding/8570/3?u=jeremyruston
2023-11-29 18:06:54 +00:00
Jeremy Ruston
c61c34e9df Debounce scrollable widget scroll handler 2023-11-29 14:45:34 +00:00
Jeremy Ruston
6b47cbed32 Scrollable: write bound value if title of bound tiddler changes
Thanks @yaisog
2023-11-29 14:36:58 +00:00
Jeremy Ruston
c282208668 Fix jsonset crash when applied to primitive types
See https://talk.tiddlywiki.org/t/final-checks-before-release-of-v5-3-2/8560/7
2023-11-29 12:06:40 +00:00
Jeremy Ruston
622512c380 Further reduce syncer logging
The rationale is that the deeper logs are only useful for debugging the syncer logic, and are overwhelming for most users
2023-11-29 11:24:54 +00:00
Jeremy Ruston
f56f5dcc56 Fix savetiddlers handling of tiddlers with no text field 2023-11-29 11:23:57 +00:00
Mateusz Wilczek
fc1e9b6c43
Update forum link in update wizard (#7865)
* Update forum link in upgrade wizard

* Update links to forum in es-ES and de-AT editons
2023-11-29 10:06:47 +00:00
Jeremy Ruston
fe17f16675 Fix syncer not exiting when used on CLI
Fixes #7867
2023-11-29 09:31:19 +00:00
Mateusz Wilczek
b08281a20b
Improve jsonstringify and stringify operators docs: part 2 (#7748) 2023-11-29 09:01:46 +00:00
Jeremy Ruston
5dc468f1ea Fix release note typo
Apologies again @oflg
2023-11-28 17:43:57 +00:00
Mario Pietsch
c2e61fffe0
German translations (#7864) 2023-11-28 13:49:13 +00:00
Jeremy Ruston
53d493b876 Conditional shortcut docs: highlight use of "condition" variable 2023-11-28 11:51:56 +00:00
Jeremy Ruston
3b84088b27 Syncer: Reduce logging intensity 2023-11-28 11:44:21 +00:00
Jeremy Ruston
a21f45b93a Release note: fix typos 2023-11-28 10:53:38 +00:00
Bram Chen
8f661423f7
Update chinese translations (#7859)
* Update help for CommandsCommand
2023-11-27 22:01:25 +00:00
Maurycy Zarzycki
6bd69cc53f
Add changes to PL translation from 233b871fdf (#7862) 2023-11-27 21:53:42 +00:00
Saq Imtiaz
233b871fdf
Update help for CommandsCommand to avoid deduplication (#7858) 2023-11-26 17:42:53 +00:00
Robin Munn
64812f5c06
Add join attribute to list widget (#7694)
* Add join attribute to list widget

* Use new join attribute in HTML saving templates

This simplifies the logic involved in saving tiddlers in JSON format
into TW html files, and should also slightly speed up the saving process
depending on how often that list widget gets refreshed.

* Unit tests for list widget's new join attribute

* Add `<$list-join>` widget

Allows specifying complicated join text more easily than an attribute
2023-11-25 09:35:05 +00:00
Jeremy Ruston
22f9df5850 Update release note 2023-11-24 15:11:21 +00:00
Jeremy Ruston
1cb607249e
Fix syncer race condition (#7843)
* Initial commit

* Log task choosing

* A tiny bit more logging

* Typo

* Restructure syncer to use a single state machine
2023-11-24 13:02:09 +00:00
Jeremy Ruston
ca41a8db04
Core macros don't allow pragmas in action strings (#7855)
* First commit

* Transclude preferred over macrocall
2023-11-24 10:48:48 +00:00
Jeremy Ruston
d1c7f79dd2 Correct fix for Windows line endings in wiki based tests 2023-11-24 10:42:53 +00:00
Jeremy Ruston
862cb01be7 Revert "Fix wiki based tests with Windows-style line endings"
This reverts commit f22e047fa2.
2023-11-24 10:41:23 +00:00
Jeremy Ruston
f22e047fa2 Fix wiki based tests with Windows-style line endings 2023-11-24 10:31:11 +00:00
Jeremy Ruston
0716ed4c30 Revert "Simplify Permalink/Permaview URLs (#7729)"
This reverts commit 145a8d6992.
2023-11-24 10:13:57 +00:00
Jeremy Ruston
62bb8affa4
Add data attribute support to button and other widgets (#7769)
* Add data attribute support to button widget

* Fix typo

* Refactor ready for making mechanism more generic

* Apply more generic implementation to multiplate widgets

* Refactor to use existing widget.assignAttributes() method

* Fix typo

* Clarify docs

* Update docs

* Update select widget to support style.* attributes

* Remove obsolete comment

* Fixes refresh issues for checkbox and links widgets for data attributes (#7846)

* fix: refresh issues with checkbox and links widgets

* fix: indenting

* Feat: add support for data attributes to Draggable and Droppable widgets (#7845)

* Docs clarification

* docs: add style and data attributes to Draggable and Droppable widget docs (#7850)

* Refactors Select widget to directly create DOM node (#7848)

* fix: refactored SelectWidget to directly create DOM nodes

* fix: refactored SelectWidget to directly create DOM nodes

* fix: improve refresh handling for select widget

* Fixes issues in the PR "Button widget data attributes" (#7852)

* fix: fixed ordered attributes handling and improved tests to catch event attributes

* fix: clean up code from testing

* fix: more tests and refactoring

* fix: use lowercase when checking for event attribute prefix

* fix: use lowercase when checking for event attribute prefix

* fix: changed comment wording

* fix: minor refactoring

* refactor: for brevity

---------

Co-authored-by: Saq Imtiaz <saq.imtiaz@gmail.com>
2023-11-22 20:05:40 +00:00
yaisog
4c2979286b
Change separators to match doc (#7303) 2023-11-21 11:58:12 +00:00
Marxsal
ad9cb8a0a8
Modify SetWidget to include use to set global variables. (#7608)
* Modify SetWidget to include use to set global variables.

* Make sample variables easier to read.

* Change text to indicate use of pragma whitespace trim.

* Make compliant with 5.3.1 (?) release
2023-11-21 11:55:54 +00:00
Jeremy Ruston
de6b866f22 Fix detection of DOM properties
Alternate fix for #7714
2023-11-21 11:54:37 +00:00
Jeremy Ruston
06b1cc4bca Scrollable widget: Fix crash in CI 2023-11-21 11:49:34 +00:00
Eric Haberstroh
0cd3c9a8ac
Add usemap attribute to image widget (#7634)
* Add usemap attribute to image macro

Allow for a usemap attribute on the $image macro call which is passed through to the resulting img tag. This makes the use of HTML image maps [1] possible.

[1]: <https://www.w3schools.com/html/html_images_imagemap.asp>

* Document new usemap attribute in ImageWidget

* Update version docs

---------

Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>
2023-11-21 11:44:39 +00:00
Mario Pietsch
37c625384a
add archive HTML wikis, add index.html + css (#7776)
* add archive HTML wikis, add index.html + css

* only build archive for release version

* tested and add more docs

* fix indent

* fix spacing

* add $TW5_BUILD_OUTPUT_ARCHIVE env variable for testing

* use $TW5_BUILD_OUTPUT_ARCHIVE to check if archive should be built

* use TW5_BUILD_ARCHIVE as requested
2023-11-21 11:42:17 +00:00
Mario Pietsch
a4850ba3d9
make all list-* macros readable for easier future improvements (#7551)
* make all list-* widgets readable for easier future improvements

* remove whitespace on closing braces
2023-11-21 11:30:05 +00:00
Scott Sauyet
145a8d6992
Simplify Permalink/Permaview URLs (#7729)
* Simplify Permalink/Permaview URLs

* Fix lint warnings by removing arrow functions

* Remove commented sample code

* Remove post-ES5 code

* Add many more allowable non-percent-encodedcharacters

* Fix more ES6+ stuff, add end-of-sentence padding character.

* Fix to match standards

* Move the new code from boot to util

* Change from custom map/filter to $tw.utils.each

* Make `each` blocks multi-line

* Move the permalink handling to its own file

* Remove auto-navigation

* Revert "Remove auto-navigation"

This reverts commit ca1e5cf387.
2023-11-21 11:24:17 +00:00
Jeremy Ruston
9012d36859
Allow scrollable widget to bind scroll position to a tiddler (#7649)
* Initial Commit

* Update version number
2023-11-21 11:23:10 +00:00
Robin Munn
ab72cc7b09
Allow negative indexes in json operators (#7849)
* Add unit tests for negative indexes in json ops

* Allow negative indexes in JSON operators

Negative indexes will be treated as counting from the end, so -1 means
last item of the array, -2 means next-to-last item, and so on.

* Add documentation for negative indexes
2023-11-21 11:05:13 +00:00
Saq Imtiaz
bf8b3cff03
Fixes Text Parser being impacted by overrides to codeblock widget (#7844)
* fix: overriding codeblock widget should not impact text parser

* fix: whitespace changes
2023-11-20 08:38:04 +00:00
Mario Pietsch
e4bf7c5f44
fix the add field button tooltip (#7842) 2023-11-18 16:13:27 +00:00
Robin Munn
215bd4e015
Avoid skipping extra whitespace in wikiparser.js (#7835)
When wikiparser parses text looking for a pragma block, it skips
whitespace before looking for the next pragma. If no pragma is found,
we should return the parse position to the original location so that the
skipped whitespace can be parsed as a text node. This allows the
attribute `join=" and "` to parse as " and " rather than "and ".
2023-11-14 22:10:58 +00:00
Robin Munn
758089cbb3
Alternate fix for inconsistent list template syntax (#7827)
* Alternate fix for inconsistent list template syntax

First attempt, which fails on the ListWidget/WithMissingTemplate test.

* Make WithMissingTemplate test pass, inefficiently

Unfortunately, this ends up being very inefficient, because the
clone-and-mutate logic is repeated for every list item. Not ideal.

* More efficient way to do it

This also makes the failing test pass, but far more efficiently.

* Improve performance of list template discovery

Since parse tree nodes never change after widget creation (whereas
attribute values *can* change), we can safely search for the explicit
list templtaes only once, at widget creation time. This saves time as
the search doesn't have to be done on each re-render, and also allows us
to safely do a clone-and-mutate step to extract the list widget's body
(if any) without any `$list-empty` or other items. That, in turn, allows
using the list widget's body as the template even if `$list-empty` is
specified inside the widget body.
2023-11-06 21:18:31 +00:00
Robin Munn
6567843927
Make unit tests run faster in Github Actions (#7829) 2023-11-02 08:44:29 +00:00
Mario Pietsch
1001590326
Macros -- Make "New in 5.3.0" Info More Prominent (#7750)
* Macros -- Make "New in 5.3.0" Info More Prominent

* Add links to new text substitution possibilities
2023-10-30 14:51:06 +00:00
Maurycy Zarzycki
4b56cb4298
Add support for running in-browser tests via playwright in GitHub CLI (#7820)
* Add support for running in-browser tests via playwright in GitHub CLI

* `ci.yml` was updated to store the report so that it can be inspected on failure
* `ci-test.sh` was added as an expansion to `test.sh` which installs and runs playwright
* `playwright.spec.js` does the actual verification of opening the test TW edition in browser, waiting for the tests to finish and then verifying it has indeed passed
* `playwright.config.js` Playwrifht configuration

* Add support for running in-browser tests via playwright in GitHub CLI

* `ci.yml` was updated to store the report so that it can be inspected on failure
* `ci-test.sh` was added as an expansion to `test.sh` which installs and runs playwright
* `playwright.spec.js` does the actual verification of opening the test TW edition in browser, waiting for the tests to finish and then verifying it has indeed passed
* `playwright.config.js` Playwrifht configuration

* Fix file permissions for `ci-test.sh`

* Increased node version for github actions to support playwright

* Add installation of the required @playwright/test library during CI test execution
2023-10-29 09:05:24 +00:00
FrittRo
e593f80278
Signing CLA (#7818) 2023-10-26 22:53:09 +01:00
Simon Huber
902c7f55ba
Fix overflow issue of codemirror editor within grid container (#7794)
* fix overflow issue of codemirror editor within grid container

* tiddler preview needs overflow: auto, too
2023-10-26 11:43:24 +01:00
Robin Munn
801e8e312c
Fix window.btoa call in browser (#7814) 2023-10-26 09:05:59 +01:00
Scott Sauyet
23a576b8bd
Tweak TOC to not show expander for sublist with all children excluded (#7802) 2023-10-25 13:37:24 +01:00
Simon Huber
6a52081d6b
Don't set focus on field-name input field when deleting field using delete-field button (#7806) 2023-10-25 13:29:40 +01:00
Robin Munn
246751be1b
Fix last filter operator when zero items selected (#7809)
Previously, [last[0]] was incorrectly returning the entire list. It now
returns zero items as it should.
2023-10-25 13:14:49 +01:00
Jeremy Ruston
4ebaba8e89 Tweak wording 2023-10-23 10:13:32 +01:00
Jeremy Ruston
8617fa39dc Tweak appearance of Chinese community link 2023-10-20 10:20:14 +01:00
Jeremy Ruston
f89b52e521 Docs: Link to format operator from titlelist tiddler 2023-10-19 15:54:16 +01:00
Mario Pietsch
efaa8dd1e8
tm-open-window set focus to existing window (#7708)
* tm-open-window set focus to existing window

* tm-open-window: update docs
2023-10-18 16:10:04 +01:00
Robin Munn
326ae61929
Fix encodebase64 and decodebase64 filters (#7683)
* Fix encodebase64 and decodebase64 filters

The documentation for encodebase64 says that the input is treated as
binary data, but in fact the input is being treated as text data, with
an extra UTF-8 encoding step being performed first.

Likewise, the decodebase64 documentation says that it outputs binary
data, but in fact it will do a UTF-8 decoding step before producing
output, which will in fact garble binary data.

This commit changes the behavior of encodebase64 and decodebase64 to
match what the documentation says they do. It also adds an optional
`text` suffix to both filters to keep the current behavior.

Finally, an optional `urlsafe` suffix is added to both filters to allow
them to use the "URL-safe" variant of base64 (using `-` instead of `+`
and `_` instead of `/`).

* Try to fix failing test

Turns out a little more than this is going to be needed.

* Fix binary base64 encoding, including unit tests

* Update base64 filter documentation

* Can't use replaceAll, too new

Have to use String.replace with a global regex instead

* Replace uses of window.btoa() in rest of code

Since window.btoa() is not available under Node.js, we'll replace all
uses of it with the $tw.utils.base64encode() function that now works
correctly for binary data.

* Add link to UTF-8 glossary definition at MDN
2023-10-18 16:08:56 +01:00
Simon Huber
c185e373c5
Use display: grid for editor toolbar, editor and preview (#7787)
* make toolbar, editor and preview display: grid

* correct display of bitmap editor

* grid-area: toolbar not only when preview is shown

* use dedicated classes and tc-grid and no brittle CSS selectors

* no need for width: 100%

* cleanup style definitions

* use semantic classnames
2023-10-17 11:54:20 +01:00
Jeremy Ruston
2ffbfd84a5 Merge branch 'tiddlywiki-com' 2023-10-17 11:38:23 +01:00
Jeremy Ruston
faef02df7a
Docs: Add information about the Chinese TiddlyWiki community (#7792) 2023-10-17 11:37:57 +01:00
Ke Wang
c93d56667e
Extend ImageWidget to generate the src based on the encoding format of the image entries (#7783)
* Make ImageWidget rendering image tiddler based on encoding of type

* change indent

* use deserializerType instead of type
2023-10-17 09:47:46 +01:00
Ke Wang
3855a9f013
Signing the CLA (#7791) 2023-10-17 09:46:54 +01:00
Jeremy Ruston
4d548580e6 Merge branch 'tiddlywiki-com' 2023-10-16 18:32:37 +01:00
lin onetwo
9773dff1e3
Chore: Add npm script for new core developers (#7539)
* Update package.json

* lint fix

* chore: use node ./tiddlywiki.js  instead of ./bin/serve.sh

* Update package.json

* Update package.json
2023-10-16 18:29:51 +01:00
Guang Li
c6604c0c56
Add floating popup to Dynannotate (#7790) 2023-10-16 18:21:26 +01:00
Jeremy Ruston
e521ee2133 Update release note 2023-10-16 12:27:56 +01:00
Guang Li
a7bd134c35
Docs: Add FSRS4TW plugin (#7770) 2023-10-16 12:23:22 +01:00
lin onetwo
d3f5695601
Fix: Evernote .enex image import (#7785)
* feat: add modifier info

* feat: replace image and attachment with [img[] and [[]]

* feat: import as wikitext tid

* fix: a few resources don't have title

* fix: use hash as random name for images

* fix: Firefox's DOMParser have problem in some cases

* fix: bad char in title, and useless xmlns

* Update sample-enex-with-image.xml.enex

* Update enex-deserializer.js

* Update readme.tid

* fix: some dont have modified
2023-10-15 12:40:38 +01:00
Simon Huber
efa4f34131
Update Basics.tid to not use fixed height in edit widgets (#7789) 2023-10-15 12:32:17 +01:00
Jeremy Ruston
fffbedd6b9 Updated release note 2023-10-14 10:25:16 +01:00
Jeremy Ruston
ff1437e439
Fix refreshing of transcluded functions (#7698)
* Passing test

* Failing test

* Fix test

It still fails, but now fails correctly

* Fix refreshing transcluded functions (#7755)

We store the previous result of the filter function and recalculate it
when the transclude widget needs to be refreshed, refreshing the widget
if the result is different.

---------

Co-authored-by: Jeremy Ruston <174761+Jermolene@users.noreply.github.com>
Co-authored-by: Robin Munn <rmunn@pobox.com>
2023-10-14 09:44:18 +01:00
Jeremy Ruston
32966c9e91
Introduce jsonset operator (#7742) 2023-10-14 09:43:23 +01:00
Jeremy Ruston
96b0543351
Add barcode reader widget to qrcode plugin (#7746)
* Add barcode reader widget to qrcode plugin

* Don't use a fixed ID
2023-10-14 09:42:34 +01:00
Jeremy Ruston
b7562f0c7b
Conditional Shortcut Syntax (#7710)
* Initial Commit

* Update docs

* Add support for elseif blocks

* Another test

* WIP

* Change from `{%if%}` to `<%if%>`

See discussion here - https://talk.tiddlywiki.org/t/proposed-if-widget/7882/64

* Don't use the widget body as the template if a list-empty widget is present

See discussion here - https://github.com/Jermolene/TiddlyWiki5/pull/7710#issuecomment-1717193296

* List widget should search recursively for list-template and list-empty

* Allow block mode content within an if/then/else clause

* Update docs

* Add from-version tag to docs
2023-10-14 09:41:21 +01:00
Jeremy Ruston
4c9c85aec5
Add support for list-template and list-empty widgets for specifying list widget templates (#7784)
Cherry picked from #7710
2023-10-14 09:31:11 +01:00
Maurycy Zarzycki
7726982d71
Polish Translations 2023-10-11 (#7779)
* Add translations introduced in 5bb8155422

* Add translations introduced in d17525ec8e
2023-10-11 21:07:49 +01:00
Jeremy Ruston
774058912d Update release note 2023-10-09 17:12:22 +01:00
Jeremy Ruston
106e1c68df Merge branch 'tiddlywiki-com' 2023-10-08 16:23:29 +01:00
Jeremy Ruston
12f42ad62f Add a summary for each release, and include in archive listing 2023-10-08 10:29:42 +01:00
Jeremy Ruston
66a8e2dbf2
Ensure {{}} doesn't generate a transclude widget with no attributes (#7768) 2023-10-07 21:55:39 +01:00
Jeremy Ruston
327ecf8f66
Don't refresh the body editor when switching the preview on and off (#7747)
* Don't refresh the body editor when switching the preview on and off

* Focus editor when switching the preview on or off
2023-10-06 21:49:02 +01:00
Mateusz Wilczek
35e45f3b90
Clean up after #7671 (Change favicon format from ICO to PNG) (#7774)
* Delete editions/tw5.com/tiddlers/_tw_shared/favicons/favicons.svg

* Delete editions/tw5.com/tiddlers/_tw_shared/favicons/favicons.svg.md
2023-10-06 21:39:43 +01:00
Jeremy Ruston
93bc9e4309 Merge branch 'tiddlywiki-com' 2023-10-05 22:29:45 +01:00
Jeremy Ruston
23b75bbc5d Add links to archived versions of TiddlyWiki
@pmario v5.3.0 and v5.3.1 are missing from the archive, would you be able to kindly prepare a PR?
2023-10-05 22:25:07 +01:00
Mateusz Wilczek
68da654eb3
Change favicon format from ICO to PNG, fix #7665 (#7671)
* Change favicon format from ICO to PNG

* Revert renaming `./favicon.ico`

Keep the backwards compatible file name `./favicon.ico` (though they will actually be in PNG format now).

* Add SVG template for creating favicons

Add `favicons.svg`, the template for creating the current PNG favicons, along with some helpful information about it in `favicons.svg.md`.

* Add source Inkscape SVG

Add source Inkscape SVG as an example of image tiddler in tw-com
2023-10-04 22:15:23 +01:00
Bram Chen
1eceb5f47f
Update chinese language files (#7765)
* Improve consistency of naming file types and content types in some UI hints.
2023-10-04 18:25:10 +01:00
Timur
def508a220
Fix offline upgrade download link (#6088)
* Fix offline upgrade download link

In Firefox (92.0.1) `href="#"` does not allow to start downloading of `upgrade.html` (Chrome has no such problem). Making href completely empty fixes the issue.

* Update plugins/tiddlywiki/upgrade/UpgradeWizard.tid
2023-10-04 18:24:45 +01:00
Timur
3fb71e2553
Signing the CLA (#7766) 2023-10-04 18:24:14 +01:00
Mateusz Wilczek
d17525ec8e
Improve file type names (TID, SVG, ICO) in hints (#7764)
* Make filetype names in hints consistent

* Make ICO content type hint more consistent
2023-10-03 21:37:49 +01:00
Joe Bordes
5bb8155422
i18n(ES) update to latest version changes (#7761) 2023-10-01 09:00:06 +01:00
Robin Munn
bb2973fc29
Make flexbox or grid layouts possible (#7690)
Both flexbox and grid layouts need the container div to be the direct
parent of the children it lays out. To enable that, we need a class that
can select the direct parent of the list widget in PageTemplate.tid so
that that class can have `display: flex` or `display: grid` applied to
it. The `tc-page-container` div is not suitable, because it contains
a `<$dropzone>` inside it, and the dropzone widget creates a div so
tc-page-container is no longer the direct parent of the list. Instead,
a tc-page-container-inner class is added to the dropzone widget in
addition to its existing tc-dropzone class, so that grid or flexbox
layouts can target tc-page-container-inner for setting the appropriate
CSS `display` property.
2023-09-30 16:33:40 +01:00
Jeremy Ruston
bbaa0890b5 Fix broken render commands
Fixes #7759
2023-09-30 13:30:31 +01:00
Mario Pietsch
b4a862c618
Fix #7757 vanilla styles should be first (#7758) 2023-09-28 14:59:50 +01:00
Jeremy Ruston
1be8f0a933 Comments plugin should use palette colours 2023-09-26 17:55:01 +01:00
lin onetwo
773c1f83f2
API for deleting core hooks (#7751)
* feat: Delete hooks from the hashmap

* fix: not using findIndex in the core

* Update HookMechanism.tid
2023-09-24 21:54:52 +01:00
Robin Munn
9ee1ef7e23
Fix a dangling link in filter run prefix docs (#7715)
One example was moved to another tiddler but its link wasn't updated to
follow it. This fixes the link to point to the example again.
2023-09-24 20:20:13 +01:00
Robin Munn
8effb3f218
Fix list widget bug with counter-last when appending items (#7712)
* Add failing test for list widget with counter-last

The failing test appends a value to a list without changing the rest of
the list, and the counter-last value doesn't get updated correctly when
that happens. Also added another test, which passes, testing removing
the last item of the list, just in case of a regression.

* Improve unit tests for counter-last list widget bug

The unit tests were looking very similar to each other, so I factored
out the common code and made them into simple data-driven tests.

* Fix bug where counter-last fails in list widget

The only scenario that was failing was when counter-last was used, but
the list was strictly appended to with no other changes made. The one
unit test that was failing now passes with this fix.

* Improve bugfix to list widget counter-last

Now we only refresh the last item if it was truly necessary.
2023-09-24 20:19:50 +01:00
Robin Munn
780e5d33a4
Slightly speed up [all[shadows+tiddlers]] filters (#7702)
The `all` filter operator has shortcuts to optimise common patterns like
`[all[shadows+tiddlers]]` or `[all[tiddlers]]`. In those cases, the
filter operator function returns early and never uses the `result`
linked list that was created, so it's immediately garbage-collected.
Let's delay creating it until we know it's actually going to be used.
2023-09-24 20:19:04 +01:00
Maurycy Zarzycki
526e997aa4
Add translation changes to Polish from e16635a5ad (#7752) 2023-09-22 19:11:15 +01:00
Jeremy Ruston
e4d8849f22 Merge branch 'tiddlywiki-com' 2023-09-21 18:17:28 +01:00
Jeremy Ruston
bd99cf3385 Docs: Clarify that whitespace trim is inherited by procedure and widget definitions 2023-09-21 18:11:54 +01:00
Simon Huber
711d1658e2
Edittemplate delete button should also delete the typeInputTiddler (#7749)
If we don't delete the typeInputTiddler with the click on the "delete" button then the dropdown stays filtered - but the text input seems to be empty. This PR corrects this behavior
2023-09-21 17:57:53 +01:00
Jeremy Ruston
b82f012c0c Revert "Make preview editor button focus the editor"
This reverts commit f383863654.
2023-09-19 16:08:13 +01:00
Jeremy Ruston
f383863654 Make preview editor button focus the editor 2023-09-19 16:07:52 +01:00
Mateusz Wilczek
697dc8db4c
Improve jsonstringify and stringify operators docs (#7650) 2023-09-19 15:52:04 +01:00
Jeremy Ruston
49c96901f3 Fix typo in 7d8766d2b9 2023-09-13 18:06:30 +01:00
Jeremy Ruston
7d8766d2b9 Test editors shouldn't set type attribute of textareas
fixes #7732
2023-09-13 18:04:12 +01:00
Simon Baird
6255856205
Add offline-external-js to empty edition (#7737)
Currently I'm building these files myself for use on tiddlyhost.com.
I'm thinking it would be nicer if they were built and distributed by
TiddlyWiki's own build automation, so this is a step towards that.

The two new files that are created, "empty-external-core.js" and
"tiddlywikicore-<version>.js" will appear alongside the existing
"empty.html" and "empty.hta" when the TiddlyWiki site is deployed.
2023-09-13 15:55:23 +01:00
Simon Baird
6f307ae01e
Fix edition file formatting inconsistencies (#7738)
I noticed these inconsistencies in the tiddlywiki.info json files
while working on the previous commit and thought I'd fix them for
the sake of neatness and tidiness.

This contains whitespace changes only, so git diff -b should be
empty.

Includes:
- Remove some trailing whitespace in several files
- Fix incorrect indenting in one file
- Add end of file newlines in two files
2023-09-13 15:12:49 +01:00
Simon Huber
213a850715
Remove ";" from value of $:/themes/tiddlywiki/vanilla/settings/fontfamily (#7735)
the tiddler gets transcluded in the stylesheets like so:

```
font-family: {{$:/themes/tiddlywiki/vanilla/settings/fontfamily}};
```

note - the semicolon at the end
So this semicolon is superfluous
2023-09-12 09:11:18 +01:00
Jeremy Ruston
217af20fcd Merge branch 'tiddlywiki-com' 2023-09-11 18:56:49 +01:00
TonyM
6d0b4108a4
Update _Timimi_ Extension and executable by Riz.tid (#7726)
* Update _Timimi_ Extension and executable by Riz.tid

Include the line

* The native host requires a component installed on the host computer, outside the browser.

So it is clearer there are two components to be installed and access to the local machine is implied.

* Update _Timimi_ Extension and executable by Riz.tid

Added blank line
2023-09-07 09:36:39 +01:00
Bram Chen
642f8da6ed
Update chinese language files (#7725)
* Tweak chinese wording of server command help
2023-09-06 15:21:40 +01:00
Jeremy Ruston
e16635a5ad Tweak wording of server command help
Fixes #7724
2023-09-06 12:33:09 +01:00
TonyM
db79bf2380
Update WidgetMessage_ tm-permalink.tid (#7721)
Addition of note that the permalink message;

"The resulting link will be copied to the clipboard."
2023-09-06 12:27:06 +01:00
TonyM
2b16fa7b5c
Update GenesisWidget.tid (#7723)
Add "or HTML element" to the description of "attributes not starting with $".
2023-09-06 12:26:27 +01:00
Mohammad Rahmani
64c9d17181
Update TranscludeWidget.tid correct procedure name (#7717)
The copy pasted `mymacro` from old docs is changed to `myproc`
2023-09-04 16:59:08 +01:00
Buckaroo Banzai
ceee20fd59
Remove tiddler with invalid link and advertising (#7709)
Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
2023-09-01 17:21:21 +01:00
Buckaroo Banzai
0889f13fef
Signing the CLA (#7711) 2023-09-01 17:20:53 +01:00
Jeremy Ruston
fa9bfa07a0 Fix missing closing tag in tag-pill-inner macro
Fixes #7697
2023-08-25 14:06:17 +01:00
Jeremy Ruston
dbe233fc87 Merge branch 'tiddlywiki-com' 2023-08-20 18:12:38 +01:00
Jeremy Ruston
3965e2c027 Tweak release note 2023-08-20 12:53:59 +01:00
Jeremy Ruston
c22cd3f4c6 Temporary banner image for v5.3.2 2023-08-20 12:51:21 +01:00
Jeremy Ruston
dc282db31b Missing banner credits for v5.3.1 2023-08-20 12:50:08 +01:00
Jeremy Ruston
70309c67d1 Prepare for v5.3.2-prerelease 2023-08-20 11:45:38 +01:00
Jeremy Ruston
ba5bfd1ad0 Version number update for 5.3.1 2023-08-20 11:34:07 +01:00
Jeremy Ruston
3c66af9fdc Update release note for v5.3.1 2023-08-20 11:32:29 +01:00
Jeremy Ruston
6877082090 Preparing for release of v5.3.1 2023-08-20 11:31:23 +01:00
Jeremy Ruston
9201d2bedc Merge remote-tracking branch 'origin/tiddlywiki-com' 2023-08-20 11:18:43 +01:00
Robin Munn
229e681550
Add release note for bugfix PR #7679 (#7681) 2023-08-20 11:07:59 +01:00
Robin Munn
779ac28bd0
Fix checkbox widget when listIndex field undefined (#7679) 2023-08-15 17:12:49 +01:00
yaisog
78ecc20c5e
Add notes about subfilter expressions (#7667) 2023-08-08 09:52:39 +01:00
Marxsal
8b6bc6664b
Link to archive of Jeffrey Kishner site (#7668) 2023-08-08 09:50:28 +01:00
cmo-pomerium
674bd1822c
Signing the CLA (#7664) 2023-08-08 09:46:53 +01:00
Jeremy Ruston
6c67dc8235
Dog demo: Update CSS 2023-08-01 16:13:22 +02:00
Jeremy Ruston
72a4adbd6b
Update Procedure Definitions.tid 2023-08-01 07:58:39 +01:00
btheado
aaf0bffb39
Transclude the widget attribute subtiddlers (#7654)
* Use 'translink' macro on widget attribute 'subtiddlers' to make it browsable by scrolling

* Avoid the styling of the translink macro by directly transcluding

---------

Co-authored-by: btheado <btheado@mailinator.com>
2023-08-01 07:56:45 +01:00
Saq Imtiaz
9bbd8a70c2
Updates example for ActionPopupWidget (#7653) 2023-07-31 21:26:23 +01:00
Jeremy Ruston
cc57cf2fe9
Update SystemTag_ $__tags_Macro.tid
Fixing missing colon
2023-07-31 21:02:49 +01:00
Jeremy Ruston
34bc9c72c6 Merge branch 'tiddlywiki-com' 2023-07-31 16:30:54 +01:00
Mario Pietsch
aeb502657b
Some new gitlab related docs changes (#7651)
* Some new GitLab related Definitions an minor changes to Git related docs

* remove DevOps tiddler and move tiddlers to their paths
2023-07-31 16:30:41 +01:00
Jeremy Ruston
48705db21f Fix random dog link 2023-07-31 16:04:24 +01:00
Jeremy Ruston
587aa28853 Update release note 2023-07-31 14:37:40 +01:00
Jeremy Ruston
b926a33b55 Warn about random dog image/video sizes 2023-07-31 14:36:29 +01:00
Jeremy Ruston
44ccfe83c9 Missed contributor for release note 2023-07-31 14:19:52 +01:00
Jeremy Ruston
cef0ac680d Update release note 2023-07-31 12:25:12 +01:00
lin onetwo
b8a235697f
Improve boot kernel error reporting to include original error message (#7645) 2023-07-31 12:19:10 +01:00
Jeremy Ruston
ed82536a55 Merge branch 'tiddlywiki-com' 2023-07-31 12:16:12 +01:00
btheado
d99b1897c3
Refactor variable invocation docs (#7642)
* Factored out variable invocation tiddlers into separate tiddlers

* Document the variable attribute value behavior more completely

---------

Co-authored-by: btheado <btheado@mailinator.com>
2023-07-31 12:13:37 +01:00
Mateusz Wilczek
3684cfd178
Improve docs on styles and classes in WikiText (#7641) 2023-07-31 12:12:14 +01:00
Mateusz Wilczek
643819f5f5
Add docs on achieving unique tag macro dropdowns inside list widget (#7639) 2023-07-31 12:09:46 +01:00
lilscribby
52f7f6382b
Fixed typos in documentation for new pragma (#7637) 2023-07-31 12:06:04 +01:00
lilscribby
575930b31d
Signing CLA (#7636)
Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>
2023-07-31 12:02:52 +01:00
Marxsal
73f256a411
Change hashmap references to indicate additional variables (#7635) 2023-07-31 12:01:44 +01:00
Eric Haberstroh
1b5b8905d8
Sign the CLA (#7633)
Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>
2023-07-31 11:57:31 +01:00
TonyM
825f4eaae1
Update Widgets in WikiText.tid (#7623)
* Update Widgets in WikiText.tid

Added Minimalist link to [[Substituted Attribute Values]] so the new method is also listed.

* Update Widgets in WikiText.tid

removed see also
2023-07-31 11:53:14 +01:00
Jeremy Ruston
d0da1ef9d9
Fix error "Global assignment is not allowed within modules on node" (#7648) 2023-07-31 11:50:58 +01:00
Jeremy Ruston
3e213569e2 Update release note 2023-07-30 22:50:01 +01:00
Jeremy Ruston
4bdac09872
Fix transclude inefficiency (#7647)
* Refactor parse mode out of getTransclusionTarget

* Refactor missing transclusion target

* Add a test to avoid regressions on the handling of macros vs procedures

* Refactor condition logic

* Preparing to split getTransclusionTarget into two separate functions

* Split getTransclusionTarget into getTransclusionTargetIncludingParseTreeNodes

* Resolve another inefficiency

The transclusion target was sometimes being parsed twice when transcluding as text/plain

Associated test results are also made more consistent

* Simplify method naming

* Neatening up
2023-07-30 18:04:05 +01:00
TiddlyTweeter
4c9eaeaaf2
Signing CLA (#7638)
Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>
2023-07-30 13:37:27 +01:00
Jeremy Ruston
c1ff85c205 Merge remote-tracking branch 'origin/tiddlywiki-com' 2023-07-27 18:30:23 +01:00
catter-fly
afcbac5e86
Signing CLA (#7643)
* Signing CLA

* Fix double entry

---------

Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>
2023-07-27 18:23:08 +01:00
Jeremy Ruston
1a92fd5dc0 Update release note 2023-07-22 15:51:39 +01:00
Mario Pietsch
e60232e0cb
Fix drag and drop from chrome-like browsers to FireFox (#7622)
* fix drag and drop from chrome-like browsers to FireFox

* test feature matchMedia function

* implement new borwser sniffing functions as utilities

* use $tw.browser structure for isMobileChrome detection
2023-07-22 15:47:39 +01:00
Jeremy Ruston
ad6e09f1cb Minor refactor transclude widget
Preparing to fix #7592
2023-07-22 14:01:24 +01:00
Jeremy Ruston
3ddb852a16 Update release note 2023-07-22 12:46:08 +01:00
Mario Pietsch
b000f20283
Fix toc indentation problem (#7627)
* fix toc indentation problem

* add caption to Third & Fourth toc tiddlers to see caption-handling

* reset modified fields
2023-07-22 12:41:19 +01:00
Jeremy Ruston
160cc0e9a9 Revert "Add widget.destroy() function (#7468)"
See discussion at https://github.com/Jermolene/TiddlyWiki5/pull/7468#issuecomment-1645753857
2023-07-22 11:41:36 +01:00
Jeremy Ruston
fd8b8f62da
Fix tiddler icon size (#7619)
* Fix tiddler icon size

* Adjust icon size

---------

Co-authored-by: Jeremy Ruston <174761+Jermolene@users.noreply.github.com>
2023-07-21 14:44:49 +01:00
Saq Imtiaz
61a08cbd7b
Feat: allow new pragmas to be indented (#7624) 2023-07-21 13:40:42 +01:00
Jeremy Ruston
0fd6b986a0 Update release note 2023-07-20 22:03:07 +01:00
Jeremy Ruston
0a4cfa1164 Revert f61d244410
No evidence that this change improved anything
2023-07-20 22:03:00 +01:00
Jeremy Ruston
04e971c3c6 Merge remote-tracking branch 'origin/tiddlywiki-com' 2023-07-20 21:48:00 +01:00
Jeremy Ruston
963887c8c4 Update Saving via a Minimal Web Server.tid (#7617)
Co-Authored-By: hffqyd <10190817+hffqyd@users.noreply.github.com>
2023-07-20 17:07:45 +01:00
hffqyd
aef76fa25f
Update Saving via a Minimal Web Server.tid (#7617)
update information
2023-07-20 17:00:33 +01:00
Jeremy Ruston
4124bbdfb3 New release banner for v5.3.1 2023-07-20 16:58:04 +01:00
Cameron Fischer
98ff6b67fd
Fixed boot so module line numbers are correct again (#7618) 2023-07-20 16:13:36 +01:00
Jeremy Ruston
9b2af13596 tm-http-request: Add support for binary responses
With a demo courtesy of https://random.dog/

@rmunn you recently worked on the base64 utilities. I tried to use $tw.utils.base64Encode instead of window.btoa, but found that it didn't work. It's concerning because we expose that utility method as a filter operation, and it would be frustrating if we were not base64encoding things properly.
2023-07-17 12:15:20 +01:00
Jeremy Ruston
7182dbf244 Fix whitespace within new journal button image
Fixes #7612
2023-07-17 09:33:38 +01:00
Jeremy Ruston
f61d244410 Adjust max widget tree depth to 500
See discussion at https://talk.tiddlywiki.org/t/recursive-error-in-template-tiddler-not-getting-caught-in-5-3-0/7566/12
2023-07-17 09:33:16 +01:00
Saq Imtiaz
284669544b
Trim whitespace when importing variables in $importvariables (#7611)
* fix: trim whitespace when importing variables

* feat: added tests for importing variables
2023-07-17 09:18:42 +01:00
Jeremy Ruston
b54a88ce83 Clean up transclude widget
1. Update comments
2. Refactor use of parseTreeNodes so that they are not referenced unnecessarily
3. getTransclusionTarget doesn't need to return the parser object
2023-07-16 14:04:09 +01:00
Mario Pietsch
3bd8c5d50d
Add code-body to unsafe templates, and new cascade for tiddlers with system tags (#7583) 2023-07-15 18:12:10 +01:00
Jeremy Ruston
3a90c37816 Update substitute operator docs
Fixes #7609
2023-07-15 17:58:14 +01:00
Jeremy Ruston
ff7214ff56 New test for importvariables widget 2023-07-15 17:56:20 +01:00
btheado
8e9d8d4fef
Allow attribute substitution to handle variables containing non-word characters (#7606)
* Added failing test for #7604

* Fix attribute substitution regexp

Use the same regexp in wiki.getSubstitutedText as is used in
Widget.prototype.substituteVariableReferences. Fixes #7604.

* Added a test for a variable name containing spaces
2023-07-14 21:42:31 +01:00
Jeremy Ruston
a7bafd8840 Google Analytics: tweaks 2023-07-14 12:41:55 +01:00
Jeremy Ruston
a6779efb1c Use locale sort for shadows
For consistency and compatibility with non-shadow ordering
2023-07-14 12:41:04 +01:00
twMat
ec00dc5042
Update Saving on Browser with TiddlyStow.tid (#7605)
Prevent CC linking in the GettingStarted card display
2023-07-13 19:31:54 +01:00
Jeremy Ruston
08bad90e51 Ensure shadow tiddler listings are always sorted
Currently shadow tiddler ordering depends upon the order in which the shadows appear in the plugin JSON
2023-07-13 19:27:50 +01:00
Jeremy Ruston
9a1d7085b8 Merge remote-tracking branch 'origin/tiddlywiki-com' 2023-07-13 17:57:30 +01:00
jeremy@jermolene.com
feb797701f Fix internal link in "Anchor Links using HTML"
Fixes #7600
2023-07-11 11:26:50 +01:00
TonyM
34ef27fbc0
Update Widget Attributes.tid (#7582)
Fixing error in 
* [[a transclusion of a macro/variable|Transcluded Attribute Values]]

Which should be;

* [[a transclusion of a macro/variable|Variable Attribute Values]]
2023-07-09 16:55:37 +01:00
Scott Sauyet
f517497fe7
Add tabindex to SelectWidget and docs (#7594) 2023-07-09 16:52:35 +01:00
btheado
eff158b1ae
Fixed http-request bind-status and bind-progress option names (#7595) 2023-07-09 16:50:48 +01:00
jeremy@jermolene.com
6954fbee51 Fix comment missing from previous commit 6c7c21a87b 2023-07-06 12:01:39 +01:00
jeremy@jermolene.com
6c7c21a87b Fix overeager onload handler in Jasmine plugin
All of this is needed to enable the Jasmine plugin to work in environment with an asynchronous startup, as seen in the sqlite3 wiki store
2023-07-06 11:52:33 +01:00
jeremy@jermolene.com
29b5b064d6 Robustify widget.removeLocalDomNodes
Otherwise we get crashes if the DOM nodes generated by a widget have been subsequently modified by something like MathJax – see https://talk.tiddlywiki.org/t/tw-5-3-0-js-exception/7488/2
2023-07-06 09:56:39 +01:00
jeremy@jermolene.com
02f6d850d5 Remove references to https://github.com/jermolene/tiddlywiki5/releases
It is not actually populated
2023-07-06 09:10:56 +01:00
Steve Schneider
7597f5af77
Update WidgetMessage_ tm-http-request Example Zotero.tid (#7584)
* corrected zotero groups available for import
* added field zotero-group to imported tiddlers
2023-07-03 18:48:11 +01:00
Jeremy Ruston
0c64b58cfb Update release note 2023-07-01 14:34:19 +01:00
Bram Chen
39f342a943
Update chinese language files (#7577)
* Update help text for savewikifolder command
2023-07-01 14:33:32 +01:00
Maurycy Zarzycki
a6722e9735
Add polish translation to changes introduces in: (#7576)
* 28aef51855
 * 9589e3df33
2023-07-01 14:32:57 +01:00
Bram Chen
42d4c5d5ab
Update chinese language files (#7575)
* Update help text for savewikifolder command
2023-07-01 14:13:31 +01:00
jeremy@jermolene.com
04e771ccbf Update New Release Banner filename 2023-07-01 12:59:42 +01:00
jeremy@jermolene.com
57d85d4f64 Preparation for v5.3.1 2023-07-01 12:51:58 +01:00
2192 changed files with 52565 additions and 7765 deletions

View File

@ -1,8 +0,0 @@
# Ignore "third party" code whose style we will not change.
/boot/sjcl.js
/core/modules/utils/base64-utf8/base64-utf8.module.js
/core/modules/utils/base64-utf8/base64-utf8.module.min.js
/core/modules/utils/diff-match-patch/diff_match_patch.js
/core/modules/utils/diff-match-patch/diff_match_patch_uncompressed.js
/core/modules/utils/dom/csscolorparser.js
/plugins/tiddlywiki/*/files/

View File

@ -1,283 +0,0 @@
env:
browser: true
commonjs: true
es2021: true
node: true
extends: 'eslint:recommended'
globals:
"$tw": "writable" # temporary
parserOptions:
ecmaVersion: 5
rules:
array-bracket-newline: 'off'
array-bracket-spacing: 'off'
array-callback-return: 'off'
array-element-newline: 'off'
arrow-body-style: error
arrow-parens:
- error
- as-needed
arrow-spacing:
- error
- after: true
before: true
block-scoped-var: 'off'
block-spacing: 'off'
brace-style: 'off'
callback-return: 'off'
camelcase: 'off'
capitalized-comments: 'off'
class-methods-use-this: error
comma-dangle: 'off'
comma-spacing: 'off'
comma-style: 'off'
complexity: 'off'
computed-property-spacing: 'off'
consistent-return: 'off'
consistent-this: 'off'
curly: 'off'
default-case: 'off'
default-case-last: error
default-param-last: error
dot-location: 'off'
dot-notation: 'off'
eol-last: 'off'
eqeqeq: 'off'
func-call-spacing: 'off'
func-name-matching: 'off'
func-names: 'off'
func-style: 'off'
function-call-argument-newline: 'off'
function-paren-newline: 'off'
generator-star-spacing: error
global-require: 'off'
grouped-accessor-pairs: error
guard-for-in: 'off'
handle-callback-err: 'off'
id-blacklist: error
id-denylist: error
id-length: 'off'
id-match: error
implicit-arrow-linebreak: error
indent: 'off'
indent-legacy: 'off'
init-declarations: 'off'
jsx-quotes: error
key-spacing: 'off'
keyword-spacing:
- error
- before: true
after: false
overrides:
'case':
after: true
'do':
'after': true
'else':
after: true
'return':
after: true
'throw':
after: true
'try':
after: true
line-comment-position: 'off'
linebreak-style: 'off'
lines-around-comment: 'off'
lines-around-directive: 'off'
lines-between-class-members: error
max-classes-per-file: error
max-depth: 'off'
max-len: 'off'
max-lines: 'off'
max-lines-per-function: 'off'
max-nested-callbacks: error
max-params: 'off'
max-statements: 'off'
max-statements-per-line: 'off'
multiline-comment-style: 'off'
multiline-ternary: 'off'
new-parens: 'off'
newline-after-var: 'off'
newline-before-return: 'off'
newline-per-chained-call: 'off'
no-alert: 'off'
no-array-constructor: 'off'
no-await-in-loop: error
no-bitwise: 'off'
no-buffer-constructor: 'off'
no-caller: error
no-catch-shadow: 'off'
no-confusing-arrow: error
no-console: 'off'
no-constant-condition:
- error
- checkLoops: false
no-constructor-return: error
no-continue: 'off'
no-div-regex: 'off'
no-duplicate-imports: error
no-else-return: 'off'
no-empty-function: 'off'
no-eq-null: 'off'
no-eval: 'off'
no-extend-native: 'off'
no-extra-bind: 'off'
no-extra-label: 'off'
no-extra-parens: 'off'
no-floating-decimal: 'off'
no-implicit-coercion:
- error
- boolean: false
number: false
string: false
no-implicit-globals: 'off'
no-implied-eval: error
no-inline-comments: 'off'
no-invalid-this: 'off'
no-iterator: error
no-label-var: 'off'
no-labels: 'off'
no-lone-blocks: 'off'
no-lonely-if: 'off'
no-loop-func: 'off'
no-loss-of-precision: error
no-magic-numbers: 'off'
no-mixed-operators: 'off'
no-mixed-requires: 'off'
no-multi-assign: 'off'
no-multi-spaces: 'off'
no-multi-str: error
no-multiple-empty-lines: 'off'
no-native-reassign: 'off'
no-negated-condition: 'off'
no-negated-in-lhs: error
no-nested-ternary: 'off'
no-new: 'off'
no-new-func: 'off'
no-new-object: 'off'
no-new-require: error
no-new-wrappers: error
no-octal-escape: error
no-param-reassign: 'off'
no-path-concat: error
no-plusplus: 'off'
no-process-env: 'off'
no-process-exit: 'off'
no-promise-executor-return: error
no-proto: 'off'
no-restricted-exports: error
no-restricted-globals: error
no-restricted-imports: error
no-restricted-modules: error
no-restricted-properties: error
no-restricted-syntax: error
no-return-assign: 'off'
no-return-await: error
no-script-url: 'off'
no-self-compare: 'off'
no-sequences: 'off'
no-shadow: 'off'
no-spaced-func: 'off'
no-sync: 'off'
no-tabs: 'off'
no-template-curly-in-string: error
no-ternary: 'off'
no-throw-literal: 'off'
no-trailing-spaces: 'off'
no-undef-init: 'off'
no-undefined: 'off'
no-underscore-dangle: 'off'
no-unmodified-loop-condition: 'off'
no-unneeded-ternary: 'off'
no-unreachable-loop: error
no-unused-expressions: 'off'
no-use-before-define: 'off'
no-useless-backreference: error
no-useless-call: 'off'
no-useless-computed-key: error
no-useless-concat: 'off'
no-useless-constructor: error
no-useless-rename: error
no-useless-return: 'off'
no-var: 'off'
no-void: 'off'
no-warning-comments: 'off'
no-whitespace-before-property: error
nonblock-statement-body-position:
- error
- any
object-curly-newline: 'off'
object-curly-spacing: 'off'
object-property-newline: 'off'
object-shorthand: 'off'
one-var: 'off'
one-var-declaration-per-line: 'off'
operator-assignment: 'off'
operator-linebreak: 'off'
padded-blocks: 'off'
padding-line-between-statements: error
prefer-arrow-callback: 'off'
prefer-const: 'off'
prefer-destructuring: 'off'
prefer-exponentiation-operator: 'off'
prefer-named-capture-group: 'off'
prefer-numeric-literals: error
prefer-object-spread: 'off'
prefer-promise-reject-errors: error
prefer-reflect: 'off'
prefer-regex-literals: 'off'
prefer-rest-params: 'off'
prefer-spread: 'off'
prefer-template: 'off'
quote-props: 'off'
quotes: 'off'
radix: 'off'
require-atomic-updates: error
require-await: error
require-jsdoc: 'off'
require-unicode-regexp: 'off'
rest-spread-spacing: error
semi: 'off'
semi-spacing: 'off'
semi-style: 'off'
sort-imports: error
sort-keys: 'off'
sort-vars: 'off'
space-before-blocks: 'off'
space-before-function-paren: 'off'
space-in-parens: 'off'
space-infix-ops: 'off'
space-unary-ops: 'off'
spaced-comment: 'off'
strict: 'off'
switch-colon-spacing: 'off'
symbol-description: error
template-curly-spacing: error
template-tag-spacing: error
unicode-bom:
- error
- never
valid-jsdoc: 'off'
valid-typeof:
- error
- requireStringLiterals: false
vars-on-top: 'off'
wrap-iife: 'off'
wrap-regex: 'off'
yield-star-spacing: error
yoda: 'off'
# temporary rules
no-useless-escape: 'off'
no-unused-vars: 'off'
no-empty: 'off'
no-extra-semi: 'off'
no-redeclare: 'off'
no-control-regex: "off"
no-mixed-spaces-and-tabs: "off"
no-extra-boolean-cast: "off"
no-prototype-builtins: "off"
no-undef: "off"
no-unreachable: "off"
no-self-assign: "off"

View File

@ -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]

View File

@ -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

View File

@ -5,7 +5,7 @@ on:
- master - master
- tiddlywiki-com - tiddlywiki-com
env: env:
NODE_VERSION: "12" NODE_VERSION: "22"
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -14,7 +14,13 @@ jobs:
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
with: with:
node-version: "${{ env.NODE_VERSION }}" node-version: "${{ env.NODE_VERSION }}"
- run: "./bin/test.sh" - run: "./bin/ci-test.sh"
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
build-prerelease: build-prerelease:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
@ -54,6 +60,7 @@ jobs:
TW5_BUILD_TIDDLYWIKI: "./node_modules/tiddlywiki/tiddlywiki.js" TW5_BUILD_TIDDLYWIKI: "./node_modules/tiddlywiki/tiddlywiki.js"
TW5_BUILD_MAIN_EDITION: "./editions/tw5.com" TW5_BUILD_MAIN_EDITION: "./editions/tw5.com"
TW5_BUILD_OUTPUT: "./output" TW5_BUILD_OUTPUT: "./output"
TW5_BUILD_ARCHIVE: "./output"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1

30
.github/workflows/cla-check.yml vendored Normal file
View File

@ -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 -io "@$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 }}

70
.github/workflows/cla-signed.yml vendored Normal file
View File

@ -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: $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

5
.gitignore vendored
View File

@ -5,4 +5,7 @@
tmp/ tmp/
output/ output/
node_modules/ node_modules/
/test-results/
/playwright-report/
/playwright/.cache/
$__StoryList.tid

View File

@ -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.0 TW5_BUILD_VERSION=v5.3.7
fi fi
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]" echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
@ -84,10 +84,26 @@ echo -e -n "title: $:/build\ncommit: $TW5_BUILD_COMMIT\n\n$TW5_BUILD_DETAILS\n"
###################################################### ######################################################
# #
# Core distribution # Core distributions
# #
###################################################### ######################################################
# Conditionally build archive if $TW5_BUILD_ARCHIVE variable is set, otherwise do nothing
#
# /archive/Empty-TiddlyWiki-<version>.html Empty archived version
# /archive/TiddlyWiki-<version>.html Full archived version
if [ -n "$TW5_BUILD_ARCHIVE" ]; then
node $TW5_BUILD_TIDDLYWIKI \
$TW5_BUILD_MAIN_EDITION \
--version \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_ARCHIVE \
--build archive \
|| exit 1
fi
# /index.html Main site # /index.html Main site
# /favicon.ico Favicon for main site # /favicon.ico Favicon for main site
# /static.html Static rendering of default tiddlers # /static.html Static rendering of default tiddlers
@ -95,29 +111,29 @@ echo -e -n "title: $:/build\ncommit: $TW5_BUILD_COMMIT\n\n$TW5_BUILD_DETAILS\n"
# /static/* Static single tiddlers # /static/* Static single tiddlers
# /static/static.css Static stylesheet # /static/static.css Static stylesheet
# /static/favicon.ico Favicon for static pages # /static/favicon.ico Favicon for static pages
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
$TW5_BUILD_MAIN_EDITION \ $TW5_BUILD_MAIN_EDITION \
--verbose \
--version \ --version \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--build favicon static index \ --build favicon static index \
|| exit 1 || exit 1
# /empty.html Empty # /empty.html Empty
# /empty.hta For Internet Explorer # /empty.hta For Internet Explorer
# /empty-external-core.html External core empty
# /tiddlywikicore-<version>.js Core plugin javascript
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/empty \ ./editions/empty \
--verbose \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--build empty \ --build empty emptyexternalcore \
|| exit 1 || exit 1
# /test.html Test edition # /test.html Test edition
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/test \ ./editions/test \
--verbose \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all test.html text/plain \ --rendertiddler $:/core/save/all test.html text/plain \
|| exit 1 || exit 1
@ -130,16 +146,21 @@ node $TW5_BUILD_TIDDLYWIKI \
# /dev/static/static.css Static stylesheet # /dev/static/static.css Static stylesheet
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/dev \ ./editions/dev \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/dev \ --output $TW5_BUILD_OUTPUT/dev \
--build index favicon static \ --build index favicon static \
|| exit 1 || exit 1
# /tour.html tour edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/tour \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all tour.html text/plain \
|| exit 1
# /share.html Custom edition for sharing via the URL # /share.html Custom edition for sharing via the URL
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/share \ ./editions/share \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--build share \ --build share \
@ -148,7 +169,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /upgrade.html Custom edition for performing upgrades # /upgrade.html Custom edition for performing upgrades
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/upgrade \ ./editions/upgrade \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--build upgrade \ --build upgrade \
@ -157,7 +177,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /encrypted.html Copy of the main file encrypted with the password "password" # /encrypted.html Copy of the main file encrypted with the password "password"
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
$TW5_BUILD_MAIN_EDITION \ $TW5_BUILD_MAIN_EDITION \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--build encrypted \ --build encrypted \
@ -173,7 +192,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/xlsx-utils/index.html xlsx-utils edition # /editions/xlsx-utils/index.html xlsx-utils edition
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/xlsx-utils \ ./editions/xlsx-utils \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/xlsx-utils/ \ --output $TW5_BUILD_OUTPUT/editions/xlsx-utils/ \
--build index \ --build index \
@ -182,7 +200,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/resumebuilder/index.html Resume builder edition # /editions/resumebuilder/index.html Resume builder edition
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/resumebuilder \ ./editions/resumebuilder \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/resumebuilder/ \ --output $TW5_BUILD_OUTPUT/editions/resumebuilder/ \
--build index \ --build index \
@ -191,7 +208,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/text-slicer/index.html Text slicer edition # /editions/text-slicer/index.html Text slicer edition
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/text-slicer \ ./editions/text-slicer \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/text-slicer/ \ --output $TW5_BUILD_OUTPUT/editions/text-slicer/ \
--build index \ --build index \
@ -200,7 +216,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/translators/index.html Translators edition # /editions/translators/index.html Translators edition
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/translators \ ./editions/translators \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/translators/ \ --output $TW5_BUILD_OUTPUT/editions/translators/ \
--build index \ --build index \
@ -209,7 +224,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/introduction/index.html Introduction edition # /editions/introduction/index.html Introduction edition
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/introduction \ ./editions/introduction \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/introduction/ \ --output $TW5_BUILD_OUTPUT/editions/introduction/ \
--build index \ --build index \
@ -218,7 +232,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/full/index.html Full edition # /editions/full/index.html Full edition
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/full \ ./editions/full \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/full/ \ --output $TW5_BUILD_OUTPUT/editions/full/ \
--build index \ --build index \
@ -227,7 +240,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/tw5.com-docs/index.html tiddlywiki.com docs edition # /editions/tw5.com-docs/index.html tiddlywiki.com docs edition
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/tw5.com-docs \ ./editions/tw5.com-docs \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/tw5.com-docs/ \ --output $TW5_BUILD_OUTPUT/editions/tw5.com-docs/ \
--build index \ --build index \
@ -236,7 +248,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/twitter-archivist/index.html Twitter Archivist edition # /editions/twitter-archivist/index.html Twitter Archivist edition
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/twitter-archivist \ ./editions/twitter-archivist \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/twitter-archivist/ \ --output $TW5_BUILD_OUTPUT/editions/twitter-archivist/ \
--build index \ --build index \
@ -252,7 +263,6 @@ node $TW5_BUILD_TIDDLYWIKI \
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/innerwikidemo \ ./editions/innerwikidemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/innerwiki/index.html text/plain \ --rendertiddler $:/core/save/all plugins/tiddlywiki/innerwiki/index.html text/plain \
@ -263,7 +273,6 @@ node $TW5_BUILD_TIDDLYWIKI \
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/dynaviewdemo \ ./editions/dynaviewdemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/dynaview/index.html text/plain \ --rendertiddler $:/core/save/all plugins/tiddlywiki/dynaview/index.html text/plain \
@ -278,7 +287,6 @@ node $TW5_BUILD_TIDDLYWIKI \
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/katexdemo \ ./editions/katexdemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/katex/index.html text/plain \ --rendertiddler $:/core/save/all plugins/tiddlywiki/katex/index.html text/plain \
@ -289,7 +297,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/tahoelafs/empty.html Empty wiki with Tahoe-LAFS plugin # /plugins/tiddlywiki/tahoelafs/empty.html Empty wiki with Tahoe-LAFS plugin
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/tahoelafs \ ./editions/tahoelafs \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/tahoelafs/index.html text/plain \ --rendertiddler $:/core/save/all plugins/tiddlywiki/tahoelafs/index.html text/plain \
@ -300,7 +307,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/d3/empty.html Empty wiki with D3 plugin # /plugins/tiddlywiki/d3/empty.html Empty wiki with D3 plugin
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/d3demo \ ./editions/d3demo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/d3/index.html text/plain \ --rendertiddler $:/core/save/all plugins/tiddlywiki/d3/index.html text/plain \
@ -311,7 +317,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/codemirror/empty.html Empty wiki with codemirror plugin # /plugins/tiddlywiki/codemirror/empty.html Empty wiki with codemirror plugin
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/codemirrordemo \ ./editions/codemirrordemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/codemirror/index.html text/plain \ --rendertiddler $:/core/save/all plugins/tiddlywiki/codemirror/index.html text/plain \
@ -322,7 +327,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/markdown/empty.html Empty wiki with Markdown plugin # /plugins/tiddlywiki/markdown/empty.html Empty wiki with Markdown plugin
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/markdowndemo \ ./editions/markdowndemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/markdown/index.html text/plain \ --rendertiddler $:/core/save/all plugins/tiddlywiki/markdown/index.html text/plain \
@ -333,7 +337,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/tw2parser/empty.html Empty wiki with tw2parser plugin # /plugins/tiddlywiki/tw2parser/empty.html Empty wiki with tw2parser plugin
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/classicparserdemo \ ./editions/classicparserdemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/tw2parser/index.html text/plain \ --rendertiddler $:/core/save/all plugins/tiddlywiki/tw2parser/index.html text/plain \
@ -344,13 +347,22 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/highlight/empty.html Empty wiki with highlight plugin # /plugins/tiddlywiki/highlight/empty.html Empty wiki with highlight plugin
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/highlightdemo \ ./editions/highlightdemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/highlight/index.html text/plain \ --rendertiddler $:/core/save/all plugins/tiddlywiki/highlight/index.html text/plain \
--rendertiddler $:/core/save/empty plugins/tiddlywiki/highlight/empty.html text/plain \ --rendertiddler $:/core/save/empty plugins/tiddlywiki/highlight/empty.html text/plain \
|| exit 1 || exit 1
# /plugins/tiddlywiki/geospatial/index.html Demo wiki with geospatial plugin
# /plugins/tiddlywiki/geospatial/empty.html Empty wiki with geospatial plugin
node $TW5_BUILD_TIDDLYWIKI \
./editions/geospatialdemo \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/geospatial/index.html text/plain \
--rendertiddler $:/core/save/empty plugins/tiddlywiki/geospatial/empty.html text/plain \
|| exit 1
###################################################### ######################################################
# #
# Language editions # Language editions
@ -372,7 +384,6 @@ rm -rf $TW5_BUILD_OUTPUT/languages/zh-Hant/static/*
# /languages/de-AT/empty.html Empty wiki with de-AT language # /languages/de-AT/empty.html Empty wiki with de-AT language
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/de-AT \ ./editions/de-AT \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/de-AT \ --output $TW5_BUILD_OUTPUT/languages/de-AT \
--build favicon empty static index \ --build favicon empty static index \
@ -382,7 +393,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/de-DE/empty.html Empty wiki with de-DE language # /languages/de-DE/empty.html Empty wiki with de-DE language
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/de-DE \ ./editions/de-DE \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/de-DE \ --output $TW5_BUILD_OUTPUT/languages/de-DE \
--build favicon empty static index \ --build favicon empty static index \
@ -392,7 +402,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/es-ES/empty.html Empty wiki with es-ES language # /languages/es-ES/empty.html Empty wiki with es-ES language
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/es-ES \ ./editions/es-ES \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/es-ES \ --output $TW5_BUILD_OUTPUT/languages/es-ES \
--build favicon empty static index \ --build favicon empty static index \
@ -402,7 +411,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/fr-FR/empty.html Empty wiki with fr-FR language # /languages/fr-FR/empty.html Empty wiki with fr-FR language
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/fr-FR \ ./editions/fr-FR \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/fr-FR \ --output $TW5_BUILD_OUTPUT/languages/fr-FR \
--build favicon empty static index \ --build favicon empty static index \
@ -412,7 +420,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/ja-JP/empty.html Empty wiki with ja-JP language # /languages/ja-JP/empty.html Empty wiki with ja-JP language
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/ja-JP \ ./editions/ja-JP \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/ja-JP \ --output $TW5_BUILD_OUTPUT/languages/ja-JP \
--build empty index \ --build empty index \
@ -422,7 +429,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/ko-KR/empty.html Empty wiki with ko-KR language # /languages/ko-KR/empty.html Empty wiki with ko-KR language
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/ko-KR \ ./editions/ko-KR \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/ko-KR \ --output $TW5_BUILD_OUTPUT/languages/ko-KR \
--build favicon empty static index \ --build favicon empty static index \
@ -432,7 +438,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/zh-Hans/empty.html Empty wiki with zh-Hans language # /languages/zh-Hans/empty.html Empty wiki with zh-Hans language
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/zh-Hans \ ./editions/zh-Hans \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/zh-Hans \ --output $TW5_BUILD_OUTPUT/languages/zh-Hans \
--build empty index \ --build empty index \
@ -442,7 +447,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/zh-Hant/empty.html Empty wiki with zh-Hant language # /languages/zh-Hant/empty.html Empty wiki with zh-Hant language
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/zh-Hant \ ./editions/zh-Hant \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/zh-Hant \ --output $TW5_BUILD_OUTPUT/languages/zh-Hant \
--build empty index \ --build empty index \
@ -456,7 +460,6 @@ node $TW5_BUILD_TIDDLYWIKI \
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/pluginlibrary \ ./editions/pluginlibrary \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \ --load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/library/$TW5_BUILD_VERSION \ --output $TW5_BUILD_OUTPUT/library/$TW5_BUILD_VERSION \
--build library\ --build library\

View File

@ -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

View File

@ -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 ..

16
bin/ci-test.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
# test TiddlyWiki5 for tiddlywiki.com
node ./tiddlywiki.js \
./editions/test \
--verbose \
--version \
--rendertiddler $:/core/save/all test.html text/plain \
--test \
|| exit 1
npm install playwright @playwright/test
npx playwright install chromium firefox --with-deps
npx playwright test

View File

@ -15,3 +15,11 @@ node $TW5_BUILD_TIDDLYWIKI \
--output . \ --output . \
--build readmes \ --build readmes \
|| exit 1 || exit 1
# tw.org readmes
node $TW5_BUILD_TIDDLYWIKI \
editions/tw.org \
--verbose \
--output . \
--build readmes \
|| exit 1

View File

@ -142,15 +142,15 @@ $tw.utils.each = function(object,callback) {
var next,f,length; var next,f,length;
if(object) { if(object) {
if(Object.prototype.toString.call(object) == "[object Array]") { if(Object.prototype.toString.call(object) == "[object Array]") {
for (f=0, length=object.length; f<length; f++) { for(f=0, length=object.length; f<length; f++) {
next = callback(object[f],f,object); next = callback(object[f],f,object);
if(next === false) { if(next === false) {
break; break;
} }
} }
} else { } else {
var keys = Object.keys(object); var keys = Object.keys(object);
for (f=0, length=keys.length; f<length; f++) { for(f=0, length=keys.length; f<length; f++) {
var key = keys[f]; var key = keys[f];
next = callback(object[key],key,object); next = callback(object[key],key,object);
if(next === false) { if(next === false) {
@ -177,6 +177,7 @@ document: defaults to current document
eventListeners: array of event listeners (this option won't work until $tw.utils.addEventListeners() has been loaded) eventListeners: array of event listeners (this option won't work until $tw.utils.addEventListeners() has been loaded)
*/ */
$tw.utils.domMaker = function(tag,options) { $tw.utils.domMaker = function(tag,options) {
var options = options || {};
var doc = options.document || document; var doc = options.document || document;
var element = doc.createElementNS(options.namespace || "http://www.w3.org/1999/xhtml",tag); var element = doc.createElementNS(options.namespace || "http://www.w3.org/1999/xhtml",tag);
if(options["class"]) { if(options["class"]) {
@ -218,9 +219,34 @@ $tw.utils.error = function(err) {
heading = dm("h1",{text: errHeading}), heading = dm("h1",{text: errHeading}),
prompt = dm("div",{text: promptMsg, "class": "tc-error-prompt"}), prompt = dm("div",{text: promptMsg, "class": "tc-error-prompt"}),
message = dm("div",{text: err, "class":"tc-error-message"}), message = dm("div",{text: err, "class":"tc-error-message"}),
button = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "close" : $tw.language.getString("Buttons/Close/Caption") )})], "class": "tc-error-prompt"}), closeButton = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "close" : $tw.language.getString("Buttons/Close/Caption") )})], "class": "tc-error-prompt"}),
form = dm("form",{children: [heading,prompt,message,button], "class": "tc-error-form"}); downloadButton = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "download tiddlers" : $tw.language.getString("Buttons/EmergencyDownload/Caption") )})], "class": "tc-error-prompt"}),
form = dm("form",{children: [heading,prompt,downloadButton,message,closeButton], "class": "tc-error-form"});
document.body.insertBefore(form,document.body.firstChild); document.body.insertBefore(form,document.body.firstChild);
downloadButton.addEventListener("click",function(event) {
if($tw && $tw.wiki) {
var tiddlers = [];
$tw.wiki.each(function(tiddler,title) {
tiddlers.push(tiddler.fields);
});
var link = dm("a"),
text = JSON.stringify(tiddlers);
if(Blob !== undefined) {
var blob = new Blob([text], {type: "text/html"});
link.setAttribute("href", URL.createObjectURL(blob));
} else {
link.setAttribute("href","data:text/html," + encodeURIComponent(text));
}
link.setAttribute("download","emergency-tiddlers-" + (new Date()) + ".json");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
} else {
alert("Emergency tiddler download is not available");
}
event.preventDefault();
return false;
},true);
form.addEventListener("submit",function(event) { form.addEventListener("submit",function(event) {
document.body.removeChild(form); document.body.removeChild(form);
event.preventDefault(); event.preventDefault();
@ -249,7 +275,7 @@ Extend an object with the properties from a list of source objects
$tw.utils.extend = function(object /*, sourceObjectList */) { $tw.utils.extend = function(object /*, sourceObjectList */) {
$tw.utils.each(Array.prototype.slice.call(arguments,1),function(source) { $tw.utils.each(Array.prototype.slice.call(arguments,1),function(source) {
if(source) { if(source) {
for (var p in source) { for(var p in source) {
object[p] = source[p]; object[p] = source[p];
} }
} }
@ -263,7 +289,7 @@ Fill in any null or undefined properties of an object with the properties from a
$tw.utils.deepDefaults = function(object /*, sourceObjectList */) { $tw.utils.deepDefaults = function(object /*, sourceObjectList */) {
$tw.utils.each(Array.prototype.slice.call(arguments,1),function(source) { $tw.utils.each(Array.prototype.slice.call(arguments,1),function(source) {
if(source) { if(source) {
for (var p in source) { for(var p in source) {
if(object[p] === null || object[p] === undefined) { if(object[p] === null || object[p] === undefined) {
object[p] = source[p]; object[p] = source[p];
} }
@ -360,8 +386,8 @@ $tw.utils.parseDate = function(value) {
parseInt(value.substr(10,2)||"00",10), parseInt(value.substr(10,2)||"00",10),
parseInt(value.substr(12,2)||"00",10), parseInt(value.substr(12,2)||"00",10),
parseInt(value.substr(14,3)||"000",10))); parseInt(value.substr(14,3)||"000",10)));
d.setUTCFullYear(year); // See https://stackoverflow.com/a/5870822 d.setUTCFullYear(year); // See https://stackoverflow.com/a/5870822
return d; return d;
} else if($tw.utils.isDate(value)) { } else if($tw.utils.isDate(value)) {
return value; return value;
} else { } else {
@ -575,9 +601,8 @@ var globalCheck =[
" configurable: true", " configurable: true",
" });", " });",
" if(Object.keys(__temp__).length){", " if(Object.keys(__temp__).length){",
" console.log(Object.keys(__temp__));", " console.log(\"Warning: Global assignment detected\",Object.keys(__temp__));",
" delete Object.prototype.__temp__;", " delete Object.prototype.__temp__;",
" throw \"Global assignment is not allowed within modules on node.\";",
" }", " }",
" delete Object.prototype.__temp__;", " delete Object.prototype.__temp__;",
].join('\n'); ].join('\n');
@ -596,11 +621,11 @@ $tw.utils.evalGlobal = function(code,context,filename,sandbox,allowGlobals) {
// Add the code prologue and epilogue // Add the code prologue and epilogue
code = [ code = [
"(function(" + contextNames.join(",") + ") {", "(function(" + contextNames.join(",") + ") {",
" (function(){\n" + code + "\n;})();", " (function(){" + code + "\n;})();\n",
(!$tw.browser && sandbox && !allowGlobals) ? globalCheck : "", (!$tw.browser && sandbox && !allowGlobals) ? globalCheck : "",
" return exports;\n", "\nreturn exports;\n",
"})" "})"
].join("\n"); ].join("");
// Compile the code into a function // Compile the code into a function
var fn; var fn;
@ -787,6 +812,7 @@ $tw.utils.Crypto = function() {
} }
return outputText; return outputText;
}; };
$tw.sjcl = sjcl;
this.setPassword = function(newPassword) { this.setPassword = function(newPassword) {
currentPassword = newPassword; currentPassword = newPassword;
this.updateCryptoStateTiddler(); this.updateCryptoStateTiddler();
@ -867,8 +893,8 @@ $tw.modules.execute = function(moduleName,moduleRoot) {
} else { } else {
/* /*
CommonJS optional require.main property: CommonJS optional require.main property:
In a browser we offer a fake main module which points back to the boot function In a browser we offer a fake main module which points back to the boot function
(Theoretically, this may allow TW to eventually load itself as a module in the browser) (Theoretically, this may allow TW to eventually load itself as a module in the browser)
*/ */
Object.defineProperty(sandbox.require, "main", { Object.defineProperty(sandbox.require, "main", {
value: (typeof(require) !== "undefined") ? require.main : {TiddlyWiki: _boot}, value: (typeof(require) !== "undefined") ? require.main : {TiddlyWiki: _boot},
@ -910,9 +936,9 @@ $tw.modules.execute = function(moduleName,moduleRoot) {
moduleInfo.exports = moduleInfo.definition; moduleInfo.exports = moduleInfo.definition;
} }
} catch(e) { } catch(e) {
if (e instanceof SyntaxError) { if(e instanceof SyntaxError) {
var line = e.lineNumber || e.line; // Firefox || Safari var line = e.lineNumber || e.line; // Firefox || Safari
if (typeof(line) != "undefined" && line !== null) { if(typeof(line) != "undefined" && line !== null) {
$tw.utils.error("Syntax error in boot module " + name + ":" + line + ":\n" + e.stack); $tw.utils.error("Syntax error in boot module " + name + ":" + line + ":\n" + e.stack);
} else if(!$tw.browser) { } else if(!$tw.browser) {
// this is the only way to get node.js to display the line at which the syntax error appeared, // this is the only way to get node.js to display the line at which the syntax error appeared,
@ -926,7 +952,7 @@ $tw.modules.execute = function(moduleName,moduleRoot) {
} }
} else { } else {
// line number should be included in e.stack for runtime errors // line number should be included in e.stack for runtime errors
$tw.utils.error("Error executing boot module " + name + ": " + JSON.stringify(e) + "\n\n" + e.stack); $tw.utils.error("Error executing boot module " + name + ": " + String(e) + "\n\n" + e.stack);
} }
} }
} }
@ -1150,7 +1176,7 @@ $tw.Wiki = function(options) {
shadowTiddlerTitles = null, shadowTiddlerTitles = null,
getShadowTiddlerTitles = function() { getShadowTiddlerTitles = function() {
if(!shadowTiddlerTitles) { if(!shadowTiddlerTitles) {
shadowTiddlerTitles = Object.keys(shadowTiddlers); shadowTiddlerTitles = Object.keys(shadowTiddlers).sort(function(a,b) {return a.localeCompare(b);});
} }
return shadowTiddlerTitles; return shadowTiddlerTitles;
}, },
@ -1507,7 +1533,7 @@ Define all modules stored in ordinary tiddlers
$tw.Wiki.prototype.defineTiddlerModules = function() { $tw.Wiki.prototype.defineTiddlerModules = function() {
this.each(function(tiddler,title) { this.each(function(tiddler,title) {
if(tiddler.hasField("module-type")) { if(tiddler.hasField("module-type")) {
switch (tiddler.fields.type) { switch(tiddler.fields.type) {
case "application/javascript": case "application/javascript":
// We only define modules that haven't already been defined, because in the browser modules in system tiddlers are defined in inline script // We only define modules that haven't already been defined, because in the browser modules in system tiddlers are defined in inline script
if(!$tw.utils.hop($tw.modules.titles,tiddler.fields.title)) { if(!$tw.utils.hop($tw.modules.titles,tiddler.fields.title)) {
@ -1968,10 +1994,10 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
var value = tiddler[name]; var value = tiddler[name];
switch(fieldInfo.source) { switch(fieldInfo.source) {
case "subdirectories": case "subdirectories":
value = path.relative(rootPath, filename).split('/').slice(0, -1); value = path.relative(rootPath, filename).split(path.sep).slice(0, -1);
break; break;
case "filepath": case "filepath":
value = path.relative(rootPath, filename); value = path.relative(rootPath, filename).split(path.sep).join('/');
break; break;
case "filename": case "filename":
value = path.basename(filename); value = path.basename(filename);
@ -2017,7 +2043,7 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
arrayOfFiles = arrayOfFiles || []; arrayOfFiles = arrayOfFiles || [];
var files = fs.readdirSync(dirPath); var files = fs.readdirSync(dirPath);
files.forEach(function(file) { files.forEach(function(file) {
if (recurse && fs.statSync(dirPath + path.sep + file).isDirectory()) { if(recurse && fs.statSync(dirPath + path.sep + file).isDirectory()) {
arrayOfFiles = getAllFiles(dirPath + path.sep + file, recurse, arrayOfFiles); arrayOfFiles = getAllFiles(dirPath + path.sep + file, recurse, arrayOfFiles);
} else if(fs.statSync(dirPath + path.sep + file).isFile()){ } else if(fs.statSync(dirPath + path.sep + file).isFile()){
arrayOfFiles.push(path.join(dirPath, path.sep, file)); arrayOfFiles.push(path.join(dirPath, path.sep, file));
@ -2162,13 +2188,16 @@ Returns an array of search paths
*/ */
$tw.getLibraryItemSearchPaths = function(libraryPath,envVar) { $tw.getLibraryItemSearchPaths = function(libraryPath,envVar) {
var pluginPaths = [path.resolve($tw.boot.corePath,libraryPath)], var pluginPaths = [path.resolve($tw.boot.corePath,libraryPath)],
env;
if(envVar) {
env = process.env[envVar]; env = process.env[envVar];
if(env) { if(env) {
env.split(path.delimiter).map(function(item) { env.split(path.delimiter).map(function(item) {
if(item) { if(item) {
pluginPaths.push(item); pluginPaths.push(item);
} }
}); });
}
} }
return pluginPaths; return pluginPaths;
}; };
@ -2254,7 +2283,7 @@ $tw.loadWikiTiddlers = function(wikiPath,options) {
} }
$tw.wiki.addTiddlers(tiddlerFile.tiddlers); $tw.wiki.addTiddlers(tiddlerFile.tiddlers);
}); });
if ($tw.boot.wikiPath == wikiPath) { if($tw.boot.wikiPath == wikiPath) {
// Save the original tiddler file locations if requested // Save the original tiddler file locations if requested
var output = {}, relativePath, fileInfo; var output = {}, relativePath, fileInfo;
for(var title in $tw.boot.files) { for(var title in $tw.boot.files) {
@ -2439,6 +2468,7 @@ $tw.boot.initStartup = function(options) {
$tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]}); $tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]});
$tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]});
$tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]});
$tw.utils.registerFileType("application/wasm","base64",".wasm");
$tw.utils.registerFileType("application/font-woff","base64",".woff"); $tw.utils.registerFileType("application/font-woff","base64",".woff");
$tw.utils.registerFileType("application/x-font-ttf","base64",".woff"); $tw.utils.registerFileType("application/x-font-ttf","base64",".woff");
$tw.utils.registerFileType("application/font-woff2","base64",".woff2"); $tw.utils.registerFileType("application/font-woff2","base64",".woff2");
@ -2453,8 +2483,12 @@ $tw.boot.initStartup = function(options) {
$tw.utils.registerFileType("text/x-markdown","utf8",[".md",".markdown"]); $tw.utils.registerFileType("text/x-markdown","utf8",[".md",".markdown"]);
$tw.utils.registerFileType("application/enex+xml","utf8",".enex"); $tw.utils.registerFileType("application/enex+xml","utf8",".enex");
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.wordprocessingml.document","base64",".docx"); $tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.wordprocessingml.document","base64",".docx");
$tw.utils.registerFileType("application/msword","base64",".doc");
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","base64",".xlsx"); $tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","base64",".xlsx");
$tw.utils.registerFileType("application/excel","base64",".xls");
$tw.utils.registerFileType("application/vnd.ms-excel","base64",".xls");
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.presentationml.presentation","base64",".pptx"); $tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.presentationml.presentation","base64",".pptx");
$tw.utils.registerFileType("application/mspowerpoint","base64",".ppt");
$tw.utils.registerFileType("text/x-bibtex","utf8",".bib",{deserializerType:"application/x-bibtex"}); $tw.utils.registerFileType("text/x-bibtex","utf8",".bib",{deserializerType:"application/x-bibtex"});
$tw.utils.registerFileType("application/x-bibtex","utf8",".bib"); $tw.utils.registerFileType("application/x-bibtex","utf8",".bib");
$tw.utils.registerFileType("application/epub+zip","base64",".epub"); $tw.utils.registerFileType("application/epub+zip","base64",".epub");
@ -2603,14 +2637,14 @@ $tw.boot.doesTaskMatchPlatform = function(taskModule) {
var platforms = taskModule.platforms; var platforms = taskModule.platforms;
if(platforms) { if(platforms) {
for(var t=0; t<platforms.length; t++) { for(var t=0; t<platforms.length; t++) {
switch (platforms[t]) { switch(platforms[t]) {
case "browser": case "browser":
if ($tw.browser) { if($tw.browser) {
return true; return true;
} }
break; break;
case "node": case "node":
if ($tw.node) { if($tw.node) {
return true; return true;
} }
break; break;
@ -2675,13 +2709,25 @@ $tw.hooks.addHook = function(hookName,definition) {
} }
}; };
/*
Delete hooks from the hashmap
*/
$tw.hooks.removeHook = function(hookName,definition) {
if($tw.utils.hop($tw.hooks.names,hookName)) {
var p = $tw.hooks.names[hookName].indexOf(definition);
if(p !== -1) {
$tw.hooks.names[hookName].splice(p, 1);
}
}
};
/* /*
Invoke the hook by key Invoke the hook by key
*/ */
$tw.hooks.invokeHook = function(hookName /*, value,... */) { $tw.hooks.invokeHook = function(hookName /*, value,... */) {
var args = Array.prototype.slice.call(arguments,1); var args = Array.prototype.slice.call(arguments,1);
if($tw.utils.hop($tw.hooks.names,hookName)) { if($tw.utils.hop($tw.hooks.names,hookName)) {
for (var i = 0; i < $tw.hooks.names[hookName].length; i++) { for(var i = 0; i < $tw.hooks.names[hookName].length; i++) {
args[0] = $tw.hooks.names[hookName][i].apply(null,args); args[0] = $tw.hooks.names[hookName][i].apply(null,args);
} }
} }

View File

@ -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;

View File

@ -1,3 +0,0 @@
title: $:/library/sjcl.js
type: application/javascript
library: yes

32
boot/tiddlywiki.files Normal file
View File

@ -0,0 +1,32 @@
{
"tiddlers": [
{
"file": "sjcl.js",
"fields": {
"title": "$:/library/sjcl.js",
"type": "application/javascript",
"library": "yes"
},
"prefix": "(function(define) {\n",
"suffix": "\n})(function (_,defined){window.sjcl = defined()})\n"
},
{
"file": "boot.js",
"fields": {
"title": "$:/boot/boot.js",
"type": "application/javascript"
}
},
{
"file": "bootprefix.js",
"fields": {
"title": "$:/boot/bootprefix.js",
"type": "application/javascript"
}
},
{
"file": "boot.css.tid",
"isTiddlerFile": true
}
]
}

1
code-of-conduct.md Normal file
View File

@ -0,0 +1 @@
<p>This community exists because TiddlyWiki is more useful when people share and work together.</p><p>This community is a beautiful but fragile thing: a collection of diverse people from all over the planet, united in their interest in the project, and their commitment to helping one another achieve and learn more.</p><p>We try to make the community as broad and welcoming as possible by remembering some basic principles of culture and behaviour.</p><p>These principles guide technical and non-technical decisions, and help contributors and leaders support our project and community.</p><ul><li>We are optimistic and hopeful</li><li>We aim to foster a learning environment that is collaborative and safe for everyone</li><li>We recognise that the motivation for sharing and helping is usually for appreciation, and not financial gain, and so we take care to acknowledge and <strong>thank the people who enrich the community by sharing what they have created</strong></li><li>While we are united in our interest in TiddlyWiki, we differ in every other conceivable way. We choose to focus on what unites us, and <strong>avoid unnecessarily mixing contentious topics like religion and politics</strong></li><li>We treat each other with respect, and start with the assumption that <strong>others are acting in good faith</strong></li><li>We avoid discriminatory language</li><li>We try to use our strength as a community to help others</li><li>We avoid responding when angry or upset because we try to de-escalate conflict</li><li>We make sure we critique ideas, not people</li><li>When we disagree with others we do so graciously, and treat others with dignity and respoect</li><li>We do not tolerate intolerance towards others</li><li>We seek first to understand others, and then to be understood</li><li>We have fun</li></ul><p>Our discussions are in English. It is not the first language of many people in the community, nor do we all share the same cultural background and reference points. So we take care to use language that is clear and unambigous, and avoid cultural references or jokes that will not be widely understood.</p><p>It is not acceptable to make jokes or other comments that discriminate by race, gender, sexuality, or other protected characteristic.</p><p>As an inclusive community, we are committed to making sure that TiddlyWiki is an accessible tool that understands the needs of people with disabilities.</p>

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@ type: text/plain
TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com) TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)
Copyright (c) 2004-2007, Jeremy Ruston Copyright (c) 2004-2007, Jeremy Ruston
Copyright (c) 2007-2023, UnaMesa Association Copyright (c) 2007-2024, UnaMesa Association
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

5
core/images/discord.tid Normal file
View File

@ -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>

View File

@ -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>

View File

@ -1,6 +1,4 @@
title: $:/core/images/new-journal-button title: $:/core/images/new-journal-button
tags: $:/tags/Image tags: $:/tags/Image
<$parameters size="22pt" day=<<now "DD">>> <$parameters size="22pt" day=<<now "DD">>><svg width=<<size>> height=<<size>> class="tc-image-new-journal-button tc-image-button" viewBox="0 0 128 128"><g fill-rule="evenodd"><path d="M102.545 112.818v11.818c0 1.306 1.086 2.364 2.425 2.364h6.06c1.34 0 2.425-1.058 2.425-2.364v-11.818h12.12c1.34 0 2.425-1.058 2.425-2.363v-5.91c0-1.305-1.085-2.363-2.424-2.363h-12.121V90.364c0-1.306-1.086-2.364-2.425-2.364h-6.06c-1.34 0-2.425 1.058-2.425 2.364v11.818h-12.12c-1.34 0-2.425 1.058-2.425 2.363v5.91c0 1.305 1.085 2.363 2.424 2.363h12.121zM60.016 4.965c-4.781-2.76-10.897-1.118-13.656 3.66L5.553 79.305A9.993 9.993 0 009.21 92.963l51.04 29.468c4.78 2.76 10.897 1.118 13.655-3.66l40.808-70.681a9.993 9.993 0 00-3.658-13.656L60.016 4.965zm-3.567 27.963a6 6 0 106-10.393 6 6 0 00-6 10.393zm31.697 17.928a6 6 0 106-10.392 6 6 0 00-6 10.392z"/><text class="tc-fill-background" font-family="Helvetica" font-size="47.172" font-weight="bold" transform="rotate(30 25.742 95.82)"><tspan x="42" y="77.485" text-anchor="middle"><$text text=<<day>>/></tspan></text></g></svg></$parameters>
<svg width=<<size>> height=<<size>> class="tc-image-new-journal-button tc-image-button" viewBox="0 0 128 128"><g fill-rule="evenodd"><path d="M102.545 112.818v11.818c0 1.306 1.086 2.364 2.425 2.364h6.06c1.34 0 2.425-1.058 2.425-2.364v-11.818h12.12c1.34 0 2.425-1.058 2.425-2.363v-5.91c0-1.305-1.085-2.363-2.424-2.363h-12.121V90.364c0-1.306-1.086-2.364-2.425-2.364h-6.06c-1.34 0-2.425 1.058-2.425 2.364v11.818h-12.12c-1.34 0-2.425 1.058-2.425 2.363v5.91c0 1.305 1.085 2.363 2.424 2.363h12.121zM60.016 4.965c-4.781-2.76-10.897-1.118-13.656 3.66L5.553 79.305A9.993 9.993 0 009.21 92.963l51.04 29.468c4.78 2.76 10.897 1.118 13.655-3.66l40.808-70.681a9.993 9.993 0 00-3.658-13.656L60.016 4.965zm-3.567 27.963a6 6 0 106-10.393 6 6 0 00-6 10.393zm31.697 17.928a6 6 0 106-10.392 6 6 0 00-6 10.392z"/><text class="tc-fill-background" font-family="Helvetica" font-size="47.172" font-weight="bold" transform="rotate(30 25.742 95.82)"><tspan x="42" y="77.485" text-anchor="middle"><$text text=<<day>>/></tspan></text></g></svg>
</$parameters>

View File

@ -0,0 +1,7 @@
title: $:/core/images/standard-layout
tags: $:/tags/Image
\parameters (size:"22pt")
<svg width=<<size>> height=<<size>> class="tc-image-standard-layout tc-image-button" viewBox="0 0 128 128">
<path d="M71.93 72A8.07 8.07 0 0 1 80 80.07v7.86A8.071 8.071 0 0 1 71.93 96H8.07A8.067 8.067 0 0 1 0 87.93v-7.86A8.072 8.072 0 0 1 8.07 72h63.86Zm0 32a8.07 8.07 0 0 1 8.07 8.07v7.86a8.071 8.071 0 0 1-8.07 8.07H8.07A8.067 8.067 0 0 1 0 119.93v-7.86A8.072 8.072 0 0 1 8.07 104h63.86Zm0-104A8.068 8.068 0 0 1 80 8.07v47.86A8.073 8.073 0 0 1 71.93 64H8.07A8.07 8.07 0 0 1 0 55.93V8.07A8.072 8.072 0 0 1 8.07 0h63.86Zm48 0c2.14 0 4.193.85 5.706 2.364A8.067 8.067 0 0 1 128 8.07v111.86c0 2.14-.85 4.193-2.364 5.706A8.067 8.067 0 0 1 119.93 128H96.07c-2.14 0-4.193-.85-5.706-2.364A8.067 8.067 0 0 1 88 119.93V8.07c0-2.14.85-4.193 2.364-5.706A8.067 8.067 0 0 1 96.07 0h23.86ZM116 24h-16a3.995 3.995 0 0 0-2.828 1.172 3.995 3.995 0 0 0 0 5.656A3.995 3.995 0 0 0 100 32h16a3.995 3.995 0 0 0 2.828-1.172 3.995 3.995 0 0 0 0-5.656A3.995 3.995 0 0 0 116 24Z"/>
</svg>

View File

@ -28,6 +28,7 @@ Encryption/ClearPassword/Caption: clear password
Encryption/ClearPassword/Hint: Clear the password and save this wiki without encryption Encryption/ClearPassword/Hint: Clear the password and save this wiki without encryption
Encryption/SetPassword/Caption: set password Encryption/SetPassword/Caption: set password
Encryption/SetPassword/Hint: Set a password for saving this wiki with encryption Encryption/SetPassword/Hint: Set a password for saving this wiki with encryption
EmergencyDownload/Caption: download tiddlers as json
ExportPage/Caption: export all ExportPage/Caption: export all
ExportPage/Hint: Export all tiddlers ExportPage/Hint: Export all tiddlers
ExportTiddler/Caption: export tiddler ExportTiddler/Caption: export tiddler
@ -79,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
@ -103,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
@ -129,6 +133,7 @@ Excise/Caption/Replace/Link: link
Excise/Caption/Replace/Transclusion: transclusion Excise/Caption/Replace/Transclusion: transclusion
Excise/Caption/Tag: Tag new tiddler with the title of this tiddler Excise/Caption/Tag: Tag new tiddler with the title of this tiddler
Excise/Caption/TiddlerExists: Warning: tiddler already exists Excise/Caption/TiddlerExists: Warning: tiddler already exists
Excise/DefaultTitle: New Excision
Excise/Hint: Excise the selected text into a new tiddler Excise/Hint: Excise the selected text into a new tiddler
Heading1/Caption: heading 1 Heading1/Caption: heading 1
Heading1/Hint: Apply heading level 1 formatting to lines containing selection Heading1/Hint: Apply heading level 1 formatting to lines containing selection

View File

@ -96,6 +96,10 @@ Plugins/PluginWillRequireReload: (requires reload)
Plugins/Plugins/Caption: Plugins Plugins/Plugins/Caption: Plugins
Plugins/Plugins/Hint: Plugins Plugins/Plugins/Hint: Plugins
Plugins/Reinstall/Caption: reinstall Plugins/Reinstall/Caption: reinstall
Plugins/Stability/Deprecated: DEPRECATED
Plugins/Stability/Experimental: EXPERIMENTAL
Plugins/Stability/Legacy: LEGACY
Plugins/Stability/Stable: STABLE
Plugins/Themes/Caption: Themes Plugins/Themes/Caption: Themes
Plugins/Themes/Hint: Theme plugins Plugins/Themes/Hint: Theme plugins
Plugins/Update/Caption: update Plugins/Update/Caption: update
@ -171,6 +175,8 @@ Settings/NavigationPermalinkviewMode/UpdateAddressBar/Description: Update addres
Settings/PerformanceInstrumentation/Caption: Performance Instrumentation Settings/PerformanceInstrumentation/Caption: Performance Instrumentation
Settings/PerformanceInstrumentation/Hint: Displays performance statistics in the browser developer console. Requires reload to take effect Settings/PerformanceInstrumentation/Hint: Displays performance statistics in the browser developer console. Requires reload to take effect
Settings/PerformanceInstrumentation/Description: Enable performance instrumentation Settings/PerformanceInstrumentation/Description: Enable performance instrumentation
Settings/RecentLimit/Caption: Recent Tab Limit
Settings/RecentLimit/Hint: Maximum number of tiddlers to be displayed under the sidebar "Recent" tab
Settings/ToolbarButtonStyle/Caption: Toolbar Button Style Settings/ToolbarButtonStyle/Caption: Toolbar Button Style
Settings/ToolbarButtonStyle/Hint: Choose the style for toolbar buttons: Settings/ToolbarButtonStyle/Hint: Choose the style for toolbar buttons:
Settings/ToolbarButtonStyle/Styles/Borderless: Borderless Settings/ToolbarButtonStyle/Styles/Borderless: Borderless
@ -198,6 +204,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
@ -206,6 +218,12 @@ Stylesheets/Caption: Stylesheets
Stylesheets/Expand/Caption: Expand All Stylesheets/Expand/Caption: Expand All
Stylesheets/Hint: This is the rendered CSS of the current stylesheet tiddlers tagged with <<tag "$:/tags/Stylesheet">> Stylesheets/Hint: This is the rendered CSS of the current stylesheet tiddlers tagged with <<tag "$:/tags/Stylesheet">>
Stylesheets/Restore/Caption: Restore Stylesheets/Restore/Caption: Restore
TestCases/Caption: Test Cases
TestCases/Hint: Test cases are self contained examples for testing and learning
TestCases/All/Caption: All Test Cases
TestCases/All/Hint: All Test Cases
TestCases/Failed/Caption: Failed Test Cases
TestCases/Failed/Hint: Only Failed Test Cases
Theme/Caption: Theme Theme/Caption: Theme
Theme/Prompt: Current theme: Theme/Prompt: Current theme:
TiddlerFields/Caption: Tiddler Fields TiddlerFields/Caption: Tiddler Fields
@ -229,3 +247,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.

View File

@ -9,7 +9,7 @@ config: Data to be inserted into `$tw.config`.
filteroperator: Individual filter operator methods. filteroperator: Individual filter operator methods.
global: Global data to be inserted into `$tw`. global: Global data to be inserted into `$tw`.
info: Publishes system information via the [[$:/temp/info-plugin]] pseudo-plugin. info: Publishes system information via the [[$:/temp/info-plugin]] pseudo-plugin.
isfilteroperator: Operands for the ''is'' filter operator. isfilteroperator: Parameters for the ''is'' filter operator.
library: Generic module type for general purpose JavaScript modules. library: Generic module type for general purpose JavaScript modules.
macro: JavaScript macro definitions. macro: JavaScript macro definitions.
parser: Parsers for different content types. parser: Parsers for different content types.

View File

@ -65,6 +65,13 @@ 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-2: Test case accent colour with 2nd level nesting
testcase-accent-level-3: Test case accent colour with 3rd level nesting or higher
site-title-foreground: Site title foreground site-title-foreground: Site title foreground
static-alert-foreground: Static alert foreground static-alert-foreground: Static alert foreground
tab-background-selected: Tab background for selected tabs tab-background-selected: Tab background for selected tabs

View File

@ -26,6 +26,8 @@ Tags/ClearInput/Caption: clear input
Tags/ClearInput/Hint: Clear tag input Tags/ClearInput/Hint: Clear tag input
Tags/Dropdown/Caption: tag list Tags/Dropdown/Caption: tag list
Tags/Dropdown/Hint: Show tag list Tags/Dropdown/Hint: Show tag list
Tags/EmptyMessage: No tags found
Tags/EmptyMessage/System: No system tags found
Title/BadCharacterWarning: Warning: avoid using any of the characters <<bad-chars>> in tiddler titles Title/BadCharacterWarning: Warning: avoid using any of the characters <<bad-chars>> in tiddler titles
Title/Exists/Prompt: Target tiddler already exists Title/Exists/Prompt: Target tiddler already exists
Title/Relink/Prompt: Update ''<$text text=<<fromTitle>>/>'' to ''<$text text=<<toTitle>>/>'' in the //tags// and //list// fields of other tiddlers Title/Relink/Prompt: Update ''<$text text=<<fromTitle>>/>'' to ''<$text text=<<toTitle>>/>'' in the //tags// and //list// fields of other tiddlers

View File

@ -3,4 +3,4 @@ title: $:/language/Exporters/
StaticRiver: Static HTML StaticRiver: Static HTML
JsonFile: JSON file JsonFile: JSON file
CsvFile: CSV file CsvFile: CSV file
TidFile: ".tid" file TidFile: TID text file

View File

@ -4,6 +4,7 @@ _canonical_uri: The full URI of an external image tiddler
author: Name of the author of a plugin author: Name of the author of a plugin
bag: The name of the bag from which a tiddler came bag: The name of the bag from which a tiddler came
caption: The text to be displayed on a tab or button caption: The text to be displayed on a tab or button
class: The CSS class applied to a tiddler when rendering it - see [[Custom styles by user-class]]. Also used for [[Modals]]
code-body: The view template will display the tiddler as code if set to ''yes'' code-body: The view template will display the tiddler as code if set to ''yes''
color: The CSS color value associated with a tiddler color: The CSS color value associated with a tiddler
component: The name of the component responsible for an [[alert tiddler|AlertMechanism]] component: The name of the component responsible for an [[alert tiddler|AlertMechanism]]
@ -29,6 +30,7 @@ name: The human readable name associated with a plugin tiddler
parent-plugin: For a plugin, specifies which plugin of which it is a sub-plugin parent-plugin: For a plugin, specifies which plugin of which it is a sub-plugin
plugin-priority: A numerical value indicating the priority of a plugin tiddler plugin-priority: A numerical value indicating the priority of a plugin tiddler
plugin-type: The type of plugin in a plugin tiddler plugin-type: The type of plugin in a plugin tiddler
stability: The development status of a plugin: deprecated, experimental, stable, or legacy
revision: The revision of the tiddler held at the server revision: The revision of the tiddler held at the server
released: Date of a TiddlyWiki release released: Date of a TiddlyWiki release
source: The source URL associated with a tiddler source: The source URL associated with a tiddler

View File

@ -10,7 +10,7 @@ Sequentially run the command tokens returned from a filter
Examples Examples
``` ```
--commands "[enlist{$:/build-commands-as-text}]" --commands "[enlist:raw{$:/build-commands-as-text}]"
``` ```
``` ```

View File

@ -19,7 +19,7 @@ The following options are supported:
** ''yes'' will "explode" plugins into separate tiddler files and save them to the plugin directory within the wiki folder ** ''yes'' will "explode" plugins into separate tiddler files and save them to the plugin directory within the wiki folder
** ''no'' will suppress exploding plugins into their constituent tiddler files. It will save the plugin as a single JSON tiddler in the tiddlers folder ** ''no'' will suppress exploding plugins into their constituent tiddler files. It will save the plugin as a single JSON tiddler in the tiddlers folder
Note that both ''explodePlugins'' options will produce wiki folders that build the same exact same original wiki. The difference lies in how plugins are represented in the wiki folder. Note that both ''explodePlugins'' options will produce wiki folders that build the exact same original wiki. The difference lies in how plugins are represented in the wiki folder.
A common usage is to convert a TiddlyWiki HTML file into a wiki folder: A common usage is to convert a TiddlyWiki HTML file into a wiki folder:

View File

@ -1,5 +1,5 @@
title: $:/language/Help/server title: $:/language/Help/server
description: Provides an HTTP server interface to TiddlyWiki (deprecated in favour of the new listen command) description: (deprecated: see 'listen' command) Provides an HTTP server interface to TiddlyWiki
Legacy command to serve a wiki over HTTP. Legacy command to serve a wiki over HTTP.

View File

@ -30,7 +30,7 @@ Error/DeserializeOperator/UnknownDeserializer: Filter Error: Unknown deserialize
Error/Filter: Filter error Error/Filter: Filter error
Error/FilterSyntax: Syntax error in filter expression Error/FilterSyntax: Syntax error in filter expression
Error/FilterRunPrefix: Filter Error: Unknown prefix for filter run Error/FilterRunPrefix: Filter Error: Unknown prefix for filter run
Error/IsFilterOperator: Filter Error: Unknown operand for the 'is' filter operator Error/IsFilterOperator: Filter Error: Unknown parameter for the 'is' filter operator
Error/FormatFilterOperator: Filter Error: Unknown suffix for the 'format' filter operator Error/FormatFilterOperator: Filter Error: Unknown suffix for the 'format' filter operator
Error/LoadingPluginLibrary: Error loading plugin library Error/LoadingPluginLibrary: Error loading plugin library
Error/NetworkErrorAlert: `<h2>''Network Error''</h2>It looks like the connection to the server has been lost. This may indicate a problem with your network connection. Please attempt to restore network connectivity before continuing.<br><br>''Any unsaved changes will be automatically synchronised when connectivity is restored''.` Error/NetworkErrorAlert: `<h2>''Network Error''</h2>It looks like the connection to the server has been lost. This may indicate a problem with your network connection. Please attempt to restore network connectivity before continuing.<br><br>''Any unsaved changes will be automatically synchronised when connectivity is restored''.`
@ -70,7 +70,7 @@ No: No
OfficialPluginLibrary: Official ~TiddlyWiki Plugin Library OfficialPluginLibrary: Official ~TiddlyWiki Plugin Library
OfficialPluginLibrary/Hint: The official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team. OfficialPluginLibrary/Hint: The official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.
PageTemplate/Description: the default ~TiddlyWiki layout PageTemplate/Description: the default ~TiddlyWiki layout
PageTemplate/Name: Default ~PageTemplate PageTemplate/Name: Standard Layout
PluginReloadWarning: Please save {{$:/core/ui/Buttons/save-wiki}} and reload {{$:/core/ui/Buttons/refresh}} to allow changes to ~JavaScript plugins to take effect PluginReloadWarning: Please save {{$:/core/ui/Buttons/save-wiki}} and reload {{$:/core/ui/Buttons/refresh}} to allow changes to ~JavaScript plugins to take effect
RecentChanges/DateFormat: DDth MMM YYYY RecentChanges/DateFormat: DDth MMM YYYY
Shortcuts/Input/AdvancedSearch/Hint: Open the ~AdvancedSearch panel from within the sidebar search field Shortcuts/Input/AdvancedSearch/Hint: Open the ~AdvancedSearch panel from within the sidebar search field

View File

@ -6,6 +6,8 @@ Filter/Hint: Search via a [[filter expression|https://tiddlywiki.com/static/Filt
Filter/Matches: //<small><<resultCount>> matches</small>// Filter/Matches: //<small><<resultCount>> matches</small>//
Matches: //<small><<resultCount>> matches</small>// Matches: //<small><<resultCount>> matches</small>//
Matches/All: All matches: Matches/All: All matches:
Matches/NoMatch: //No match//
Matches/NoResult: //No search result//
Matches/Title: Title matches: Matches/Title: Title matches:
Search: Search Search: Search
Search/TooShort: Search text too short Search/TooShort: Search text too short

View File

@ -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>>

View File

@ -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

View File

@ -1,5 +1,5 @@
title: $:/language/Docs/Types/image/svg+xml title: $:/language/Docs/Types/image/svg+xml
description: Structured Vector Graphics image description: SVG image
name: image/svg+xml name: image/svg+xml
group: Image group: Image
group-sort: 1 group-sort: 1

View File

@ -1,5 +0,0 @@
title: $:/language/Docs/Types/image/x-icon
description: ICO format icon file
name: image/x-icon
group: Image
group-sort: 1

View File

@ -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

View File

@ -24,7 +24,7 @@ var Command = function(params,commander) {
Command.prototype.execute = function() { Command.prototype.execute = function() {
// Get the build targets defined in the wiki // Get the build targets defined in the wiki
var buildTargets = $tw.boot.wikiInfo.build; var buildTargets = $tw.boot.wikiInfo && $tw.boot.wikiInfo.build;
if(!buildTargets) { if(!buildTargets) {
return "No build targets defined"; return "No build targets defined";
} }

View File

@ -18,7 +18,7 @@ exports.info = {
name: "listen", name: "listen",
synchronous: true, synchronous: true,
namedParameterMode: true, namedParameterMode: true,
mandatoryParameters: [], mandatoryParameters: []
}; };
var Command = function(params,commander,callback) { var Command = function(params,commander,callback) {

View File

@ -27,33 +27,8 @@ var Command = function(params,commander,callback) {
Command.prototype.execute = function() { Command.prototype.execute = function() {
var wiki = this.commander.wiki, var wiki = this.commander.wiki,
fs = require("fs"),
path = require("path"),
upgradeLibraryTitle = this.params[0] || UPGRADE_LIBRARY_TITLE, upgradeLibraryTitle = this.params[0] || UPGRADE_LIBRARY_TITLE,
tiddlers = {}; tiddlers = $tw.utils.getAllPlugins();
// Collect up the library plugins
var collectPlugins = function(folder) {
var pluginFolders = $tw.utils.getSubdirectories(folder) || [];
for(var p=0; p<pluginFolders.length; p++) {
if(!$tw.boot.excludeRegExp.test(pluginFolders[p])) {
pluginFields = $tw.loadPluginFolder(path.resolve(folder,"./" + pluginFolders[p]));
if(pluginFields && pluginFields.title) {
tiddlers[pluginFields.title] = pluginFields;
}
}
}
},
collectPublisherPlugins = function(folder) {
var publisherFolders = $tw.utils.getSubdirectories(folder) || [];
for(var t=0; t<publisherFolders.length; t++) {
if(!$tw.boot.excludeRegExp.test(publisherFolders[t])) {
collectPlugins(path.resolve(folder,"./" + publisherFolders[t]));
}
}
};
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.pluginsPath,$tw.config.pluginsEnvVar),collectPublisherPlugins);
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.themesPath,$tw.config.themesEnvVar),collectPublisherPlugins);
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.languagesPath,$tw.config.languagesEnvVar),collectPlugins);
// Save the upgrade library tiddler // Save the upgrade library tiddler
var pluginFields = { var pluginFields = {
title: upgradeLibraryTitle, title: upgradeLibraryTitle,

View File

@ -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;
}; };

View File

@ -43,7 +43,9 @@ Saves individual tiddlers in their raw text or binary format to the specified fi
directory: path.resolve(self.commander.outputPath), directory: path.resolve(self.commander.outputPath),
pathFilters: [filenameFilter], pathFilters: [filenameFilter],
wiki: wiki, wiki: wiki,
fileInfo: {} fileInfo: {
overwrite: true
}
}); });
if(self.commander.verbose) { if(self.commander.verbose) {
console.log("Saving \"" + title + "\" to \"" + fileInfo.filepath + "\""); console.log("Saving \"" + title + "\" to \"" + fileInfo.filepath + "\"");

View File

@ -46,7 +46,7 @@ Command.prototype.execute = function() {
type = tiddler.fields.type || "text/vnd.tiddlywiki", type = tiddler.fields.type || "text/vnd.tiddlywiki",
contentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: "utf8"}, contentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: "utf8"},
filename = path.resolve(pathname,$tw.utils.encodeURIComponentExtended(title)); filename = path.resolve(pathname,$tw.utils.encodeURIComponentExtended(title));
fs.writeFileSync(filename,tiddler.fields.text,contentTypeInfo.encoding); fs.writeFileSync(filename,tiddler.fields.text || "",contentTypeInfo.encoding);
}); });
return null; return null;
}; };

View File

@ -176,7 +176,10 @@ WikiFolderMaker.prototype.saveCustomPlugin = function(pluginTiddler) {
this.saveJSONFile(directory + path.sep + "plugin.info",pluginInfo); this.saveJSONFile(directory + path.sep + "plugin.info",pluginInfo);
self.log("Writing " + directory + path.sep + "plugin.info: " + JSON.stringify(pluginInfo,null,$tw.config.preferences.jsonSpaces)); self.log("Writing " + directory + path.sep + "plugin.info: " + JSON.stringify(pluginInfo,null,$tw.config.preferences.jsonSpaces));
var pluginTiddlers = $tw.utils.parseJSONSafe(pluginTiddler.fields.text).tiddlers; // A hashmap of tiddlers in the plugin var pluginTiddlers = $tw.utils.parseJSONSafe(pluginTiddler.fields.text).tiddlers; // A hashmap of tiddlers in the plugin
$tw.utils.each(pluginTiddlers,function(tiddler) { $tw.utils.each(pluginTiddlers,function(tiddler,title) {
if(!tiddler.title) {
tiddler.title = title;
}
self.saveTiddler(directory,new $tw.Tiddler(tiddler)); self.saveTiddler(directory,new $tw.Tiddler(tiddler));
}); });
}; };

View File

@ -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(",");

View File

@ -60,7 +60,7 @@ function FramedEngine(options) {
this.domNode.value = this.value; this.domNode.value = this.value;
} }
// Set the attributes // Set the attributes
if(this.widget.editType) { if(this.widget.editType && this.widget.editTag !== "textarea") {
this.domNode.setAttribute("type",this.widget.editType); this.domNode.setAttribute("type",this.widget.editType);
} }
if(this.widget.editPlaceholder) { if(this.widget.editPlaceholder) {

View File

@ -34,7 +34,7 @@ function SimpleEngine(options) {
this.domNode.value = this.value; this.domNode.value = this.value;
} }
// Set the attributes // Set the attributes
if(this.widget.editType) { if(this.widget.editType && this.widget.editTag !== "textarea") {
this.domNode.setAttribute("type",this.widget.editType); this.domNode.setAttribute("type",this.widget.editType);
} }
if(this.widget.editPlaceholder) { if(this.widget.editPlaceholder) {

View File

@ -12,20 +12,27 @@ Text editor operation to excise the selection to a new tiddler
/*global $tw: false */ /*global $tw: false */
"use strict"; "use strict";
function isMarkdown(mediaType) {
return mediaType === 'text/markdown' || mediaType === 'text/x-markdown';
}
exports["excise"] = function(event,operation) { exports["excise"] = function(event,operation) {
var editTiddler = this.wiki.getTiddler(this.editTitle), var editTiddler = this.wiki.getTiddler(this.editTitle),
editTiddlerTitle = this.editTitle; editTiddlerTitle = this.editTitle,
wikiLinks = !isMarkdown(editTiddler.fields.type),
excisionBaseTitle = $tw.language.getString("Buttons/Excise/DefaultTitle");
if(editTiddler && editTiddler.fields["draft.of"]) { if(editTiddler && editTiddler.fields["draft.of"]) {
editTiddlerTitle = editTiddler.fields["draft.of"]; editTiddlerTitle = editTiddler.fields["draft.of"];
} }
var excisionTitle = event.paramObject.title || this.wiki.generateNewTitle("New Excision"); var excisionTitle = event.paramObject.title || this.wiki.generateNewTitle(excisionBaseTitle);
this.wiki.addTiddler(new $tw.Tiddler( this.wiki.addTiddler(new $tw.Tiddler(
this.wiki.getCreationFields(), this.wiki.getCreationFields(),
this.wiki.getModificationFields(), this.wiki.getModificationFields(),
{ {
title: excisionTitle, title: excisionTitle,
text: operation.selection, text: operation.selection,
tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : [] tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : [],
type: editTiddler.fields.type
} }
)); ));
operation.replacement = excisionTitle; operation.replacement = excisionTitle;
@ -34,7 +41,8 @@ exports["excise"] = function(event,operation) {
operation.replacement = "{{" + operation.replacement+ "}}"; operation.replacement = "{{" + operation.replacement+ "}}";
break; break;
case "link": case "link":
operation.replacement = "[[" + operation.replacement+ "]]"; operation.replacement = wikiLinks ? "[[" + operation.replacement+ "]]"
: ("[" + operation.replacement + "](<#" + operation.replacement + ">)");
break; break;
case "macro": case "macro":
operation.replacement = "<<" + (event.paramObject.macro || "translink") + " \"\"\"" + operation.replacement + "\"\"\">>"; operation.replacement = "<<" + (event.paramObject.macro || "translink") + " \"\"\"" + operation.replacement + "\"\"\">>";

View File

@ -13,37 +13,125 @@ Text editor operation to wrap the selection with the specified prefix and suffix
"use strict"; "use strict";
exports["wrap-selection"] = function(event,operation) { exports["wrap-selection"] = function(event,operation) {
if(operation.selStart === operation.selEnd) { var o = operation,
// No selection; check if we're within the prefix/suffix prefix = event.paramObject.prefix,
if(operation.text.substring(operation.selStart - event.paramObject.prefix.length,operation.selStart + event.paramObject.suffix.length) === event.paramObject.prefix + event.paramObject.suffix) { suffix = event.paramObject.suffix,
trimSelection = event.paramObject.trimSelection || "no",
selLength = o.selEnd - o.selStart;
// This function detects, if trailing spaces are part of the selection __and__ if the user wants to handle them
// Returns "yes", "start", "end", "no" (default)
// yes .. there are trailing spaces at both ends
// start .. there are trailing spaces at the start
// end .. there are trailing spaces at the end
// no .. no trailing spaces are taken into account
var trailingSpaceAt = function(sel) {
var _start,
_end,
result;
// trimSelection is a user parameter, which this evaluations takes into account
switch(trimSelection) {
case "end":
result = (sel.trimEnd().length !== selLength) ? "end" : "no";
break;
case "yes":
_start = sel.trimStart().length !== selLength;
_end = sel.trimEnd().length !== selLength;
result = (_start && _end) ? "yes" : (_start) ? "start" : (_end) ? "end" : "no";
break;
case "start":
result = (sel.trimStart().length !== selLength) ? "start" : "no";
break;
default:
result = "no";
break;
}
return result;
}
function togglePrefixSuffix() {
if(o.text.substring(o.selStart - prefix.length, o.selStart + suffix.length) === prefix + suffix) {
// Remove the prefix and suffix // Remove the prefix and suffix
operation.cutStart = operation.selStart - event.paramObject.prefix.length; o.cutStart = o.selStart - prefix.length;
operation.cutEnd = operation.selEnd + event.paramObject.suffix.length; o.cutEnd = o.selEnd + suffix.length;
operation.replacement = ""; o.replacement = "";
operation.newSelStart = operation.cutStart; o.newSelStart = o.cutStart;
operation.newSelEnd = operation.newSelStart; o.newSelEnd = o.newSelStart;
} else { } else {
// Wrap the cursor instead // Wrap the cursor instead
operation.cutStart = operation.selStart; o.cutStart = o.selStart;
operation.cutEnd = operation.selEnd; o.cutEnd = o.selEnd;
operation.replacement = event.paramObject.prefix + event.paramObject.suffix; o.replacement = prefix + suffix;
operation.newSelStart = operation.selStart + event.paramObject.prefix.length; o.newSelStart = o.selStart + prefix.length;
operation.newSelEnd = operation.newSelStart; o.newSelEnd = o.newSelStart;
} }
} else if(operation.text.substring(operation.selStart,operation.selStart + event.paramObject.prefix.length) === event.paramObject.prefix && operation.text.substring(operation.selEnd - event.paramObject.suffix.length,operation.selEnd) === event.paramObject.suffix) { }
// options: lenPrefix, lenSuffix
function removePrefixSuffix(options) {
options = options || {};
var _lenPrefix = options.lenPrefix || 0;
var _lenSuffix = options.lenSuffix || 0;
o.cutStart = o.selStart - _lenPrefix;
o.cutEnd = o.selEnd + _lenSuffix;
o.replacement = (_lenPrefix || _lenSuffix) ? o.selection : o.selection.substring(prefix.length, o.selection.length - suffix.length);
o.newSelStart = o.cutStart;
o.newSelEnd = o.cutStart + o.replacement.length;
}
function addPrefixSuffix() {
// remove trailing space if requested
switch(trailingSpaceAt(o.selection)) {
case "no":
// has no trailing spaces
o.cutStart = o.selStart;
o.cutEnd = o.selEnd;
o.replacement = prefix + o.selection + suffix;
o.newSelStart = o.selStart;
o.newSelEnd = o.selStart + o.replacement.length;
break;
case "yes":
// handle both ends
o.cutStart = o.selEnd - (o.selection.trimStart().length);
o.cutEnd = o.selection.trimEnd().length + o.selStart;
o.replacement = prefix + o.selection.trim() + suffix;
o.newSelStart = o.cutStart;
o.newSelEnd = o.cutStart + o.replacement.length;
break;
case "start":
// handle leading
o.cutStart = o.selEnd - (o.selection.trimStart().length);
o.cutEnd = o.selEnd;
o.replacement = prefix + o.selection.trimStart() + suffix;
o.newSelStart = o.cutStart;
o.newSelEnd = o.cutStart + o.replacement.length;
break;
case "end":
// handle trailing
o.cutStart = o.selStart;
o.cutEnd = o.selection.trimEnd().length + o.selStart;
o.replacement = prefix + o.selection.trimEnd() + suffix;
o.newSelStart = o.selStart;
o.newSelEnd = o.selStart + o.replacement.length;
break;
}
}
if(o.selStart === o.selEnd) {
// No selection; Create prefix and suffix. Set cursor in between them: ""|""
togglePrefixSuffix();
} else if(o.text.substring(o.selStart, o.selStart + prefix.length) === prefix &&
o.text.substring(o.selEnd - suffix.length,o.selEnd) === suffix) {
// Prefix and suffix are already present, so remove them // Prefix and suffix are already present, so remove them
operation.cutStart = operation.selStart; removePrefixSuffix();
operation.cutEnd = operation.selEnd; } else if(o.text.substring(o.selStart - prefix.length, o.selStart) === prefix &&
operation.replacement = operation.selection.substring(event.paramObject.prefix.length,operation.selection.length - event.paramObject.suffix.length); o.text.substring(o.selEnd, o.selEnd + suffix.length) === suffix) {
operation.newSelStart = operation.selStart; // Prefix and suffix are present BUT not selected -> remove them
operation.newSelEnd = operation.selStart + operation.replacement.length; removePrefixSuffix({"lenPrefix": prefix.length, "lenSuffix": suffix.length});
} else { } else {
// Add the prefix and suffix // Add the prefix and suffix
operation.cutStart = operation.selStart; addPrefixSuffix();
operation.cutEnd = operation.selEnd;
operation.replacement = event.paramObject.prefix + operation.selection + event.paramObject.suffix;
operation.newSelStart = operation.selStart;
operation.newSelEnd = operation.selStart + operation.replacement.length;
} }
}; };

View File

@ -28,12 +28,8 @@ function getAllFilterOperators() {
Export our filter function Export our filter function
*/ */
exports.all = function(source,operator,options) { exports.all = function(source,operator,options) {
// Get our suboperators
var allFilterOperators = getAllFilterOperators();
// Cycle through the suboperators accumulating their results
var results = new $tw.utils.LinkedList(),
subops = operator.operand.split("+");
// Check for common optimisations // Check for common optimisations
var subops = operator.operand.split("+");
if(subops.length === 1 && subops[0] === "") { if(subops.length === 1 && subops[0] === "") {
return source; return source;
} else if(subops.length === 1 && subops[0] === "tiddlers") { } else if(subops.length === 1 && subops[0] === "tiddlers") {
@ -46,6 +42,10 @@ exports.all = function(source,operator,options) {
return options.wiki.eachShadowPlusTiddlers; return options.wiki.eachShadowPlusTiddlers;
} }
// Do it the hard way // Do it the hard way
// Get our suboperators
var allFilterOperators = getAllFilterOperators();
// Cycle through the suboperators accumulating their results
var results = new $tw.utils.LinkedList();
for(var t=0; t<subops.length; t++) { for(var t=0; t<subops.length; t++) {
var subop = allFilterOperators[subops[t]]; var subop = allFilterOperators[subops[t]];
if(subop) { if(subop) {

View File

@ -0,0 +1,26 @@
/*\
title: $:/core/modules/filters/backtranscludes.js
type: application/javascript
module-type: filteroperator
Filter operator for returning all the backtranscludes from a tiddler
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.backtranscludes = function(source,operator,options) {
var results = new $tw.utils.LinkedList();
source(function(tiddler,title) {
results.pushTop(options.wiki.getTiddlerBacktranscludes(title));
});
return results.makeTiddlerIterator(options.wiki);
};
})();

View File

@ -14,12 +14,9 @@ Filter operators for cryptography, using the Stanford JavaScript library
exports.sha256 = function(source,operator,options) { exports.sha256 = function(source,operator,options) {
var results = [], var results = [],
length = parseInt(operator.operand,10) || 20, length = parseInt(operator.operand,10) || 20;
sha256 = function(text) {
return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(text)).substr(0,length);
};
source(function(tiddler,title) { source(function(tiddler,title) {
results.push(sha256(title)); results.push($tw.utils.sha256(title,{length: length}));
}); });
return results; return results;
}; };

View File

@ -18,16 +18,20 @@ Export our filter functions
exports.decodebase64 = function(source,operator,options) { exports.decodebase64 = function(source,operator,options) {
var results = []; var results = [];
var binary = operator.suffixes && operator.suffixes[0].indexOf("binary") !== -1;
var urlsafe = operator.suffixes && operator.suffixes[0].indexOf("urlsafe") !== -1;
source(function(tiddler,title) { source(function(tiddler,title) {
results.push($tw.utils.base64Decode(title)); results.push($tw.utils.base64Decode(title,binary,urlsafe));
}); });
return results; return results;
}; };
exports.encodebase64 = function(source,operator,options) { exports.encodebase64 = function(source,operator,options) {
var results = []; var results = [];
var binary = operator.suffixes && operator.suffixes[0].indexOf("binary") !== -1;
var urlsafe = operator.suffixes && operator.suffixes[0].indexOf("urlsafe") !== -1;
source(function(tiddler,title) { source(function(tiddler,title) {
results.push($tw.utils.base64Encode(title)); results.push($tw.utils.base64Encode(title,binary,urlsafe));
}); });
return results; return results;
}; };

View File

@ -68,6 +68,54 @@ exports["jsontype"] = function(source,operator,options) {
return results; return results;
}; };
exports["jsonset"] = function(source,operator,options) {
var suffixes = operator.suffixes || [],
type = suffixes[0] && suffixes[0][0],
indexes = operator.operands.slice(0,-1),
value = operator.operands[operator.operands.length - 1],
results = [];
if(operator.operands.length === 1 && operator.operands[0] === "") {
value = undefined; // Prevents the value from being assigned
}
switch(type) {
case "string":
// Use value unchanged
break;
case "boolean":
value = (value === "true" ? true : (value === "false" ? false : undefined));
break;
case "number":
value = $tw.utils.parseNumber(value);
break;
case "array":
indexes = operator.operands;
value = [];
break;
case "object":
indexes = operator.operands;
value = {};
break;
case "null":
indexes = operator.operands;
value = null;
break;
case "json":
value = $tw.utils.parseJSONSafe(value,function() {return undefined;});
break;
default:
// Use value unchanged
break;
}
source(function(tiddler,title) {
var data = $tw.utils.parseJSONSafe(title,title);
if(data) {
data = setDataItem(data,indexes,value);
results.push(JSON.stringify(data));
}
});
return results;
};
/* /*
Given a JSON data structure and an array of index strings, return an array of the string representation of the values at the end of the index chain, or "undefined" if any of the index strings are invalid Given a JSON data structure and an array of index strings, return an array of the string representation of the values at the end of the index chain, or "undefined" if any of the index strings are invalid
*/ */
@ -165,6 +213,18 @@ function getDataItemType(data,indexes) {
} }
} }
function getItemAtIndex(item,index) {
if($tw.utils.hop(item,index)) {
return item[index];
} else if($tw.utils.isArray(item)) {
index = $tw.utils.parseInt(index);
if(index < 0) { index = index + item.length };
return item[index]; // Will be undefined if index was out-of-bounds
} else {
return undefined;
}
}
/* /*
Given a JSON data structure and an array of index strings, return the value at the end of the index chain, or "undefined" if any of the index strings are invalid Given a JSON data structure and an array of index strings, return the value at the end of the index chain, or "undefined" if any of the index strings are invalid
*/ */
@ -177,7 +237,7 @@ function getDataItem(data,indexes) {
for(var i=0; i<indexes.length; i++) { for(var i=0; i<indexes.length; i++) {
if(item !== undefined) { if(item !== undefined) {
if(item !== null && ["number","string","boolean"].indexOf(typeof item) === -1) { if(item !== null && ["number","string","boolean"].indexOf(typeof item) === -1) {
item = item[indexes[i]]; item = getItemAtIndex(item,indexes[i]);
} else { } else {
item = undefined; item = undefined;
} }
@ -186,5 +246,39 @@ function getDataItem(data,indexes) {
return item; return item;
} }
/*
Given a JSON data structure, an array of index strings and a value, return the data structure with the value added at the end of the index chain. If any of the index strings are invalid then the JSON data structure is returned unmodified. If the root item is targetted then a different data object will be returned
*/
function setDataItem(data,indexes,value) {
// Ignore attempts to assign undefined
if(value === undefined) {
return data;
}
// Check for the root item
if(indexes.length === 0 || (indexes.length === 1 && indexes[0] === "")) {
return value;
}
// Traverse the JSON data structure using the index chain
var current = data;
for(var i = 0; i < indexes.length - 1; i++) {
current = getItemAtIndex(current,indexes[i]);
if(current === undefined) {
// Return the original JSON data structure if any of the index strings are invalid
return data;
}
}
// Add the value to the end of the index chain
var lastIndex = indexes[indexes.length - 1];
if($tw.utils.isArray(current)) {
lastIndex = $tw.utils.parseInt(lastIndex);
if(lastIndex < 0) { lastIndex = lastIndex + current.length };
}
// Only set indexes on objects and arrays
if(typeof current === "object") {
current[lastIndex] = value;
}
return data;
}
})(); })();

View File

@ -58,6 +58,7 @@ Last entry/entries in list
exports.last = function(source,operator,options) { exports.last = function(source,operator,options) {
var count = $tw.utils.getInt(operator.operand,1), var count = $tw.utils.getInt(operator.operand,1),
results = []; results = [];
if(count === 0) return results;
source(function(tiddler,title) { source(function(tiddler,title) {
results.push(title); results.push(title);
}); });

View File

@ -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

View File

@ -0,0 +1,26 @@
/*\
title: $:/core/modules/filters/transcludes.js
type: application/javascript
module-type: filteroperator
Filter operator for returning all the transcludes from a tiddler
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.transcludes = function(source,operator,options) {
var results = new $tw.utils.LinkedList();
source(function(tiddler,title) {
results.pushTop(options.wiki.getTiddlerTranscludes(title));
});
return results.makeTiddlerIterator(options.wiki);
};
})();

View File

@ -202,7 +202,7 @@ Extended filter operators to manipulate the current list.
} }
if(resultsIndex !== -1) { if(resultsIndex !== -1) {
i = i + step; i = i + step;
nextOperandIndex = (i < opLength ? i : i - opLength); nextOperandIndex = (i < opLength ? i : i % opLength);
if(operands.length > 1) { if(operands.length > 1) {
results.splice(resultsIndex,1,operands[nextOperandIndex]); results.splice(resultsIndex,1,operands[nextOperandIndex]);
} else { } else {

View File

@ -0,0 +1,122 @@
/*\
title: $:/core/modules/indexers/back-indexer.js
type: application/javascript
module-type: indexer
By parsing the tiddler text, indexes the tiddlers' back links, back transclusions, block level back links.
\*/
function BackIndexer(wiki) {
this.wiki = wiki;
}
BackIndexer.prototype.init = function() {
this.subIndexers = {
link: new BackSubIndexer(this,"extractLinks"),
transclude: new BackSubIndexer(this,"extractTranscludes"),
};
};
BackIndexer.prototype.rebuild = function() {
$tw.utils.each(this.subIndexers,function(subIndexer) {
subIndexer.rebuild();
});
};
BackIndexer.prototype.update = function(updateDescriptor) {
$tw.utils.each(this.subIndexers,function(subIndexer) {
subIndexer.update(updateDescriptor);
});
};
function BackSubIndexer(indexer,extractor) {
this.wiki = indexer.wiki;
this.indexer = indexer;
this.extractor = extractor;
/**
* {
* [target title, e.g. tiddler title being linked to]:
* {
* [source title, e.g. tiddler title that has link syntax in its text]: true
* }
* }
*/
this.index = null;
}
BackSubIndexer.prototype.init = function() {
// lazy init until first lookup
this.index = null;
}
BackSubIndexer.prototype._init = function() {
this.index = Object.create(null);
var self = this;
this.wiki.forEachTiddler(function(sourceTitle,tiddler) {
var newTargets = self._getTarget(tiddler);
$tw.utils.each(newTargets, function(target) {
if(!self.index[target]) {
self.index[target] = Object.create(null);
}
self.index[target][sourceTitle] = true;
});
});
}
BackSubIndexer.prototype.rebuild = function() {
this.index = null;
}
/*
* Get things that is being referenced in the text, e.g. tiddler names in the link syntax.
*/
BackSubIndexer.prototype._getTarget = function(tiddler) {
if(this.wiki.isBinaryTiddler(tiddler.fields.text)) {
return [];
}
var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {});
if(parser) {
return this.wiki[this.extractor](parser.tree, tiddler.fields.title);
}
return [];
}
BackSubIndexer.prototype.update = function(updateDescriptor) {
// lazy init/update until first lookup
if(!this.index) {
return;
}
var newTargets = [],
oldTargets = [],
self = this;
if(updateDescriptor.old.exists) {
oldTargets = this._getTarget(updateDescriptor.old.tiddler);
}
if(updateDescriptor.new.exists) {
newTargets = this._getTarget(updateDescriptor.new.tiddler);
}
$tw.utils.each(oldTargets,function(target) {
if(self.index[target]) {
delete self.index[target][updateDescriptor.old.tiddler.fields.title];
}
});
$tw.utils.each(newTargets,function(target) {
if(!self.index[target]) {
self.index[target] = Object.create(null);
}
self.index[target][updateDescriptor.new.tiddler.fields.title] = true;
});
}
BackSubIndexer.prototype.lookup = function(title) {
if(!this.index) {
this._init();
}
if(this.index[title]) {
return Object.keys(this.index[title]);
} else {
return [];
}
}
exports.BackIndexer = BackIndexer;

View File

@ -1,86 +0,0 @@
/*\
title: $:/core/modules/indexers/backlinks-indexer.js
type: application/javascript
module-type: indexer
Indexes the tiddlers' backlinks
\*/
(function(){
/*jslint node: true, browser: true */
/*global modules: false */
"use strict";
function BacklinksIndexer(wiki) {
this.wiki = wiki;
}
BacklinksIndexer.prototype.init = function() {
this.index = null;
}
BacklinksIndexer.prototype.rebuild = function() {
this.index = null;
}
BacklinksIndexer.prototype._getLinks = function(tiddler) {
var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {});
if(parser) {
return this.wiki.extractLinks(parser.tree);
}
return [];
}
BacklinksIndexer.prototype.update = function(updateDescriptor) {
if(!this.index) {
return;
}
var newLinks = [],
oldLinks = [],
self = this;
if(updateDescriptor.old.exists) {
oldLinks = this._getLinks(updateDescriptor.old.tiddler);
}
if(updateDescriptor.new.exists) {
newLinks = this._getLinks(updateDescriptor.new.tiddler);
}
$tw.utils.each(oldLinks,function(link) {
if(self.index[link]) {
delete self.index[link][updateDescriptor.old.tiddler.fields.title];
}
});
$tw.utils.each(newLinks,function(link) {
if(!self.index[link]) {
self.index[link] = Object.create(null);
}
self.index[link][updateDescriptor.new.tiddler.fields.title] = true;
});
}
BacklinksIndexer.prototype.lookup = function(title) {
if(!this.index) {
this.index = Object.create(null);
var self = this;
this.wiki.forEachTiddler(function(title,tiddler) {
var links = self._getLinks(tiddler);
$tw.utils.each(links, function(link) {
if(!self.index[link]) {
self.index[link] = Object.create(null);
}
self.index[link][title] = true;
});
});
}
if(this.index[title]) {
return Object.keys(this.index[title]);
} else {
return [];
}
}
exports.BacklinksIndexer = BacklinksIndexer;
})();

View File

@ -35,9 +35,11 @@ exports.run = function(filter,format) {
// Collect all the fields // Collect all the fields
for(t=0;t<tiddlers.length; t++) { for(t=0;t<tiddlers.length; t++) {
tiddler = this.wiki.getTiddler(tiddlers[t]); tiddler = this.wiki.getTiddler(tiddlers[t]);
for(f in tiddler.fields) { if(tiddler) {
if(fields.indexOf(f) === -1) { for(f in tiddler.fields) {
fields.push(f); if(fields.indexOf(f) === -1) {
fields.push(f);
}
} }
} }
} }
@ -60,8 +62,10 @@ exports.run = function(filter,format) {
for(var t=0;t<tiddlers.length; t++) { for(var t=0;t<tiddlers.length; t++) {
row = []; row = [];
tiddler = this.wiki.getTiddler(tiddlers[t]); tiddler = this.wiki.getTiddler(tiddlers[t]);
for(f=0; f<fields.length; f++) { if(tiddler) {
row.push(quoteAndEscape(tiddler ? tiddler.getFieldString(fields[f]) || "" : "")); for(f=0; f<fields.length; f++) {
row.push(quoteAndEscape(tiddler ? tiddler.getFieldString(fields[f]) || "" : ""));
}
} }
output.push(row.join(",")); output.push(row.join(","));
} }

View File

@ -16,20 +16,22 @@ exports.name = "unusedtitle";
exports.params = [ exports.params = [
{name: "baseName"}, {name: "baseName"},
{name: "separator"}, {name: "separator"},
{name: "template"} {name: "template"},
{name: "startCount"}
]; ];
/* /*
Run the macro Run the macro
*/ */
exports.run = function(baseName,separator,template) { exports.run = function(baseName,separator,template,startCount) {
separator = separator || " "; separator = separator || " ";
startCount = startCount || 0;
if(!baseName) { if(!baseName) {
baseName = $tw.language.getString("DefaultNewTiddlerTitle"); baseName = $tw.language.getString("DefaultNewTiddlerTitle");
} }
// $tw.wiki.generateNewTitle = function(baseTitle,options) // $tw.wiki.generateNewTitle = function(baseTitle,options)
// options.prefix must be a string! // options.prefix must be a string!
return this.wiki.generateNewTitle(baseName, {"prefix": separator, "template": template}); return this.wiki.generateNewTitle(baseName, {"prefix": separator, "template": template, "startCount": startCount});
}; };
})(); })();

View File

@ -14,10 +14,12 @@ The plain text parser processes blocks of source text into a degenerate parse tr
var TextParser = function(type,text,options) { var TextParser = function(type,text,options) {
this.tree = [{ this.tree = [{
type: "codeblock", type: "genesis",
attributes: { attributes: {
code: {type: "string", value: text}, $type: {name: "$type", type: "string", value: "$codeblock"},
language: {type: "string", value: type} code: {name: "code", type: "string", value: text},
language: {name: "language", type: "string", value: type},
$remappable: {name: "$remappable", type:"string", value: "no"}
} }
}]; }];
this.source = text; this.source = text;
@ -32,4 +34,3 @@ exports["text/css"] = TextParser;
exports["application/x-tiddler-dictionary"] = TextParser; exports["application/x-tiddler-dictionary"] = TextParser;
})(); })();

View File

@ -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}
} }
}]; }];
}; };

View File

@ -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
}] }]
}]; }];
}; };

View File

@ -0,0 +1,120 @@
/*\
title: $:/core/modules/parsers/wikiparser/rules/conditional.js
type: application/javascript
module-type: wikirule
Conditional shortcut syntax
```
This is a <%if [{something}] %>Elephant<%elseif [{else}] %>Pelican<%else%>Crocodile<%endif%>
```
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.name = "conditional";
exports.types = {inline: true, block: true};
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /\<\%\s*if\s+/mg;
this.terminateIfRegExp = /\%\>/mg;
};
exports.findNextMatch = function(startPos) {
// Look for the next <%if shortcut
this.matchRegExp.lastIndex = startPos;
this.match = this.matchRegExp.exec(this.parser.source);
// If not found then return no match
if(!this.match) {
return undefined;
}
// Check for the next %>
this.terminateIfRegExp.lastIndex = this.match.index;
this.terminateIfMatch = this.terminateIfRegExp.exec(this.parser.source);
// If not found then return no match
if(!this.terminateIfMatch) {
return undefined;
}
// Return the position at which the construction was found
return this.match.index;
};
/*
Parse the most recent match
*/
exports.parse = function() {
// Get the filter condition
var filterCondition = this.parser.source.substring(this.match.index + this.match[0].length,this.terminateIfMatch.index);
// Advance the parser position to past the %>
this.parser.pos = this.terminateIfMatch.index + this.terminateIfMatch[0].length;
// Parse the if clause
return this.parseIfClause(filterCondition);
};
exports.parseIfClause = function(filterCondition) {
// Create the list widget
var listWidget = {
type: "list",
tag: "$list",
isBlock: this.is.block,
children: [
{
type: "list-template",
tag: "$list-template"
},
{
type: "list-empty",
tag: "$list-empty"
}
]
};
$tw.utils.addAttributeToParseTreeNode(listWidget,"filter",filterCondition);
$tw.utils.addAttributeToParseTreeNode(listWidget,"variable","condition");
$tw.utils.addAttributeToParseTreeNode(listWidget,"limit","1");
// Check for an immediately following double linebreak
var hasLineBreak = !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/g);
// Parse the body looking for else or endif
var reEndString = "\\<\\%\\s*(endif)\\s*\\%\\>|\\<\\%\\s*(else)\\s*\\%\\>|\\<\\%\\s*(elseif)\\s+([\\s\\S]+?)\\%\\>",
ex;
if(hasLineBreak) {
ex = this.parser.parseBlocksTerminatedExtended(reEndString);
} else {
var reEnd = new RegExp(reEndString,"mg");
ex = this.parser.parseInlineRunTerminatedExtended(reEnd,{eatTerminator: true});
}
// Put the body into the list template
listWidget.children[0].children = ex.tree;
// Check for an else or elseif
if(ex.match) {
if(ex.match[1] === "endif") {
// Nothing to do if we just found an endif
} else if(ex.match[2] === "else") {
// Check for an immediately following double linebreak
hasLineBreak = !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/g);
// If we found an else then we need to parse the body looking for the endif
var reEndString = "\\<\\%\\s*(endif)\\s*\\%\\>",
ex;
if(hasLineBreak) {
ex = this.parser.parseBlocksTerminatedExtended(reEndString);
} else {
var reEnd = new RegExp(reEndString,"mg");
ex = this.parser.parseInlineRunTerminatedExtended(reEnd,{eatTerminator: true});
}
// Put the parsed content inside the list empty template
listWidget.children[1].children = ex.tree;
} else if(ex.match[3] === "elseif") {
// Parse the elseif clause by reusing this parser, passing the new filter condition
listWidget.children[1].children = this.parseIfClause(ex.match[4]);
}
}
// Return the parse tree node
return [listWidget];
};
})();

View File

@ -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
}] }]
}]; }];
} }

View File

@ -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];
}; };

View File

@ -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];
}; };

View File

@ -35,7 +35,7 @@ Instantiate parse rule
exports.init = function(parser) { exports.init = function(parser) {
this.parser = parser; this.parser = parser;
// Regexp to match // Regexp to match
this.matchRegExp = /^\\(function|procedure|widget)\s+([^(\s]+)\((\s*([^)]*))?\)(\s*\r?\n)?/mg; this.matchRegExp = /\\(function|procedure|widget)\s+([^(\s]+)\((\s*([^)]*))?\)(\s*\r?\n)?/mg;
}; };
/* /*
@ -49,11 +49,11 @@ exports.parse = function() {
if(this.match[3]) { if(this.match[3]) {
params = $tw.utils.parseParameterDefinition(this.match[4]); params = $tw.utils.parseParameterDefinition(this.match[4]);
} }
// Is this a multiline definition? // Is the remainder of the line blank after the parameter close paren?
var reEnd; var reEnd;
if(this.match[5]) { if(this.match[5]) {
// If so, the end of the body is marked with \end // If so, it is a multiline definition and the end of the body is marked with \end
reEnd = new RegExp("(\\r?\\n\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg"); reEnd = new RegExp("((:?^|\\r?\\n)[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg");
} else { } else {
// Otherwise, the end of the definition is marked by the end of the line // Otherwise, the end of the definition is marked by the end of the line
reEnd = /($|\r?\n)/mg; reEnd = /($|\r?\n)/mg;

View File

@ -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]);

View File

@ -30,7 +30,9 @@ 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
@ -38,7 +40,7 @@ exports.parse = function() {
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
}]; }];

View File

@ -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];

View File

@ -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;

View File

@ -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: []
}]; }];

View File

@ -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();

View File

@ -54,11 +54,11 @@ exports.parse = function() {
paramMatch = reParam.exec(paramString); paramMatch = reParam.exec(paramString);
} }
} }
// Is this a multiline definition? // Is the remainder of the \define line blank after the parameter close paren?
var reEnd; var reEnd;
if(this.match[3]) { if(this.match[3]) {
// If so, the end of the body is marked with \end // If so, it is a multiline definition and the end of the body is marked with \end
reEnd = new RegExp("(\\r?\\n[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg"); reEnd = new RegExp("((?:^|\\r?\\n)[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
} else { } else {
// Otherwise, the end of the definition is marked by the end of the line // Otherwise, the end of the definition is marked by the end of the line
reEnd = /($|\r?\n)/mg; reEnd = /($|\r?\n)/mg;

View File

@ -26,7 +26,7 @@ Instantiate parse rule
exports.init = function(parser) { exports.init = function(parser) {
this.parser = parser; this.parser = parser;
// Regexp to match // Regexp to match
this.matchRegExp = /^\\parameters\s*\(([^)]*)\)(\s*\r?\n)?/mg; this.matchRegExp = /\\parameters\s*\(([^)]*)\)(\s*\r?\n)?/mg;
}; };
/* /*

View File

@ -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

View File

@ -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
}] }]
}]; }];
} }

View File

@ -3,30 +3,7 @@ title: $:/core/modules/parsers/wikiparser/rules/quoteblock.js
type: application/javascript type: application/javascript
module-type: wikirule module-type: wikirule
Wiki text rule for quote blocks. For example: Wiki text rule for quote blocks.
```
<<<.optionalClass(es) optional cited from
a quote
<<<
<<<.optionalClass(es)
a quote
<<< optional cited from
```
Quotes can be quoted by putting more <s
```
<<<
Quote Level 1
<<<<
QuoteLevel 2
<<<<
<<<
```
\*/ \*/
(function(){ (function(){
@ -47,33 +24,42 @@ exports.init = function(parser) {
exports.parse = function() { exports.parse = function() {
var classes = ["tc-quote"]; var classes = ["tc-quote"];
// Get all the details of the match // Get all the details of the match
var reEndString = "^" + this.match[1] + "(?!<)"; var reEndString = "^\\s*" + this.match[1] + "(?!<)";
// 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
if(cite.length > 0) { if(cite.length > 0) {
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
@ -81,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
}]; }];

View File

@ -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,7 +42,9 @@ exports.parse = function() {
}, },
children: [{ children: [{
type: "text", type: "text",
text: match text: match,
start: start,
end: this.parser.pos
}] }]
}]; }];
} }

View File

@ -93,11 +93,12 @@ var processRow = function(prevColumns) {
} }
// Check whether this is a heading cell // Check whether this is a heading cell
var cell; var cell;
var start = this.parser.pos;
if(chr === "!") { if(chr === "!") {
this.parser.pos++; this.parser.pos++;
cell = {type: "element", tag: "th", children: []}; cell = {type: "element", tag: "th", start: start, children: []};
} else { } else {
cell = {type: "element", tag: "td", children: []}; cell = {type: "element", tag: "td", start: start, children: []};
} }
tree.push(cell); tree.push(cell);
// Record information about this cell // Record information about this cell
@ -121,6 +122,7 @@ var processRow = function(prevColumns) {
} }
// Move back to the closing `|` // Move back to the closing `|`
this.parser.pos--; this.parser.pos--;
cell.end = this.parser.pos;
} }
col++; col++;
cellRegExp.lastIndex = this.parser.pos; cellRegExp.lastIndex = this.parser.pos;
@ -150,7 +152,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;
} }
@ -169,15 +171,17 @@ exports.parse = function() {
rowContainer.children = this.parser.parseInlineRun(rowTermRegExp,{eatTerminator: true}); rowContainer.children = this.parser.parseInlineRun(rowTermRegExp,{eatTerminator: true});
} else { } else {
// Create the row // Create the row
var theRow = {type: "element", tag: "tr", children: []}; var theRow = {type: "element", tag: "tr", children: [], start: rowMatch.index};
$tw.utils.addClassToParseTreeNode(theRow,rowCount%2 ? "oddRow" : "evenRow"); $tw.utils.addClassToParseTreeNode(theRow,rowCount%2 ? "oddRow" : "evenRow");
rowContainer.children.push(theRow); rowContainer.children.push(theRow);
// Process the row // Process the row
theRow.children = processRow.call(this,prevColumns); theRow.children = processRow.call(this,prevColumns);
this.parser.pos = rowMatch.index + rowMatch[0].length; this.parser.pos = rowMatch.index + rowMatch[0].length;
theRow.end = this.parser.pos;
// 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);
} }

View File

@ -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
}] }]
}]; }];
} }

View File

@ -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
}] }]
}]; }];
}; };

View File

@ -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
}; };
@ -194,6 +199,7 @@ Parse any pragmas at the beginning of a block of parse text
WikiParser.prototype.parsePragmas = function() { WikiParser.prototype.parsePragmas = function() {
var currentTreeBranch = this.tree; var currentTreeBranch = this.tree;
while(true) { while(true) {
var savedPos = this.pos;
// Skip whitespace // Skip whitespace
this.skipWhitespace(); this.skipWhitespace();
// Check for the end of the text // Check for the end of the text
@ -204,16 +210,24 @@ WikiParser.prototype.parsePragmas = function() {
var nextMatch = this.findNextMatch(this.pragmaRules,this.pos); var nextMatch = this.findNextMatch(this.pragmaRules,this.pos);
// If not, just exit // If not, just exit
if(!nextMatch || nextMatch.matchIndex !== this.pos) { if(!nextMatch || nextMatch.matchIndex !== this.pos) {
this.pos = savedPos;
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 = [];
currentTreeBranch = subTree[0].children; currentTreeBranch = subTree[0].children;
} }
// Skip whitespace after the pragma
this.skipWhitespace();
} }
return currentTreeBranch; return currentTreeBranch;
}; };
@ -223,7 +237,7 @@ Parse a block from the current position
terminatorRegExpString: optional regular expression string that identifies the end of plain paragraphs. Must not include capturing parenthesis terminatorRegExpString: optional regular expression string that identifies the end of plain paragraphs. Must not include capturing parenthesis
*/ */
WikiParser.prototype.parseBlock = function(terminatorRegExpString) { WikiParser.prototype.parseBlock = function(terminatorRegExpString) {
var terminatorRegExp = terminatorRegExpString ? new RegExp("(" + terminatorRegExpString + "|\\r?\\n\\r?\\n)","mg") : /(\r?\n\r?\n)/mg; var terminatorRegExp = terminatorRegExpString ? new RegExp(terminatorRegExpString + "|\\r?\\n\\r?\\n","mg") : /(\r?\n\r?\n)/mg;
this.skipWhitespace(); this.skipWhitespace();
if(this.pos >= this.sourceLength) { if(this.pos >= this.sourceLength) {
return []; return [];
@ -231,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;
@ -264,11 +286,21 @@ WikiParser.prototype.parseBlocksUnterminated = function() {
}; };
/* /*
Parse blocks of text until a terminating regexp is encountered Parse blocks of text until a terminating regexp is encountered. Wrapper for parseBlocksTerminatedExtended that just returns the parse tree
*/ */
WikiParser.prototype.parseBlocksTerminated = function(terminatorRegExpString) { WikiParser.prototype.parseBlocksTerminated = function(terminatorRegExpString) {
var terminatorRegExp = new RegExp("(" + terminatorRegExpString + ")","mg"), var ex = this.parseBlocksTerminatedExtended(terminatorRegExpString);
tree = []; return ex.tree;
};
/*
Parse blocks of text until a terminating regexp is encountered
*/
WikiParser.prototype.parseBlocksTerminatedExtended = function(terminatorRegExpString) {
var terminatorRegExp = new RegExp(terminatorRegExpString,"mg"),
result = {
tree: []
};
// Skip any whitespace // Skip any whitespace
this.skipWhitespace(); this.skipWhitespace();
// Check if we've got the end marker // Check if we've got the end marker
@ -277,7 +309,7 @@ WikiParser.prototype.parseBlocksTerminated = function(terminatorRegExpString) {
// Parse the text into blocks // Parse the text into blocks
while(this.pos < this.sourceLength && !(match && match.index === this.pos)) { while(this.pos < this.sourceLength && !(match && match.index === this.pos)) {
var blocks = this.parseBlock(terminatorRegExpString); var blocks = this.parseBlock(terminatorRegExpString);
tree.push.apply(tree,blocks); result.tree.push.apply(result.tree,blocks);
// Skip any whitespace // Skip any whitespace
this.skipWhitespace(); this.skipWhitespace();
// Check if we've got the end marker // Check if we've got the end marker
@ -286,8 +318,9 @@ WikiParser.prototype.parseBlocksTerminated = function(terminatorRegExpString) {
} }
if(match && match.index === this.pos) { if(match && match.index === this.pos) {
this.pos = match.index + match[0].length; this.pos = match.index + match[0].length;
result.match = match;
} }
return tree; return result;
}; };
/* /*
@ -317,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);
} }
@ -330,6 +372,11 @@ WikiParser.prototype.parseInlineRunUnterminated = function(options) {
}; };
WikiParser.prototype.parseInlineRunTerminated = function(terminatorRegExp,options) { WikiParser.prototype.parseInlineRunTerminated = function(terminatorRegExp,options) {
var ex = this.parseInlineRunTerminatedExtended(terminatorRegExp,options);
return ex.tree;
};
WikiParser.prototype.parseInlineRunTerminatedExtended = function(terminatorRegExp,options) {
options = options || {}; options = options || {};
var tree = []; var tree = [];
// Find the next occurrence of the terminator // Find the next occurrence of the terminator
@ -349,7 +396,10 @@ WikiParser.prototype.parseInlineRunTerminated = function(terminatorRegExp,option
if(options.eatTerminator) { if(options.eatTerminator) {
this.pos += terminatorMatch[0].length; this.pos += terminatorMatch[0].length;
} }
return tree; return {
match: terminatorMatch,
tree: tree
};
} }
} }
// Process any inline rule, along with the text preceding it // Process any inline rule, along with the text preceding it
@ -360,7 +410,15 @@ WikiParser.prototype.parseInlineRunTerminated = function(terminatorRegExp,option
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
@ -373,7 +431,9 @@ WikiParser.prototype.parseInlineRunTerminated = function(terminatorRegExp,option
this.pushTextWidget(tree,this.source.substr(this.pos),this.pos,this.sourceLength); this.pushTextWidget(tree,this.source.substr(this.pos),this.pos,this.sourceLength);
} }
this.pos = this.sourceLength; this.pos = this.sourceLength;
return tree; return {
tree: tree
};
}; };
/* /*
@ -437,4 +497,3 @@ WikiParser.prototype.amendRules = function(type,names) {
exports["text/vnd.tiddlywiki"] = WikiParser; exports["text/vnd.tiddlywiki"] = WikiParser;
})(); })();

View File

@ -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);

View File

@ -31,7 +31,7 @@ GitHubSaver.prototype.save = function(text,method,callback) {
headers = { headers = {
"Accept": "application/vnd.github.v3+json", "Accept": "application/vnd.github.v3+json",
"Content-Type": "application/json;charset=UTF-8", "Content-Type": "application/json;charset=UTF-8",
"Authorization": "Basic " + window.btoa(username + ":" + password), "Authorization": "Basic " + $tw.utils.base64Encode(username + ":" + password),
"If-None-Match": "" "If-None-Match": ""
}; };
// Bail if we don't have everything we need // Bail if we don't have everything we need

View File

@ -20,7 +20,7 @@ Retrieve ETag if available
*/ */
var retrieveETag = function(self) { var retrieveETag = function(self) {
var headers = { var headers = {
Accept: "*/*;charset=UTF-8" Accept: "*/*"
}; };
$tw.utils.httpRequest({ $tw.utils.httpRequest({
url: self.uri(), url: self.uri(),
@ -48,14 +48,14 @@ 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",
callback: function(err,data,xhr) { callback: function(err,data,xhr) {
// Check DAV header http://www.webdav.org/specs/rfc2518.html#rfc.section.9.1 // Check DAV header http://www.webdav.org/specs/rfc2518.html#rfc.section.9.1
if(!err) { if(!err) {
self.serverAcceptsPuts = xhr.status === 200 && !!xhr.getResponseHeader("dav"); self.serverAcceptsPuts = xhr.status >= 200 && xhr.status < 300 && !!xhr.getResponseHeader("dav");
} }
} }
}); });

View File

@ -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;
} }
}; };

View File

@ -140,6 +140,11 @@ function sendResponse(request,response,statusCode,headers,data,encoding) {
return; return;
} }
} }
} else {
// RFC 7231, 6.1. Overview of Status Codes:
// Browser clients may cache 200, 203, 204, 206, 300, 301,
// 404, 405, 410, 414, and 501 unless given explicit cache controls
headers["Cache-Control"] = headers["Cache-Control"] || "no-store";
} }
/* /*
If the gzip=yes is set, check if the user agent permits compression. If so, If the gzip=yes is set, check if the user agent permits compression. If so,

View File

@ -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;
}); });

View File

@ -29,7 +29,11 @@ var THROTTLE_REFRESH_TIMEOUT = 400;
exports.startup = function() { exports.startup = function() {
// Set up the title // Set up the title
$tw.titleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TITLE_TITLE,{document: $tw.fakeDocument, parseAsInline: true}); $tw.titleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TITLE_TITLE, {
document: $tw.fakeDocument,
parseAsInline: true,
importPageMacros: true,
});
$tw.titleContainer = $tw.fakeDocument.createElement("div"); $tw.titleContainer = $tw.fakeDocument.createElement("div");
$tw.titleWidgetNode.render($tw.titleContainer,null); $tw.titleWidgetNode.render($tw.titleContainer,null);
document.title = $tw.titleContainer.textContent; document.title = $tw.titleContainer.textContent;
@ -81,6 +85,8 @@ exports.startup = function() {
deferredChanges = Object.create(null); deferredChanges = Object.create(null);
$tw.hooks.invokeHook("th-page-refreshed"); $tw.hooks.invokeHook("th-page-refreshed");
} }
var throttledRefresh = $tw.perf.report("throttledRefresh",refresh);
// Add the change event handler // Add the change event handler
$tw.wiki.addEventListener("change",$tw.perf.report("mainRefresh",function(changes) { $tw.wiki.addEventListener("change",$tw.perf.report("mainRefresh",function(changes) {
// Check if only tiddlers that are throttled have changed // Check if only tiddlers that are throttled have changed
@ -101,7 +107,7 @@ exports.startup = function() {
if(isNaN(timeout)) { if(isNaN(timeout)) {
timeout = THROTTLE_REFRESH_TIMEOUT; timeout = THROTTLE_REFRESH_TIMEOUT;
} }
timerId = setTimeout(refresh,timeout); timerId = setTimeout(throttledRefresh,timeout);
$tw.utils.extend(deferredChanges,changes); $tw.utils.extend(deferredChanges,changes);
} else { } else {
$tw.utils.extend(deferredChanges,changes); $tw.utils.extend(deferredChanges,changes);

View File

@ -38,6 +38,8 @@ exports.startup = function() {
url: params.url, url: params.url,
method: params.method, method: params.method,
body: params.body, body: params.body,
binary: params.binary,
useDefaultHeaders: params.useDefaultHeaders,
oncompletion: params.oncompletion, oncompletion: params.oncompletion,
onprogress: params.onprogress, onprogress: params.onprogress,
bindStatus: params["bind-status"], bindStatus: params["bind-status"],
@ -46,7 +48,13 @@ exports.startup = function() {
headers: getPropertiesWithPrefix(params,"header-"), headers: getPropertiesWithPrefix(params,"header-"),
passwordHeaders: getPropertiesWithPrefix(params,"password-header-"), passwordHeaders: getPropertiesWithPrefix(params,"password-header-"),
queryStrings: getPropertiesWithPrefix(params,"query-"), queryStrings: getPropertiesWithPrefix(params,"query-"),
passwordQueryStrings: getPropertiesWithPrefix(params,"password-query-") passwordQueryStrings: getPropertiesWithPrefix(params,"password-query-"),
basicAuthUsername: params["basic-auth-username"],
basicAuthUsernameFromStore: params["basic-auth-username-from-store"],
basicAuthPassword: params["basic-auth-password"],
basicAuthPasswordFromStore: params["basic-auth-password-from-store"],
bearerAuthToken: params["bearer-auth-token"],
bearerAuthTokenFromStore: params["bearer-auth-token-from-store"]
}); });
}); });
$tw.rootWidget.addEventListener("tm-http-cancel-all-requests",function(event) { $tw.rootWidget.addEventListener("tm-http-cancel-all-requests",function(event) {
@ -67,7 +75,10 @@ exports.startup = function() {
}); });
// Install the copy-to-clipboard mechanism // Install the copy-to-clipboard mechanism
$tw.rootWidget.addEventListener("tm-copy-to-clipboard",function(event) { $tw.rootWidget.addEventListener("tm-copy-to-clipboard",function(event) {
$tw.utils.copyToClipboard(event.param); $tw.utils.copyToClipboard(event.param,{
successNotification: event.paramObject && event.paramObject.successNotification,
failureNotification: event.paramObject && event.paramObject.failureNotification
});
}); });
// Install the tm-focus-selector message // Install the tm-focus-selector message
$tw.rootWidget.addEventListener("tm-focus-selector",function(event) { $tw.rootWidget.addEventListener("tm-focus-selector",function(event) {

View File

@ -27,6 +27,11 @@ exports.startup = function() {
if($tw.browser) { if($tw.browser) {
$tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent)); $tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent));
$tw.browser.isFirefox = !!document.mozFullScreenEnabled; $tw.browser.isFirefox = !!document.mozFullScreenEnabled;
// 2023-07-21 Edge returns UA below. So we use "isChromeLike"
//'mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/114.0.0.0 safari/537.36 edg/114.0.1823.82'
$tw.browser.isChromeLike = navigator.userAgent.toLowerCase().indexOf("chrome") > -1;
$tw.browser.hasTouch = !!window.matchMedia && window.matchMedia("(pointer: coarse)").matches;
$tw.browser.isMobileChrome = $tw.browser.isChromeLike && $tw.browser.hasTouch;
} }
// Platform detection // Platform detection
$tw.platform = {}; $tw.platform = {};

View File

@ -93,7 +93,9 @@ exports.startup = function() {
updateAddressBar: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_UPDATE_ADDRESS_BAR,"yes").trim() === "yes" ? "permalink" : "none", updateAddressBar: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_UPDATE_ADDRESS_BAR,"yes").trim() === "yes" ? "permalink" : "none",
updateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,"no").trim(), updateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,"no").trim(),
targetTiddler: event.param || event.tiddlerTitle, targetTiddler: event.param || event.tiddlerTitle,
copyToClipboard: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_COPY_TO_CLIPBOARD,"yes").trim() === "yes" ? "permalink" : "none" copyToClipboard: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_COPY_TO_CLIPBOARD,"yes").trim() === "yes" ? "permalink" : "none",
successNotification: event.paramObject && event.paramObject.successNotification,
failureNotification: event.paramObject && event.paramObject.failureNotification
}); });
}); });
// Listen for the tm-permaview message // Listen for the tm-permaview message
@ -102,7 +104,9 @@ exports.startup = function() {
updateAddressBar: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_UPDATE_ADDRESS_BAR,"yes").trim() === "yes" ? "permaview" : "none", updateAddressBar: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_UPDATE_ADDRESS_BAR,"yes").trim() === "yes" ? "permaview" : "none",
updateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,"no").trim(), updateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,"no").trim(),
targetTiddler: event.param || event.tiddlerTitle, targetTiddler: event.param || event.tiddlerTitle,
copyToClipboard: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_COPY_TO_CLIPBOARD,"yes").trim() === "yes" ? "permaview" : "none" copyToClipboard: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_COPY_TO_CLIPBOARD,"yes").trim() === "yes" ? "permaview" : "none",
successNotification: event.paramObject && event.paramObject.successNotification,
failureNotification: event.paramObject && event.paramObject.failureNotification
}); });
}); });
} }
@ -177,6 +181,8 @@ options.updateAddressBar: "permalink", "permaview" or "no" (defaults to "permavi
options.updateHistory: "yes" or "no" (defaults to "no") options.updateHistory: "yes" or "no" (defaults to "no")
options.copyToClipboard: "permalink", "permaview" or "no" (defaults to "no") options.copyToClipboard: "permalink", "permaview" or "no" (defaults to "no")
options.targetTiddler: optional title of target tiddler for permalink options.targetTiddler: optional title of target tiddler for permalink
options.successNotification: optional title of tiddler to use as the notification in case of success
options.failureNotification: optional title of tiddler to use as the notification in case of failure
*/ */
function updateLocationHash(options) { function updateLocationHash(options) {
// Get the story and the history stack // Get the story and the history stack
@ -205,14 +211,18 @@ function updateLocationHash(options) {
break; break;
} }
// Copy URL to the clipboard // Copy URL to the clipboard
var url = "";
switch(options.copyToClipboard) { switch(options.copyToClipboard) {
case "permalink": case "permalink":
$tw.utils.copyToClipboard($tw.utils.getLocationPath() + "#" + encodeURIComponent(targetTiddler)); url = $tw.utils.getLocationPath() + "#" + encodeURIComponent(targetTiddler);
break; break;
case "permaview": case "permaview":
$tw.utils.copyToClipboard($tw.utils.getLocationPath() + "#" + encodeURIComponent(targetTiddler) + ":" + encodeURIComponent($tw.utils.stringifyList(storyList))); url = $tw.utils.getLocationPath() + "#" + encodeURIComponent(targetTiddler) + ":" + encodeURIComponent($tw.utils.stringifyList(storyList));
break; break;
} }
if(url) {
$tw.utils.copyToClipboard(url,{successNotification: options.successNotification, failureNotification: options.failureNotification});
}
// Only change the location hash if we must, thus avoiding unnecessary onhashchange events // Only change the location hash if we must, thus avoiding unnecessary onhashchange events
if($tw.utils.getLocationHash() !== $tw.locationHash) { if($tw.utils.getLocationHash() !== $tw.locationHash) {
if(options.updateHistory === "yes") { if(options.updateHistory === "yes") {

Some files were not shown because too many files have changed in this diff Show More