Tags:
create new tag
, view all tags
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 ;
    • this is safer
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

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2005-02-15 - SamHasler
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.