--- EtText2HTML.pm 2004-03-26 00:50:27.000000000 +0000
+++ ../../../../../Text-EtText-2.3/lib/Text/EtText/EtText2HTML.pm 2019-07-05 16:05:08.000000000 +0100
@@ -250,7 +250,7 @@
}geis;
# protect WebMake perl code, <{set}> decls, etc.
- $$html =~ s{<{(.*?)}>}{
+ $$html =~ s{<\{(.*?)\}>}{
$_ = $1; $self->protect_html(\$_); "<{$_}>";
}geis;
@@ -304,12 +304,12 @@
my ($self, $html) = @_;
local ($_);
- $$html =~ s{^\s+\[([^\]]+)\]\:\s+(\S+)\s*$}{
- $self->{links}->{$1} = $2; "\n";
+ $$html =~ s{^\s+\[([^\]]+)\]\:\s+(\S+)\s*?$/}{
+ ( $self->{links}->{$1} = $2 ) =~ s/&(?!amp;)/&/g; '';
}giem;
- $$html =~ s{^\s+Auto:\s+\[([^\]]+)\]\:\s+(\S+)\s*$}{
- $self->{auto_links}->{$1} = $2; "\n";
+ $$html =~ s{^\s+Auto:\s+\[([^\]]+)\]\:\s+(\S+)\s*?$/}{
+ ( $self->{auto_links}->{$1} = $2 ) =~ s/&(?!amp;)/&/g; '';
}giem;
}
@@ -345,9 +345,17 @@
local ($_);
# [[this is a link [label]]
- $$html =~ s{\[\[(.+?)\s+\[(.+?)\]\]}{ #"
+ # make sure we don't get caught on a glossary link followed by link-label
+ $$html =~ s{\[\[ # double left square brackets
+ ([^\]]+?) # anything but closing square bracket
+ \s+ # whitespace
+ \[ # opening square bracket
+ ([^\]]+?) # anything but closing square bracket
+ \]\] # double closing square brackets
+ }{
+
$self->link_write (1, $2, $1);
- }ges;
+ }gesx;
# glossary links.
if (defined $self->{glossary}) {
@@ -574,19 +582,19 @@
# do headings.
$$html =~ s{(^\n+|\n\n)([^\n]+)[ \t]*\n-{3,}\n}{
my ($pre, $text, $name) = ($1, $2, make_a_name($2));
- "$1$2
\n\n";
+ "$1
'; $end = ''; } elsif ($self->{listblock} == $LIST_BQ && $self->{listtype} =~ /^>/) { # looks good in Netscape ;) - $start = '
'; $end = ''; + $start = '
'; } elsif ($self->{listblock} == $LIST_BQ) { - $start = ''; $end = '
'; $end = ''; + $start = '
'; } my $pstart = ''; @@ -511,7 +511,7 @@ s!(ul|ol|dl)>!$1>!gs; # oops, don't wrap headings in P tags - s/'; $end = '
([^\n]+ (\s*