1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-28 08:13:14 +00:00
TiddlyWiki5/core/modules
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
..
commands Add explodePlugins=yes option to savewikifolder command (#7490) 2023-06-29 15:40:35 +01:00
editor Fix typo in 7d8766d2b9 2023-09-13 18:06:30 +01:00
filterrunprefixes Add a :then filter run prefix (#7392) 2023-06-24 18:07:34 +01:00
filters Fix last filter operator when zero items selected (#7809) 2023-10-25 13:14:49 +01:00
indexers FieldIndexer performance: use isShadowTiddler instead of allTitles (#7299) 2023-02-27 17:32:20 +00:00
info style(App) eliminate whitespace at the end of code lines (#5735) 2021-05-30 19:20:17 +01:00
macros allow unusedtitle macro to use the prefix parameter and fix wiki.generateNewTitle() (#5361) 2021-05-02 19:26:50 +01:00
parsers Conditional Shortcut Syntax (#7710) 2023-10-14 09:41:21 +01:00
savers Fix encodebase64 and decodebase64 filters (#7683) 2023-10-18 16:08:56 +01:00
server Feat: decode url-encoded user name in authenticate request header to allow CJK username in header (#7471) 2023-05-22 12:25:51 +01:00
startup tm-open-window set focus to existing window (#7708) 2023-10-18 16:10:04 +01:00
storyviews Revert "Feat: destroy() method for widgets to do custom cleanup (#6699)" 2023-05-18 17:27:05 +01:00
upgraders Introduce JSON parse utility function with error handling (#6401) 2022-02-21 15:29:25 +00:00
utils Fix window.btoa call in browser (#7814) 2023-10-26 09:05:59 +01:00
widgets Alternate fix for inconsistent list template syntax (#7827) 2023-11-06 21:18:31 +00:00
commander.js style(App) eliminate whitespace at the end of code lines (#5735) 2021-05-30 19:20:17 +01:00
config.js Add dollar sign to HTML entities (#7323) 2023-03-03 21:34:30 +00:00
deserializers.js Introduce JSON parse utility function with error handling (#6401) 2022-02-21 15:29:25 +00:00
filters.js Refactor dependency on widget.getVariableInfo 2023-06-11 09:46:05 +01:00
keyboard.js Allow global keyboard shortcuts to override all other shortcuts by providing a special field (#6735) 2022-10-07 17:31:04 +01:00
language.js Make lazy loading message be translateable 2015-09-08 10:41:27 +01:00
pluginswitcher.js Introduce JSON parse utility function with error handling (#6401) 2022-02-21 15:29:25 +00:00
saver-handler.js Fix faulty external-js single-file wiki (#5570) 2021-07-06 15:02:21 +01:00
story.js Fix issues with creation and modification dates 2015-09-11 13:34:01 +01:00
syncer.js Lazy loading a tiddler should trigger a sync 2023-01-03 14:28:48 +00:00
tiddler.js Radio widget should use default if field/index is missing 2022-01-09 17:17:12 +00:00
wiki-bulkops.js Fix renaming a tiddler can result in duplicate tags 2022-01-14 16:57:30 +00:00
wiki.js Allow attribute substitution to handle variables containing non-word characters (#7606) 2023-07-14 21:42:31 +01:00