Commit Graph

17 Commits

Author SHA1 Message Date
Jeremy Ruston 801ed0ea11 Fix cycle operator crashing if step size is larger than the number of operands
See https://talk.tiddlywiki.org/t/bug-report-javascript-error-at-tw-com-within-cycle-operator-try-it/9430/1
2024-03-26 16:04:13 +00:00
Joe Bordes 82ec63e711
style(App) eliminate whitespace at the end of code lines (#5735) 2021-05-30 19:20:17 +01:00
Saq Imtiaz 4079f72310
Fix typo in x-listops.js (#5171) 2020-12-01 18:14:07 +00:00
saqimtiaz 4f07539164
Cycle operator improvements plus docs (#5069)
* Tweak cycle operator to support step size parameter and add docs for toggle and cycle

* Mention that title list should have no duplicates
2020-11-20 18:37:23 +00:00
saqimtiaz fc1721709a
Cycle operator and refactored toggle operator (#5021)
* Refactored toggle operator and added cycle operator

* Better handling for operand case

* Syntax/whitespace corrections
2020-11-16 17:02:04 +00:00
saqimtiaz 13499557bf
Fix whitespace in x-listops.js and tweak toggle operator (#5024)
* Replaced leading spaces with tabs

* Tweak toggle[] to insert new value in same list position
2020-11-15 16:04:03 +00:00
saqimtiaz 445c15e719
Extend toggle operator (#5015)
* Extend toggle operator to support optional second operand to toggle a value pair

* Added tests for extended toggle filter

* Updated docs for toggle operator
2020-11-09 18:27:45 +00:00
saqimtiaz c41e34793d
Add x-listops filter toggle (#4990) 2020-11-07 10:00:47 +00:00
Jeremy Ruston dd7837d164 Fix issue with allafter operator
Fixes #3962
2019-06-11 09:38:14 +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
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
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
William Jackson 48987e186a Tidied up the code in the filters 2015-12-28 10:31:39 +02:00
William Jackson befb13dde1 Update x-listops.js
Change default suffix for append[], prepend[] and remove[] operators from 1 to All
2015-11-08 09:49:07 +02:00
William Jackson 817882a404 Update x-listops.js
Added prefix and suffix options to 'append' and 'prepend' operators
2015-10-27 10:17:07 +02:00
William Jackson 3e445b8853 Update x-listops.js
Corrected the logic of the 'allafter' filter and added a new 'move' filter.
2015-10-22 16:40:36 +02:00
William Jackson 49894abaf4 Create x-listops.js
These filters are designed to be used with the action-listops widget.
2015-10-18 18:37:08 +02:00