* Update aho-corasick.js
False positive matches
Symptom: Words like "it is", "Choose", "Set up" are incorrectly linked to tiddler "FooBar" when a tiddler titled "xxx x FooBar" exists.
Root cause: The Aho-Corasick algorithm's output merging mechanism in buildFailureLinks caused failure link outputs to be incorrectly merged into intermediate nodes, resulting in false matches.
Fix:
Remove incorrect output merging in buildFailureLinks
Implement proper output collection during search by traversing the failure link chain
Add exact match validation: verify that the matched text exactly equals the pattern before accepting it
Add cycle detection to prevent infinite loops in failure link traversal
* Update text.js
First character disappearing
Symptom: When freelinking is enabled, the first character of matched words disappears (e.g., "The" becomes "he", "Filter" becomes "ilter").
Root cause: When the current tiddler's title was being filtered out, it was done too late in the process (during parse tree construction), causing text rendering issues.
Fix:
Move the current tiddler title filtering to the match validation stage (in processTextWithMatches)
Use substring instead of slice for better stability
Add proper case-insensitive comparison for title matching
* Update text.js
add back description
* Update aho-corasick.js
add back description
* Update tiddlywiki.info
add freelinks plugin for testing
* Update tiddlywiki.info
restore
* Update tiddlywiki.info
add freelinks plugin for test
* Update aho-corasick.js
erase comment
* Update text.js
erase comment
* Update aho-corasick.js
add back some commets
* Update aho-corasick.js
clean comment
* change note #9397
change note #9397
* Update tiddlywiki.info
reversed to original
* Update #9397.tid
update detail
* Update #9397.tid
another link added
* Update #9397.tid
add "release: 5.4.0"
* Update #9397.tid
some format modified
* fix: should use tree.isSelfClosing || isVoidElement
* docs: about html
* fix: Void element without self-closing slash (e.g., <br> instead of <br/>)
* Update editions/test/tiddlers/tests/data/serialize/VoidElements.tid
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* refactor: extract a new $tw.wiki.getParser
* feat: allow $tw.utils.getParseTreeText to render other rules' text
* feat: two example getText handler
* Revert "feat: allow $tw.utils.getParseTreeText to render other rules' text"
This reverts commit 8a12498fa9.
* refactor: keep original getParseTreeText not touched
* refactor: use serialize in rules
* refactor: $tw.utils.extend({},options) -> options || {}
* Update codeinline.js
* Create test-wikitext-serialize.js
* DEBUG: only run my tests for development, remove before PR merge
* lint: if
* feat: add rule: 'parseBlock' metadata
* feat: handle tailing \n that may be missing
* feat: allow recursive
* feat: generate more rule and tests
* feat: generate more rule and tests
* fix: remove pragma:true, otherwise following text will become children of it
* fix: condition manually
Deekseek is silly
* fix: some test
* fix: some test
* feat: $tw.utils.serializeAttribute
* fix: use "" for string param
* feat: list
* refactor: ' -> "
* fix: parsemode don't have node
* fix: render invisible comment and parsemode as data element
* feat: add void: true, in ast node to prevent render
* feat: use void widget, so methods always return a widget
* feat: ast to use new widget type void
* test: add rule: 'parseBlock' and isRuleEnd: true
* lint: quote
* Update widget.js
* fix: void node need to handle its children
* Update test-wikitext-parser.js
* lint: quote
* Update void.js
* Update test-wikitext-parser.js
* fix: macrodef with comment (void node) not working
* lint: ' -> "
* feat: add to styleblock
* feat: styleblock
* feat: styleinline
* Update table.js
* lint: useless comments
* feat: transcludeblock
* refactor: reuse block on inline when possible
* feat: use void node to carry important info for typedblock
* feat: run all tests
* lint: useless ai generated comments
* Update conditional.js to not include space
* Update test-wikitext-serialize.js
* Update conditional.js
* refactor: move tiddlers to /data
* refactor: no need for new $tw.Wiki()
* lint: double quote
* refactor: lowercase the parseblock rule name
* fix: Wiki parser initialize blockRuleClasses only when first new an instance
* feat: restore inline macro def
* fix: macro in widget param
* fix: positional attribute in macro call
* fix: table space and horizrule block new line
* feat: make sure block rule all have \n\n for visiblity
* lint: function param
* fix: empty list item
* feat: add \n\n based on isBlock, if could also be inline
* fix: conditional without elseif
* refactor: use isBlock in macrodef to know inline or block
* fix: link may not have attribute and children
* DEBUG: render result and diff below body only on browser
DEBUG: render result below body only on browser
DEBUG: render result below body
DEBUG: fix build
DEBUG: show render result as ViewTemplate
* fix: remove pad space in />
* test: remove pad space in />
* Revert DEBUG: render result and diff below body only on browser
* refactor: fold commentText variable
* refactor: fold long comment
* fix: double quotes for parameter values
* Update void.js
* refactor: move all exports.serialize = function(tree,serialize) { to plugin
* fix: expost listTypes from core, and require it in plugin
* refactor: move serializeWikitextParseTree to plugin and init it
* refactor: move serializeAttribute util also to the plugin
* fix: Delete unused file
* Update macrodef.js
* Update test-wikitext-parser.js
* lint: fix
* Update plugins/tiddlywiki/wikitext-serialize/rules/filteredtranscludeblock.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update core/modules/widgets/void.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update plugins/tiddlywiki/wikitext-serialize/rules/list.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update plugins/tiddlywiki/wikitext-serialize/rules/list.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update plugins/tiddlywiki/wikitext-serialize/rules/styleblock.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Remove unused methods from VoidNodeWidget
Deleted render, execute, and refresh methods from VoidNodeWidget as they are no longer needed. The widget now only inherits from the base Widget class and exports the constructor.
* docs: about regex in styleinline.js
* Update parsetree.js
* Update core/modules/widgets/void.js
Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>
* feat: Ensure at least one space after the style/class
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>
* 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>
* Rewrote tw_macrocallinline() parser so macrocall args containing ">"
will be parsed properly.
* Use $tw.log.MARKDOWN flag to print debug messages.
* Fix markdown parser to respect parseAsInline option. (#8917)
* Replace fill: with currentColor
* Remove fill from wikitext
* Replace fill property with color property for svg selectors
* Further remove fill property
* Replace more fill properties
* Replace fill in seamless theme
* Replace fill in plugins
* eslint manual fixes
- update eslint to 2017
- add self to forbidden globals
- fix a few unfixable bugs caught by eslint
- convert newer features in twitter-archivist
* add eslint plugin to forbid features
* import changes from @saqimtiaz
* add package.json changes
* Move Node.js specific files out of the core plugin
* Package server files as new $:/core-server plugin
* Missed commander.js
* Fix crash in browser
* Extend server-only mechanism to be usable by other plugins
* in
* Revert "Extend server-only mechanism to be usable by other plugins"
This reverts commit 3faf503073.
* Revert "in"
This reverts commit b80213128f.
* Reapply "Extend server-only mechanism to be usable by other plugins"
This reverts commit c6c83bc18b.
* Fix test failure
* Move filesystem utilities into core-server
* Move old-style release notes out of the way
* Move the 5.4.0 release note into the right place
* Revert "Move the 5.4.0 release note into the right place"
This reverts commit 3f5c2bfba3.
* Revert "Move old-style release notes out of the way"
This reverts commit ee16e48a43.
* Community Survey import specifier for xlsx plugin
* Community Survey 2025 improvements
* Survey results as of 25th July 2025
* New 2025 answer
* Save changes on the server for when we're importing on the command line
* Improve import specs
* Reimport answers with new schema
* Fix schema
* Fix responses
* Show response count
* Add count for each unique response
* Update responses