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

164 Commits

Author SHA1 Message Date
Jermolene
754c1251a9 Add new "variables" and "getvariables" operators 2019-03-30 10:52:28 +00:00
Simon Huber
784db30614 Fix removesuffix filter when title is undefined (#3827) 2019-03-11 09:37:49 +00:00
Jermolene
b862348b06 Fix !is[variable] operator
Fixes #3804
2019-02-28 11:54:04 +00:00
Jermolene
36e76429b1 Add is[variable] filter
See discussion here https://groups.google.com/d/topic/tiddlywiki/4rEuAWc4EpM/discussion
2019-02-25 13:08:22 +00:00
Jermolene
9d7d3fefa0 Split operator: Remove empty strings when splitting
See the discussion on 9b2d527; thanks @kookma
2019-02-08 15:59:07 +00:00
Jermolene
7df58a6813 Fixed bug with length operator
Thanks @BurningTreeC
2019-02-07 12:56:12 +00:00
Jermolene
dc29acd656 Fixed bug with split operator 2019-02-07 12:45:07 +00:00
Jermolene
9b2d52716a Add new string operators: length, join, split, concat etc. 2019-02-07 11:18:53 +00:00
Jermolene
64b665e706 More maths operators 2019-02-07 11:18:32 +00:00
Jermolene
0ea00b59b0 Add numeric maths filter operators
There are other ways we could add maths to TW5 (including @EvanBalster's awesome https://github.com/EvanBalster/TiddlyWikiFormula) but the approach here has the merit of simplicity because it reuses the existing filter evaluation mechanism. That means that it's not ordinary "2+2" maths, it's a unique list processing language...

Docs to come

Fixes #254
2019-02-06 14:19:55 +00:00
Evan Balster
b9df224f99 Change to natural counting in range[N] operator (#3609)
* Add range operator and documentation

* Use 1-based counting in range[N], update docs
2018-12-02 08:39:28 +00:00
Jeremy Ruston
33dd367a65
Introduce new subfilter operator (#3508) 2018-11-16 11:27:19 +00:00
Jermolene
b584295831 Fix crash with search operator with blank field list 2018-11-01 12:56:56 +00:00
Jeremy Ruston
6dcdc2049a
Enhance search operator (#3502)
* Enhance search operator

* Add support for searching all fields

and also searching all fields except nominated fields.

* Docs tweaks

Thanks @pmario

* Error message improvements

* Improve error message formatting
2018-10-30 17:39:18 +00:00
Jermolene
874318091e Fix crash with illegal arguments to decodeuri(component)
Fixes #3428
2018-09-09 20:48:53 +01:00
Jermolene
763f8afaf2 Add "contains" filter operator for searching list fields 2018-08-15 13:50:07 +01:00
Jermolene
8520c9d8fd Coding style tweaks for #3346 2018-07-19 21:48:40 +01:00
Evan Balster
be58de8409 Add range operator and documentation (#3346) 2018-07-19 21:42:09 +01:00
Jermolene
737e9ae4cb Revert multiple suboperator functionality from the "is" operator
See the discussion here: https://github.com/Jermolene/TiddlyWiki5/pull/3240#issuecomment-388035466
2018-05-10 13:15:49 +01:00
Matt Lauber
0ab9ec1ad3 Refactored the is operator for simplicity and efficiency. (#3240)
* Refactored the is operator for simplicity and efficiency.

* Improve `is` filter documentation.

* Update is.js

* extracted `subops.length` to `num_of_subops`
* renamed `subop` to `operator` for clarity/differentiation from `subops`
* refactored to avoid using a `Set` object.

* Update is.js
2018-05-09 18:07:08 +01:00
Matt Lauber
5ea6c9a273 Modify the is operator to allow multiple types to be specified. (#2982)
* Modify the is operator to allow multiple types to be specified.

* Fixed indentation.

* Fixed indentation.

* Rewritten to maintain input order when multiple filters provided.

* Updated documentation.

* Update is.tid
2018-04-12 13:21:49 +01:00
Jermolene
47cdf55133 Add new subtiddlerfields filter operator 2018-04-03 17:48:01 +01:00
Skeeve
6401b5c886 Now fixing bug mentioned in groups (#3188)
* fixed the "0 is not a number bug" in listops and x-listops

* Fixed one comment

* "default" is not a good name for a variable

* Following code styles.
Moving getInt to utils.

* Removing unwanted spaces introduced by me
2018-04-02 19:40:47 +01:00
Rizwan
2b0204422d Sortan filter for alpha-numeric filter (#3134)
* Sortan filter for alpha-numeric filter

* Removing Case sensitive option, Removing default value for isAlphanumeric parameter, updating formatting

* Formatting changes

* Formatting changes
2018-03-05 11:09:25 +00:00
Skeeve
5963adf92e Bugfix/3117 inconsistent each (#3124)
* Following Jeremy's proposal of using a new suffix

* typo fixed
2018-02-17 18:51:18 +00:00
Jermolene
e4b10d42f9 Optimise the tag filter
Spending a bit more time with Chrome dev tools, and further to 254e1ca, this optimisation reduces the rendering time for the sample TOC from 1.9s to about 0.9s...
2017-12-21 16:13:47 +00:00
Jermolene
d7a6816307 Add jsonstringify operator 2017-10-29 15:53:53 +00:00
Jermolene
aa417fe899 Add new "lookup" filter 2017-09-07 15:48:00 +01:00
Xavier Cazin
a7b57d7f97 allbefore:include should be the identity function when applied to 1st item (#2842)
* fr-FR translation of additional error strings

* allbefore:include should be the identity function when applied to the 1st item
2017-06-29 18:02:33 +01:00
Jermolene
f4656b0f25 Add support dragging to the bottom of a list 2017-03-20 22:02:55 +00:00
Jermolene
eba1c3c160 Improve support for drag and drop
Documentation TBD
2017-03-19 19:33:56 +00:00
Jermolene
ad1c2a6571 Fix problem with 'has' operator
Fixes problem introduced in 6085936475
2017-02-23 14:27:43 +00:00
Tobias Beer
6085936475 Introduce "field" suffix for "has" filter operator (#2066)
* has:field — tested & documented

allows to test whether a field exists

* fixed inverted condition

* added from version to docs
2017-02-22 12:13:59 +00:00
Jermolene
cd2bc88658 Add "enlist" operator
Fixes #2767
2017-02-21 15:17:47 +00:00
Jermolene
9fc2086b71 Optimise sameday filter
I used this test:

console.time();for(var t=0; t<200; t++)
{$tw.wiki.filterTiddlers("[all[tiddlers+shadows]sameday[20170210]]");};c
onsole.timeEnd()

Before this patch, I got speeds of approx 190ms, versus 140ms
afterwards.

Note that the ability to add a cache property like this is only
possible because tiddler objects are immutable.
2017-02-21 08:31:05 +00:00
Jermolene
73ded6a82a Add new "count" filter operator
See discussion here:
https://groups.google.com/d/msgid/tiddlywiki/fe51b7f5-5369-493b-82e5-94c
18e863fe0%40googlegroups.com?utm_medium=email&utm_source=footer
2017-02-08 20:11:44 +00:00
Matt Lauber
9c3a6976f0 #2312 Prevent move filter from wrapping (#2658)
given a list `A B C D` if I run `A B C D +[move:-1 [A]]` I get `B C A D`.  However, if I were to do `A B C D +[move:1[D]]` it doesn't wrap around, and I get `A B C D`.  This fixes that such that `A B C D +[move:-1 [A]]` gives 'A B C D`
2016-12-16 17:58:45 +00:00
Jermolene
9a38642141 Add new "order" filter operator 2016-11-28 19:16:08 +00:00
Jermolene
a3dc3b4b98 Add new [all[tags]] filter operator 2016-11-28 19:04:04 +00:00
Jermolene
c65d08240b Add strict mode to tag operator 2016-11-28 13:42:30 +00:00
Jermolene
c460cc03a4 Change "is" filter with blank operand to pass through arguments 2016-11-28 13:42:06 +00:00
Jeremy Ruston
a9b54d6fce Revert "Add provisional version of new tagger manager" 2016-11-28 10:40:55 +00:00
Jermolene
8e033eb0d4 Add new "all[tags]" filter operator 2016-11-27 14:52:04 +00:00
Jermolene
0b4669621a Return all tiddlers when "is" filter operand is missing 2016-11-27 14:51:51 +00:00
Jermolene
e98d324e66 Add provisional version of new tagger manager
For discussion
2016-11-26 12:48:47 +00:00
Jermolene
b4b77d1681 Add new filter operators for various string encoding/decodings 2016-10-18 09:18:32 +01:00
Jermolene
ffcbcbfa82 Add new 'minlength' operator
Fixes #1493
2016-10-11 09:26:20 +01:00
Tobias Beer
f575389d89 Update wikiparserrules operator for no operand (#2193)
* return all wikiparserrules w/o operand

* simpler layout & code / updated instruction details

Also wanted to link each rule to the official docs using a dictionary at
`$:/language/Docs/ParserRules/`. However, without #2194 this is not
doable.
2016-10-08 13:04:11 +01:00
Myeongjin
6388f859d1 Add localisable strings for error (#2447)
* Add localisable strings for error

* Update tiddler Transclusion Basic Usage in fr-FR
2016-05-17 21:58:47 +01:00
nameanyone
19ee5bcf4e "days" filter: yesterday and tomorrow edge cases (#2364)
* Change the negation logic to address an edge case

Make it possible to get an interval ending with yesterday or starting with tomorrow.

* "days" filter: adjust documentation
2016-04-27 17:23:46 +01:00