Index: test/unit/WysiwygPlugin/TranslatorTests.pm =================================================================== --- test/unit/WysiwygPlugin/TranslatorTests.pm (revision 13970) +++ test/unit/WysiwygPlugin/TranslatorTests.pm (working copy) @@ -2728,6 +2728,40 @@
%MACRO{"
%ANOTHERMACRO%"}%
this will +disappear. + and + this will be surrounded by stars ++ +
This will disappear,
+leaving an empty pre-tag
+
+As will
+this.
+HERE
+ html => <<'HERE',
++
this will +disappear. + and + this will be surrounded by stars ++ +
+
+This will disappear,
+leaving an empty pre-tag
+
As will
+this.
+
+HERE
+ },
];
sub encodedWhitespace {
Index: lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm
===================================================================
--- lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm (revision 13970)
+++ lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm (working copy)
@@ -1128,7 +1128,7 @@
# whitespace
$contents =~ s/ /$WC::NBSP/go;
$contents =~ s/ /$WC::NBSP/go;
- $contents =~ /^($WC::WS)(.*?)($WC::WS)$/;
+ $contents =~ /^($WC::WS)(.*?)($WC::WS)$/s;
my ( $pre, $post ) = ( $1, $3 );
$contents = $2;
return ( 0, undef ) if ( $contents =~ /^ || $contents =~ />$/ );
@@ -1630,7 +1630,7 @@
unless ( $options & $WC::NO_BLOCK_TML ) {
my ( $flags, $text ) =
$this->_flatten(
- $options | $WC::NO_BLOCK_TML | $WC::BR2NL | $WC::KEEP_WS );
+ $options | $WC::NO_TML | $WC::BR2NL | $WC::KEEP_WS );
my $p = _htmlParams( $this->{attrs}, $options );
return ( $WC::BLOCK_TML, "<$tag$p>$text$tag>" );
}