As mentioned in
TWikiFormattingInsideCells, some formatting cannot be properly rendered because we cannot include newlines in format parameters (e.g. in SEARCH).
This happens because the SEARCH tag is searched in the text as a single-line pattern.
If we insert newlines then the pattern is no more recognized.
Two solutions come to mind:
- change the pattern to a multi-line one
$text =~ s/%SEARCH{(.*)}%/&handleSearch($1)/ges;
- there is a drawback: multi-line patterns tend to eat each other ...
- or allow the
\n escape string in the original text. This can be handled in handleSearch (or whathever is its name) with a:
$format =~ s/\\n/\n/go ;
Proposal ... let do it!
--
AndreaSterbini - 05 Dec 2001
The second one is better. How about
$n instead of
\n as it is already in the
FormattedSearch?
A separate issue is the search itself. The external grep search is currently line oriented. If we change that then it should be done only with an additional switch, this is for compatibility reasons.
--
PeterThoeny - 06 Dec 2001
Hey! I did'nt notice it was already implemented!!!
Wonderful!
--
AndreaSterbini - 08 Dec 2001