1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-01 01:33:16 +00:00
Commit Graph

13 Commits

Author SHA1 Message Date
Jeremy Ruston
d455072f13
Add support for JSON-formatted tiddler store, and make it the default (#5708)
* Add support for JSON-formatted tiddler store, and make it the default

The change to `getTiddlersAsJson()` is to allow experimentation

* Move JSON tiddlers into their own store area, and fix support for encrypted tiddlers

Also add a dummy old-style store area for backwards compatibility

The current arrangement is that JSON tiddlers will always override old-style tiddlers.

* Use the deserialiser mechanism to decode the content

* Refactor $:/core/modules/deserializers.js before we start extending it

Cleaning up the helper function names and ordering

* Drop support for the "systemArea" div

It was only used in really old v5.0.x

* Update deserializer to support JSON store format and add some tests

* Life UI restrictions on characters in fieldnames

* Add another test case

* Correct mis-merge

* Remove toLowerCase() methods applied to fieldnames

* Insert line breaks in output of getTiddlersAsJson (#5786)

Rather than have the entire store on one line, insert a line break
after each tiddler.

* Refactor #5786 for backwards compatibility

* Only read .tiddlywiki-tiddler-store blocks from script tags

Prompted by @simonbaird's comment here: https://github.com/Jermolene/TiddlyWiki5/pull/5708#discussion_r648833367

* Clean up escaping of unsafe script characters

It seems that escaping `<` is sufficient

* Add docs from @saqimtiaz

Thanks @saqimtiaz

* Docs tweaks

* Remove excess whitespace

Thanks @simonbaird

* Fix templates for lazy loading

* Remove obsolete item from release note

* Clean up whitespace

* Docs for the jsontiddler widget

* Fix whitespace

Fixes #5840

* Comments

* Fix newlines in JSON store area

* Remove obsolete docs change

Co-authored-by: Simon Baird <simon.baird@gmail.com>
2021-07-14 09:15:30 +01:00
Jeremy Ruston
953038f0b2 Don't use field indexer when looking for blank/missing fields
Fixes #4247
2019-09-09 14:47:27 +01:00
Jeremy Ruston
a8f70b08a8
Add indexes to the wiki store to improve performance (#3951)
* First pass at modular wiki indexes

An exploratory experiment

* Fix tests

* Faster checking for existence of index methods

We don't really need to check the type

* Use the index for the has operator

* Fix typo

* Move iterator index methods into indexer modules

Now boot.js doesn't know the core indexers

* Fix up the other iterator index functions

* Fix crash with missing index branch

* Limit the field indexer to values less than 128 characters

* Fallback to the old manual scan if the index method returns null
* Sadly, we can no longe re-use the field indexer to accelerate the `has` operator, because the index now omits tiddlers that have field values longer than the limit

Still need to make the index configuration exposed somehow

* Rearrange tests so that we can test with and without indexers

We also need to expose the list of enabled indexers as a config option

* Test the field indexer with different length fields

So that we test the indexed and non-indexed codepaths
2019-05-24 21:07:37 +01:00
Jermolene
42dba113cc Adjust field and has filter handling of missing tiddlers
Now `[!field:name[value]]` and `[!has[name]` will treat missing
tiddlers as not having the specified field
2014-12-11 17:49:17 +00:00
Jermolene
b7f674c51a First pass at refactoring filter execution
This is the beginning of addressing #523.
2014-04-03 20:49:16 +01:00
Jermolene
8b3bfa6805 Allow [title[Blah]] to match missing tiddlers
Fixes #404
2014-02-12 16:01:20 +00:00
Jermolene
a76da88380 Rename the operator portion after the colon to "suffix" 2014-01-24 19:15:27 +00:00
Stephan Hradek
0338c36610 implemented the field: syntax 2014-01-14 16:19:34 +01:00
Stephan Hradek
9444ef095f I feel ashamed :( Somehow this slipped me :( Sorry! 2014-01-12 23:37:11 +01:00
Stephan Hradek
8ef520ef37 Created regexp search for milestone 5.1 2014-01-10 10:32:49 +01:00
Jeremy Ruston
b51fb9cfa9 Linting 2013-07-05 22:37:55 +01:00
Jeremy Ruston
9193937125 Fixed problem with field filter operator not performing string comparisons 2013-05-27 17:55:45 +01:00
Jeremy Ruston
0cf5dc699e Refactor the filter mechanism
Long overdue rewrite to make it simpler, and break the filter operators
out into individual modules.
2013-05-25 17:26:22 +01:00