Commit graph

12824 commits

Author SHA1 Message Date
Saq Imtiaz
7898cb8446
Revert "Fix 8166 html tag validation (#8176)" (#9374)
This reverts commit 9a5f4cc0ef.
2025-10-29 22:01:03 +01:00
Mario Pietsch
9a5f4cc0ef
Fix 8166 html tag validation (#8176)
* wip proposal still contains commented old code - tests are missing

* rename isTagNameSafe to makeTagNameSafe

* remove comments

* remove redundant space

* add htmlCustomPrimitives to the $tw.config object

* remove tag-sanitation from element.js

* WIP - add html-element sanitation to the new makeTagNameSafe function, so it can be used globally

* simplify sanitation logic and fix inline docs

* Move top comment into inline comments
2025-10-29 17:42:28 +00:00
s793016
cda8d7ca8c
Aho-Corasick Freelinks Enhancement for Large Wikis and Non-Latin Titles (#9084)
* Enhance Freelinks with Aho-Corasick for long titles and large wikis

Replaces regex with Aho-Corasick, adds chunking (100 titles/chunk), cache toggle, and Chinese full-width symbol support. Tested with 11,714 tiddlers.

* delete comment

* Create AhoCorasick.js

* Update text.js

* Update text.js

* Update AhoCorasick.js

* Update text.js

* Update text.js

* move AhoCorasick to AhoCorasick.js

* update AhoCorasick.js

* Delete core/modules/utils/AhoCorasick.js

wrong place

* Update text.js

* indentation modify

* remove function {}

* remove function {}

* Rename AhoCorasick.js to aho-corasick.js

correct filename

* Update tiddlywiki.info add freelink

* missing a comma here

* clean up comments & use old style

* try add it to editions/tw5.com-server for testing

* try add it to editions/prerelease for testing

* optimized

* optimized

* add setting for "Persist AhoCorasick cache"

* add  dynamic limits

* remove comment

* revert to 5f0b98d1fd

* try sort alphabet

* try sort alphabet

* try sort alphabet

* typo freelink -> freelinks

* typo freelink -> freelinks

* typo freelink -> freelinks

* Update readme.tid

* Update aho-corasick.js

Dynamically adjust limit parameters to avoid problems caused by hard-coded limits.

* Update text.js

Dynamically adjust limit parameters to avoid problems caused by hard-coded limits.

* Update tiddlywiki.info

remove other plugin for test plugin conflict

* Update tiddlywiki.info

* Update tiddlywiki.info

* Update aho-corasick.js

Description of major changes

Improve state transition logic - Ensure to go back to root node correctly in case of mismatch, and check root node for current character transition 
Fix failed link traversal - Add condition node ! == this.trie to avoid infinite loop at root node 
Enhance output collection - collect output not only from current node, but also from all nodes on failed link path, which is key to Aho-Corasick algorithm 
Add safety limit - collectCount < 10 to prevent failed link loops

Translated with DeepL.com (free version)

* Update aho-corasick.js

Word Boundary Check - The isWordBoundaryMatch function checks if the match is on a word boundary:

Alphanumeric characters [a-zA-Z0-9_] are regarded as unicode characters 
At least one non-unicode character must be present before and after the match for it to be considered valid.

* Update text.js

Word Boundary Check - The isWordBoundaryMatch function checks if the match is on a word boundary:

Alphanumeric characters [a-zA-Z0-9_] are regarded as unicode characters 
At least one non-unicode character must be present before and after the match for it to be considered valid.

* Update settings.tid

Word Boundary Check - The isWordBoundaryMatch function checks if the match is on a word boundary:

Alphanumeric characters [a-zA-Z0-9_] are regarded as unicode characters 
At least one non-unicode character must be present before and after the match for it to be considered valid.

* fix Word Boundary logic

* remove PersistentCache @ text.js

* remove PersistentCache @settings.tid

* Update readme.tid for Word Boundary Check

* Update aho-corasick.js Organize and delete comments

* Initial commit of freelinks plugin

* Update settings.tid Organize and delete comments

* Update tiddlywiki.info add back other plugin

* Update tiddlywiki.info alphabet sort

* Update readme.tid for new future

The plugin supports non-Western language tiddler titles (e.g., Chinese) and prioritizes longer tiddler titles for matching, ensuring accurate linking in diverse contexts. 

Furthermore, the current tiddler title within its own content is excluded from generating links to avoid self-referencing.

* Update readme.tid

* Update plugins/tiddlywiki/freelinks/text.js

Co-authored-by: Mario Pietsch <pmariojo@gmail.com>

* Update plugins/tiddlywiki/freelinks/aho-corasick.js

Co-authored-by: Mario Pietsch <pmariojo@gmail.com>

* Update plugins/tiddlywiki/freelinks/aho-corasick.js

Co-authored-by: Mario Pietsch <pmariojo@gmail.com>

* Update plugins/tiddlywiki/freelinks/text.js

Co-authored-by: Mario Pietsch <pmariojo@gmail.com>

* Update plugins/tiddlywiki/freelinks/aho-corasick.js

Co-authored-by: Mario Pietsch <pmariojo@gmail.com>

* Update text.js

Added locale configuration support - Added LOCALE_CONFIG_TIDDLER constant to make the sorting locale configurable instead of hardcoded "zh"
Optimized title processing - Combined the filtering and escaping logic into a single pass to reduce duplication
Added trim() for ignoreCase - Applied .trim() to the ignore case variable for consistency
Enhanced refresh logic - Added locale configuration tiddler to the refresh check
Improved comments - Added explanation for why sorting is necessary (prioritizing longer titles)

* Update text.js

we don't need to specify 'zh' at all

* Update aho-corasick.js

This single line change would add support for:

Accented letters: á, é, í, ó, ú, à, è, ì, ò, ù, ä, ë, ï, ö, ü, ñ, ç, etc.
Most Western European languages (Spanish, French, German, Italian, Portuguese, etc.)

* Update aho-corasick.js useage

* Update readme.tid for Writing Style

* Update tiddlywiki.info

revert all the changes

* Update tiddlywiki.info

revert all the changes

* Update tiddlywiki.info

revert all the changes

* Update tiddlywiki.info

revert

* Update text.js

plugins/tiddlywiki/freelinks/text.js#L25
[ESLint PR code] reported by reviewdog 🐶
Strings must use doublequote.

* Update aho-corasick.js

plugins/tiddlywiki/freelinks/aho-corasick.js#L193
[ESLint PR code] reported by reviewdog 🐶
Strings must use doublequote.

Raw Output:
{"ruleId":"@stylistic/quotes","severity":2,"message":"Strings must use doublequote.","line":193,"column":50,"nodeType":"Literal","messageId":"wrongQuotes","endLine":193,"endColumn":52,"fix":{"range":[5743,5745],"text":"\"\""}}

---------

Co-authored-by: Mario Pietsch <pmariojo@gmail.com>
2025-10-29 17:41:35 +00:00
Jeremy Ruston
f38e9f0822
Introduce browser messaging saver (#5512)
* First commit

* Subscriber: Make onmessage be async

* Don't use a variable before it's defined...
2025-10-29 14:52:21 +00:00
Jeremy Ruston
5848d66e96 Merge branch 'tiddlywiki-com' 2025-10-29 14:48:14 +00:00
well-noted
485051951e
Allow intercept of audioparser by widget and pass attributes (#9024)
* Initial Commit

* Removes Function wrapper

* Remove Function wrapper from parser

* Convert spaces to tabs in audio.js widget

* Fix indentation

---------

Co-authored-by: Saq Imtiaz <saq.imtiaz@gmail.com>
2025-10-29 12:19:09 +00:00
XLBilly
135e685811
Improve alert accessibility (#9248)
* Improve alert accessibility

* Remove procedure
2025-10-29 12:08:01 +00:00
Simon Huber
99682c5731
[Bugfix] - keep focus on Element with tc-keep-focus class (#9233)
* Update factory.js

* add tc-keep-focus class to type input field

* tryna fix with energy
2025-10-29 12:00:40 +00:00
yaisog
d58eec47c0
Modify output of some math operators for empty inputs (#9337)
* Initial commit

* Adapt test to new behavior
2025-10-29 11:57:39 +00:00
Jeremy Ruston
059978ec63
Fix crash with empty transclusions (#8145)
* Initial commit

* Remove testing code
2025-10-29 11:33:17 +00:00
Mario Pietsch
b5e20a58a6
Muted palette, minor adjustments (#9015)
* Muted palette, minor adjustments

* revert download-background

* Change sidebar tiddler link foreground color

Change sidebar tiddler link foreground colour to make the search dropdown text readable. Using: #aaaaaa
2025-10-29 11:18:31 +00:00
Mario Pietsch
e8fe6b98bc
Change camel-case hint, since it is disabled by default now. (#9211)
* Change camel-case hint, since it is disabled by default now.

* change camel-case hint text for other languages, where it is obvious
2025-10-29 11:18:00 +00:00
Mario Pietsch
317104774c
list-links-draggable defaults to currentTiddler if tiddler parameter is missing (#9254)
* list-links-draggable if tiddler parameter undefined default to currentTiddler

* update list-links-draggable docs with the new behaviour
2025-10-29 11:17:02 +00:00
Simon Huber
deed8631d8
exports.search: don't break the loop if encoding is base64, just continue (#9247)
This makes it possible to find tiddlers with base64 encoding using `search:*:words[searchterm]` for example

fixes #9246
2025-10-29 11:15:54 +00:00
XLBilly
d733b77e2f
Replace CSS property macros in Snow White theme (#9243) 2025-10-29 11:07:37 +00:00
Simon Huber
46c26a64b9
Update framed.js to avoid quirks mode (#9227) 2025-10-29 11:05:59 +00:00
XLBilly
ec81d6663b
[5.4.0] Update highlightjs plugin (#9118)
* Bump highlightjs version to 11.11.1

* highlightblock.js support es6
2025-10-29 11:04:53 +00:00
bepuzzled
23f0a9bf79
Improve handling of $link widget's draggable="no" (#9262)
* fix to to improve browser's compliance with user's intent when the widget's draggable attribute is set to no

* Update link.js with comments from the PR review

indentation changed from spaces to tabs
modified else statement into a else if statement for additional specificity

---------

Co-authored-by: Frédéric Demers <fastfreddy@fdemers.ca>
2025-10-29 11:03:19 +00:00
yogoshell
bad87c405e
docs: Correcting typo in description field (#9087) 2025-10-28 22:16:32 +01:00
yogoshell
6f23a078b7
Signing CLA (#9086)
Co-authored-by: Saq Imtiaz <saq.imtiaz@gmail.com>
2025-10-28 22:15:04 +01:00
Mario Pietsch
c3706b8a79
[Docs] Convert Markdown links into TW-Links. Remove redundant TiddlyWiki links. Add links to current docs. (#9209) 2025-10-28 22:12:05 +01:00
Mohammad Rahmani
7ca8fb29af
Docs: Fix Issue in Triggering $:/AdvancedSearch (#9244) 2025-10-28 22:11:20 +01:00
Markus Sauermann
d39bb5274e
Fix typo in Filter Syntax (#9111) 2025-10-28 22:07:54 +01:00
lin onetwo
81b69783c4
docs: How to add new cascade and use it (#8472)
* docs: How to add new cascade and use it

* Update Cascade Mechanism.tid

* docs: update

* Update How to Create a Custom Cascade Entry.tid

* Refine with deepseek
2025-10-27 15:59:14 +00:00
Rishu Kumar
40cc62f727
fix: renaming of incoming tiddlers being imported (#9368)
* fix: UX on pasting image

* fix: Rename on pasting image from clipboard
2025-10-27 16:13:42 +01:00
Rishu Kumar
b349adde16
Fix Renaming on pasting image from clipboard (#9369)
We can do Renaming on pasting image from clipboard
2025-10-27 16:11:32 +01:00
Saq Imtiaz
d63a1896b3
docs: update more links for PR maker (#9362) 2025-10-23 17:48:57 +02:00
Saq Imtiaz
b65fa11643
Update ContributionBanner to reflect new URI for pr maker 2025-10-23 16:56:21 +02:00
Saq Imtiaz
4043499633
Update link in make-pr-maker-link procedure
Update URI for PR maker
2025-10-23 16:53:30 +02:00
Saq Imtiaz
6a39a4e13b
Docs: add link to Contributing guidelines in developers tiddler (#9361) 2025-10-23 12:07:37 +01:00
Cameron Fischer
b5153c0066
:reverse was ignored when prefix sorting by version (#9280) 2025-10-23 12:03:35 +01:00
lin onetwo
b061f90f87
Get-file web server route now support streaming (#9078)
* Update get-file.js

* Update WebServer API_ Get File.tid

* Update get-file.js

* Update get-file.js

* Update get-file.js

* Update get-file.js

* Update core-server/server/routes/get-file.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update core-server/server/routes/get-file.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update get-file.js

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-23 11:55:30 +01:00
Jeremy Ruston
8be83cf01b Merge branch 'tiddlywiki-com' 2025-10-21 15:45:21 +01:00
Mario Pietsch
5b5147dade
Make ReleaseTemplate use code-body (#9340) 2025-10-21 13:00:06 +02:00
Scott Sauyet
ad6ac480f9
Remove css props rather than setting transition to none (#9284)
* Use style property deletion rather than setting to none

* Remove cecily and slide, fix quotation marks

* Fix returning typo

* Add helper functions, use some timeouts to order events
2025-10-21 11:57:10 +01:00
Cameron Fischer
8168512e95
Support for downloading base64 files (#9297)
* Support for downloading base64 files

* Added comment explaining why we'd use data urls over blobs

* Using more modern string##includes method
2025-10-21 11:53:32 +01:00
Leilei332
276fdc8634
Purge deprecated plugins and editions (#9350) 2025-10-21 11:51:12 +01:00
yaisog
0b38ced43a
Preserve the module insertion order in forEachModuleOfType (#9305)
* Initial commit

* Update testcase

* Revert "Update testcase"

This reverts commit 0d24c4233f.

* Revert initial commit and swap definition order
2025-10-21 11:37:55 +01:00
cdruan
d7e48207b9
Fix crash when processing large files from tiddlywiki.files (#9341)
* skip reading file content when _canonical_uri is present

* skip loading file when file size is too large
2025-10-21 11:30:39 +01:00
Mohammad Rahmani
2c8fafee48
docs: Fix Slider Plugin Url (#9354) 2025-10-21 12:30:37 +02:00
欧阳
a6383aaaea
feat: specify the space applied between CJK and non-CJK characters (#9349) 2025-10-21 11:26:32 +01:00
Joseph Yi
61619c07c8
chore: bump checkout action v4 to v5 (#9342) 2025-10-15 21:27:23 +01:00
Joseph Yi
09a42a54c0
Chore: Signing CLA (#9344) 2025-10-15 21:25:01 +01:00
Mario Pietsch
f4f31c37fc
Remove tweb.at from community resources (#9330) 2025-10-12 10:55:39 +01:00
Jeremy Ruston
61e638c972 Merge branch 'tiddlywiki-com' 2025-10-11 15:53:49 +01:00
lin onetwo
6bdd51d72a
Fix (eslint): removes unneeded dependencies (#9332)
* Clean up eslint.config.mjs by removing unused import and comments

Removed commented-out import statements for clarity.

* Remove @eslint/compat from devDependencies

Removed deprecated @eslint/compat dependency.

* Update eslint.config.mjs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-11 14:11:21 +01:00
Mario Pietsch
ed3405672a
Rename Intertwingled innovations.webp to Innovations.webp (#9331) 2025-10-11 11:19:55 +02:00
Mario Pietsch
e3af967cbb
[DOCS] Convert PNG images into WEBP to reduce wiki size by 3MB (#9162)
* convert PNG images into WEBP to reduce wiki size by 3MB

* convert Community Survey 2025.png to webp
2025-10-10 15:02:30 +01:00
Mario Pietsch
6b0d3fab5d
[Docs] Fix typo in DefaultTiddlers (#9202) 2025-10-10 15:01:00 +01:00
Mario Pietsch
13f1689e7e
[DOC] ContentType Info and Links - Add Compount Tiddler Type (#9249) 2025-10-10 15:00:43 +01:00