Item5941: nofinalnewline
attribute in SEARCH not working
Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
The
nofinalnewline
attribute does not seem to be working as described in documentation. As I understand the documentation, the following search within a table should not break the table by inserting a new line after the search results, yet it does.
| some text | %SEARCH{"WebHome" scope="topic" nonoise="on" limit="1" nofinalnewline="on" format="$topic" }% some more text | more |
And yet, the same search
without the
nofinalnewline
does work (ie is also the opposite of the docco):
--
TWiki:Main/LynnwoodBrown - 19 Aug 2008
VarSEARCH says:
If on, the search variable does not end in a line by itself. Any text continuing immediately after the search variable on the same line will be rendered as part of the table generated by the search, if appropriate. (default off
)
It'll be important to work out when the code changed, and why (probly because its a bad default)
--
SvenDowideit - 10 Nov 2008 - 06:57
Yes. This feature does the exact opposite of the documentation.
Best is to
- Fix it so it does what it says. Trying to make nofinalnewline="on" meaning add newline is damaging.
- Change the default so when you have not defined it, no newline is added.
Alternative is to remove this awful feature. If the default is not to add newline, then people will have added the newline by hitting return after the
SEARCH.
I will fix and change default for now.
Please review and think this over.
--
KennethLavrsen - 01 Apr 2010
Fix checked in
Unit test pending further
SEARCH fixes I am working on
--
KennethLavrsen - 01 Apr 2010
Unit test added. Waiting for release
--
KennethLavrsen - 01 Aug 2010