diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-10-25 18:35:20 -0400 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-10-25 18:35:20 -0400 |
commit | 541bb26bb74c136800bb2725f5feb7aa8a0bf2dd (patch) | |
tree | 35cf7d3b9fffeb4d15e75fb310e5d6b623b3a09e /txr.1 | |
parent | ff1b29724a2edbfd2764dba6c92a66c530515baf (diff) | |
download | txr-541bb26bb74c136800bb2725f5feb7aa8a0bf2dd.tar.gz txr-541bb26bb74c136800bb2725f5feb7aa8a0bf2dd.tar.bz2 txr-541bb26bb74c136800bb2725f5feb7aa8a0bf2dd.zip |
* match.c (filter_s): New symbol variable.
(v_filter): New function.
(syms_init): New symbol variable initialized.
(dir_tables_init): New function entered into table.
* txr.1: Documented new filter directive.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1076,6 +1076,10 @@ have different special characters or other syntax, requiring escaping or similar treatment. Note that it is also possible to use a function as a filter. See Function Filters below. +.IP @(filter) +The filder directive passes one or more variables through a given +filter or chain or filters, updating them with the filtered values. + .PP .SS The Next Directive @@ -3157,6 +3161,20 @@ same left hand string with different right hand translations, the later ones take precedence. No warning is issued. +.SS The Filter Directive + +The syntax of the filter directive is: + + @(filter FILTER { VAR }+ } + +A filter is specified, followed by one or more variables whose values +are filtered and stored back into each variable. + +Example: convert a, b, and c to upper case and HTML encode: + + @(filter (:upcase :to_html) a b c) + + .SH EXCEPTIONS .SS Introduction |