Changeset 6203
- Timestamp:
- 02/02/10 01:59:04 (2 years ago)
- Location:
- trunk/WysiwygPlugin
- Files:
-
- 3 edited
-
lib/Foswiki/Plugins/WysiwygPlugin/TML2HTML.pm (modified) (1 diff)
-
test/unit/WysiwygPlugin/ExtendedTranslatorTests.pm (modified) (2 diffs)
-
test/unit/WysiwygPlugin/TranslatorTests.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/TML2HTML.pm
r5573 r6203 189 189 return '' unless defined($text); 190 190 191 my @queue = split( /(\n?%)/s, $text ); 191 #SMELL: why put a \n into the split? (at least document it..) 192 # my @queue = split( /(\n?%)/s, $text ); 193 #SVEN: I've removed the extra \n capture, and am seeing what the tests tell me.. 194 # doing so removes an (so far) unexplaind <br /> that was put into the WYSIWYG_PROTECTED bloc.. 195 # eg. <span class="WYSIWYG_PROTECTED"><br />%TABLESEP%</span> 196 #SMELL: having removed the \n from the split, the code below now _should_ be rewritten to remove the 197 # other processing of the \n. For now (Feb2010), I've left it as is, so that we can revert to the old 198 # code if/when someone figures out why it was in the split in the first place. 199 my @queue = split( /(%)/s, $text ); 192 200 my @stack; 193 201 my $stackTop = ''; -
trunk/WysiwygPlugin/test/unit/WysiwygPlugin/ExtendedTranslatorTests.pm
r6133 r6203 652 652 <tr><td><span class="WYSIWYG_LINK">[[LegacyTopic1]]</span></td><td><span class="WYSIWYG_LINK">Main.SomeGuy</span></td></tr> 653 653 </table> 654 <span class="WYSIWYG_PROTECTED"> <br />%TABLESEP%</span>655 <span class="WYSIWYG_PROTECTED"> <br />%SEARCH{"legacy" nonoise="on" format="| [[\$topic]] | [[\$wikiname]] |"}%</span>654 <span class="WYSIWYG_PROTECTED">%TABLESEP%</span> 655 <span class="WYSIWYG_PROTECTED">%SEARCH{"legacy" nonoise="on" format="| [[\$topic]] | [[\$wikiname]] |"}%</span> 656 656 THERE 657 657 }, … … 669 669 <tr><td><span class="WYSIWYG_LINK">[[LegacyTopic1]]</span></td><td><span class="WYSIWYG_LINK">Main.SomeGuy</span></td></tr> 670 670 </table> 671 <span class="WYSIWYG_PROTECTED"> <br />%SEARCH{"legacy" nonoise="on" format="| [[\$topic]] | [[\$wikiname]] |"}%</span>671 <span class="WYSIWYG_PROTECTED">%SEARCH{"legacy" nonoise="on" format="| [[\$topic]] | [[\$wikiname]] |"}%</span> 672 672 THERE 673 673 }, -
trunk/WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorTests.pm
r6132 r6203 667 667 name => 'variousWikiWords', 668 668 html => 669 "<p>${linkon}WebPreferences${linkoff}</p><p>$protecton <br />%MAINWEB%$protectoff.WikiUsers</p><p>${linkon}CompleteAndUtterNothing${linkoff}</p><p>${linkon}LinkBox$linkoff${linkon}LinkBoxs${linkoff}${linkon}LinkBoxies${linkoff}${linkon}LinkBoxess${linkoff}${linkon}LinkBoxesses${linkoff}${linkon}LinkBoxes${linkoff}</p>",669 "<p>${linkon}WebPreferences${linkoff}</p><p>$protecton%MAINWEB%$protectoff.WikiUsers</p><p>${linkon}CompleteAndUtterNothing${linkoff}</p><p>${linkon}LinkBox$linkoff${linkon}LinkBoxs${linkoff}${linkon}LinkBoxies${linkoff}${linkon}LinkBoxess${linkoff}${linkon}LinkBoxesses${linkoff}${linkon}LinkBoxes${linkoff}</p>", 670 670 tml => <<'YYY', 671 671 WebPreferences … … 1981 1981 <tr><td><span class="WYSIWYG_LINK">[[LegacyTopic1]]</span></td><td><span class="WYSIWYG_LINK">Main.SomeGuy</span></td></tr> 1982 1982 </table> 1983 <span class="WYSIWYG_PROTECTED"> <br />%TABLESEP%</span>1984 <span class="WYSIWYG_PROTECTED"> <br />%SEARCH{"legacy" nonoise="on" format="| [[\$topic]] | [[\$wikiname]] |"}%</span>1983 <span class="WYSIWYG_PROTECTED">%TABLESEP%</span> 1984 <span class="WYSIWYG_PROTECTED">%SEARCH{"legacy" nonoise="on" format="| [[\$topic]] | [[\$wikiname]] |"}%</span> 1985 1985 THERE 1986 1986 }, … … 1996 1996 <tr><td><span class="WYSIWYG_LINK">[[LegacyTopic1]]</span></td><td><span class="WYSIWYG_LINK">Main.SomeGuy</span></td></tr> 1997 1997 </table> 1998 <span class="WYSIWYG_PROTECTED"> <br />%SEARCH{"legacy" nonoise="on" format="| [[\$topic]] | [[\$wikiname]] |"}%</span>1998 <span class="WYSIWYG_PROTECTED">%SEARCH{"legacy" nonoise="on" format="| [[\$topic]] | [[\$wikiname]] |"}%</span> 1999 1999 THERE 2000 2000 }, … … 2233 2233 exec => $ROUNDTRIP | $CANNOTWYSIWYG, 2234 2234 tml => '<!-- <sticky></sticky> -->', 2235 }, 2236 { 2237 name => "ItemSVEN", 2238 exec => $TML2HTML | $ROUNDTRIP, 2239 tml => <<'HERE', 2240 --- 2241 2242 %SEARCH{search="Sven"}% 2243 HERE 2244 finaltml => <<'HERE', 2245 --- 2246 2247 %SEARCH{search="Sven"}% 2248 HERE 2249 html => <<'HERE', 2250 <p> 2251 <hr class="TMLhr" /> 2252 </p> 2253 <p> 2254 <span class="WYSIWYG_PROTECTED">%SEARCH{search="Sven"}%</span> 2255 </p> 2256 HERE 2235 2257 }, 2236 2258 ];
Note: See TracChangeset
for help on using the changeset viewer.
