mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-27 02:20:28 +00:00
758089cbb3
* 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. |
||
---|---|---|
.. | ||
commands | ||
editor | ||
filterrunprefixes | ||
filters | ||
indexers | ||
info | ||
macros | ||
parsers | ||
savers | ||
server | ||
startup | ||
storyviews | ||
upgraders | ||
utils | ||
widgets | ||
commander.js | ||
config.js | ||
deserializers.js | ||
filters.js | ||
keyboard.js | ||
language.js | ||
pluginswitcher.js | ||
saver-handler.js | ||
story.js | ||
syncer.js | ||
tiddler.js | ||
wiki-bulkops.js | ||
wiki.js |