1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-07-12 06:42:43 +00:00
Files
TiddlyWiki5/plugins/tiddlywiki
s793016 e730836d6f Freelinks Plugin: Add configurable MaxLinks cap and remove search truncation (#9836)
* Update aho-corasick.js

Optimized Aho-Corasick string matching algorithm implementation with enhanced
performance and error handling for TiddlyWiki freelinking functionality.
 
- Uses WeakMap for failure links. WeakMap keys are compared by object identity
  (reference equality), which is required here because trie nodes are plain
  objects — a regular {} map would not work because JavaScript only supports
  string and Symbol keys, forcing object keys to be coerced to strings.
- Outputs are merged at build time (classic AC optimization), eliminating the
  need to walk the failure chain during search.
- search() converts case per character to avoid Unicode index desync (e.g.
  Turkish İ expands under toLowerCase(), shifting subsequent indices).
- No match count cap in search(); truncation is handled at the render stage
  by processTextWithMatches() to avoid silently dropping matches mid-text.
- Optional word boundary filtering: CJK always allowed; Latin requires
  non-word characters on both sides.

* Update text.js

- Render output capped by $:/config/Freelinks/MaxLinks (default 500).
  The cap applies to the final set of non-overlapping rendered links, not to
  the raw search results: search always runs to completion so that the
  longest-match selection has full information. Text beyond the cap remains
  as plain text rather than being silently omitted.

* Create config-Freelinks-MAX_LINKS_TIDDLER.tid

setting for MAX_LINKS_TIDDLER

* Update and rename config-Freelinks-MAX_LINKS_TIDDLER.tid to config-Freelinks-MaxLinks.tid

fix typo

* Update settings.tid

add MaxLinks setting

* Update readme.tid

add MaxLinks setting text

* Create #9836.tid

release note

* Update tiddlywiki.info

add freelinks for test build

* Update macros-view.tid

fix structure problem

* Update text.js

add IGNORE_CASE_TIDDLER  to whitelist

* Rename #9836.tid to #9836.tid

move to 5.4.1

* Update text.js

I deleted the wrong line last time, so I'm putting it back.

* Update text.js

eslint fix

* Update text.js

refactor: inline plain-text via dynamic core reference

* Delete plugins/tiddlywiki/freelinks/plain-text.js

remove plain-text.js: now inlined via dynamic core reference

* Update text.js

restore plain-text.js, remove new Function extraction

* Add files via upload

restore plain-text.js, remove new Function extraction

* Update #9836.tid

update new bug

* Update #9836.tid

tw version fix

* Update tiddlywiki.info

reverse to original
2026-06-20 19:25:19 +01:00
..
2024-05-21 11:22:39 +01:00
2026-02-20 08:38:42 +00:00
2026-02-20 08:38:42 +00:00
2026-02-20 08:38:42 +00:00
2026-02-20 08:38:42 +00:00
2026-02-20 08:38:42 +00:00
2026-02-20 08:38:42 +00:00
2026-02-20 08:38:42 +00:00
2026-02-20 08:38:42 +00:00
2026-03-24 09:48:32 +01:00
2026-02-20 08:38:42 +00:00
2026-06-09 16:36:22 +01:00
2026-02-20 08:38:42 +00:00
2026-02-20 08:38:42 +00:00
2024-05-21 11:22:39 +01:00
2026-02-20 08:38:42 +00:00
2026-02-20 08:38:42 +00:00
2026-02-20 08:38:42 +00:00
2026-02-20 08:38:42 +00:00
2026-02-20 08:38:42 +00:00