[docs] Change in FilterTag made by Rene Hertell

Rene Hertell docs@icdevgroup.org
Wed Jan 22 08:06:01 2003


> You can visit the live page at this URL:
> http://www.icdevgroup.org/i/doc/wiki/FilterTag.html
>
> Changed to match unix-filter line in Interpolate.pm
>
> --- tmp/VaNjGY2A:194.29.199.1.previous	Wed Jan 22 07:45:38 2003
> +++ tmp/VaNjGY2A:194.29.199.1.current	Wed Jan 22 07:45:38 2003
> @@ -10,7 +10,7 @@
>
>  Must pass named parameter interpolate=1 to cause interpolation.
>
> -This is a container tag, i.e. [filter] FOO [/filter]. Nesting: NO
> +This is a container tag, i.e. [filter] FOO . Nesting: NO
>
>  Invalidates cache: B<no>
>
> @@ -28,7 +28,7 @@
>   OR
>
>      $Tag->filter($op, $BODY);
> -    [filter op]
> +
>
>   Parameters   Description                               Default
>   op                                                     DEFAULT_VALUE
> @@ -45,7 +45,7 @@
>
>  B<Tag expansion example:>
>
> -    [filter op]
> +
>  ---
>      TODO: (tag result)
>
> @@ -71,7 +71,7 @@
>  database "LAST, First" so that they sort properly, you still might
>  want to display them normally as "First Last". This call
>
> -    [filter op="name namecase"]WOOD, Grant[/filter]
> +    Grant Wood
>
>  will display as
>
> @@ -79,7 +79,7 @@
>
>  Another way to do this would be:
>
> -    [data table=products column=artist key=99-102 filter="name namecase"]
> +
>
>  Filters available include:
>
> @@ -88,7 +88,7 @@
>  If you pass just a numeric argument, filter will return only first N
>  characters.  For example:
>
> - [filter 5]Interchange[/filter]
> + Inter
>
>  results in:
>
> @@ -96,7 +96,7 @@
>
>  By appending a ".", you can direct Interchange to append an ellipsis:
>
> - [filter 5.]Interchange[/filter]
> + Inter...
>
>  results in:
>
> @@ -150,7 +150,7 @@
>
>  I<entities>
>
> -Changes C<<> to &lt;, " to &quot;, etc.
> +Changes C<<> to <, " to ", etc.
>
>      'entities' => sub {
>                      return HTML::Entities::encode(shift);
> @@ -180,10 +180,9 @@
>  Looks up an item in a database based on the passed table and column.
>  Call would be:
>
> -    [filter op="uc lookup.country.name"]us[/filter]
> +    United States
>
> -This would be the equivalent of [data table=country column=name
> -key=US].
> +This would be the equivalent of United States.
>
>      'lookup' => sub {
>                          my ($val, $tag, $table, $column) = @_;
> @@ -214,7 +213,7 @@
>  I<namecase>
>
>  Namecases the text. Only works on values that are uppercase in the
> -first letter, i.e. [filter op=namecase]LEONARDO da Vinci[/filter] will
> +first letter, i.e. Leonardo da Vinci will
>  return "Leonardo da Vinci".
>
>      'namecase' => sub {
> @@ -289,7 +288,7 @@
>
>      'unix' =>   sub {
>                      my $val = shift;
> -                    $val =~ s/\r?\n/\n/g;
> +                    $val =~ s/\r\n|\r/\n/g;
>                      return $val;
>                  },
>
> @@ -336,11 +335,9 @@
>  associated variable or tag name, and any arguments appended to the
>  filter name with periods as the separator.
>
> -A [filter op=lookup.products.price]99-102[/filter] will send
> +A 99-102 will send
>  ('99-102', undef, 'products', 'price') as the parameters. Assuming the
> -value of the user variable foo is bar, the call [value
> -name=foo filter="lookup.products.price.extra"] will send ('bar',
> +value of the user variable foo is bar, the call  will send ('bar',
>  'foo', 'products', 'price', 'extra').
>
>  I<op>


I just changed one line (unix-filter), and the diff shows a lot more
changes... Is this because I tried to save it as  text/Wiki?

Rene