Implemented: Formatted Search with Newline Filter
New
newline="" parameter for
SEARCH variable, effective only for
FormattedSearch. It can redefine the newlines
within a search hit. This complements the
separator parameter that determines the separator
between search hits.
Example usage: Specify
newline="%BR%" if you have a formatted search in table format and a search hit has newlines. This can happen if the
format="" parameter contains a
$pattern() that captures more then one line.
Contributors:
--
PeterThoeny - 07 Oct 2004
Discussions
This little feature enhancement was needed for a
TWikiApplication.
In
SVN but not yet on TWiki.org.
--
PeterThoeny - 07 Oct 2004
Fantastic! - This is a great feature when working with |-style table formatting (e.g. when using the features of
TablePlugin), avoiding
%SEARCH% results containing newlines breaking the tables. We've spend quite some time getting people to write stuff like
%BR% \ in front of newlines in forms with textareas (and correcting errors when they forgot to do it anyway *g*).
Looking forward to seeing this in the next release :-). When building
TWikiApplications, of course it would be "the easiest", if the default was to have the search use
%BR% pr default, and you'd have to specify
\n explicitely .. but well, I guess most people getting into building
TWikiApplications will be aware of the difference anyway - and will be sure to make the results act "their way".
--
SteffenPoulsen - 26 Oct 2004
Thanks Steffen for documenting this feature in TWiki 4, I totally forgot about this feature!
No, beter not to turn on this by default since not everybody is using TWiki table rows as the search output format. If you generate an
HTML table row it is perfectly possible to add a pattern output that spans multiple lines (which might include bullets for example.)
--
PeterThoeny - 01 Aug 2006