On 04/01/04 22:29, Dirk Husemann wrote:

Hi,

seems like I'm on a roll here...sigh...might be that I'm doing something really wrong here...let me know kindly if I do ;-)

here's a bit of text:

OK, got it sorted myself: it seems that EtText2HTML.pm stumbles over text like this:

a b c d [[word]] f g.

h i j [[some label [word2]] k l.

at least under Perl 5.8.1 i had the effect that it would combine the first link and the second link --- and then of course not find a matching link definition. I've attached a patch (against EtText 2.3) that fixes this.

dirk

--
Dr Dirk Husemann, Krebsbachweg 4, CH-8134 Adliswil, Switzerland
Phone: +41 1 771 21 81                      Email: [EMAIL PROTECTED]
PGP public key: http://d2h.net/dirk/PGP
PGP finger print: BA7F B471 CC7E 5C97 4909  9B1B 2941 18AF 9413 523E
This email is only authentic if it is electronically signed.

Attached to this email is an electronic signature attachment. You can
ignore it if your email program does not know how to verify such a signature. If you'd like to learn more about this topic, www.gnupg.org
is a good starting point.

*** tmp/EtText2HTML.pm  2004-01-18 18:49:54.060499607 +0100
--- /usr/lib/perl5/site_perl/5.8.1/Text/EtText/EtText2HTML.pm   2002-09-21 
23:17:18.000000000 +0200
***************
*** 337,352 ****
    local ($_);
  
    # [[this is a link [label]]
!   # 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);
!              }gesx;
  
    # glossary links.
    if (defined $self->{glossary}) {
--- 345,354 ----
    local ($_);
  
    # [[this is a link [label]]
!   $$html =~ s{\[\[(.+?)\s+\[(.+?)\]\]}{               #"
      $self->link_write (1, $2, $1);
!   }ges;
  
    # glossary links.
    if (defined $self->{glossary}) {
  

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to