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