[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Broken link rewriting in snippets
From: |
John Mandereau |
Subject: |
Re: Broken link rewriting in snippets |
Date: |
Mon, 11 Aug 2008 18:41:07 +0200 |
2008/8/10 Reinhold Kainhofer <address@hidden>:
> The www-post script has another bug with link rewriting: For the snippets
> pages, it checks and replaces links using the regexp:
> r'href="(?:\.\./)?lilypond(|-internals|-learning|-program)'
> Unfortunately, "lilypond-snippets-big-page.html" also matches this regexp, so
> internal links in the snippets pages are also rewritten to point to
> Documentation/user/!
>
> Attached is a patch to fix this: I have to explicity add -snippets to the
> regexp and can only later on exclude those matches in a replacement function.
>
> Okay to push to master?
I think it's simpler to use a negative lookahead assertion -- i.e.
insert "(?!-snippets)" before the first pipe character -- in the
incriminated regexp. I'll test it before pushing such a change,
though, and will push your patch if I can't find something simpler.
Cheers,
John