1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-07 20:44:23 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/filters/trim Operator.tid
Robin Munn 5202441769
Add suffix and parameter to trim operator (#4811)
* Add suffix and parameter to trim operator

Fixes #4809

* Unit tests for new trim operator parameters

* Mention trim operator in 5.1.23 release notes

* Address review comments

* Move regex escaping into utils.js trim functions

This way the trimPrefix and trimSuffix functions from utils.js are safe
to call without regex-escaping their parameters, which should make them
easier to use from other parts of the Javascript code.
2020-08-29 12:27:58 +01:00

17 lines
688 B
Plaintext

caption: trim
created: 20190613153740241
modified: 20190613153820282
op-purpose: returns each item in the list with whitespace, or a given character string, trimmed from the start and/or end
op-input: a [[selection of titles|Title Selection]]
op-parameter: <<.from-version "5.1.23">> a string of characters
op-parameter-name: S
op-output: the input titles with <<.place S>>, or whitespace if <<.place S>> is not specified, trimmed from the start and/or end
tags: [[Filter Operators]]
title: trim Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">>
<<.from-version "5.1.23">>The <<.op trim>> filter allows a parameter specifying a string to trim.
<<.operator-examples "trim">>