[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wikitech-l
Subject:    Re: [Wikitech-l] tag-extension...displaying only the matched content
From:       "Thomas Dalton" <thomas.dalton () gmail ! com>
Date:       2007-10-29 20:26:44
Message-ID: a4359dff0710291326t3ac25e6eud4e090db96eb5982 () mail ! gmail ! com
[Download RAW message or body]

On 28/10/2007, demagggus <magggus@gmx.de> wrote:
> > The empty lines might have to be with the new lines between </section>
> > and the next <section> Try setting everything on one line.
> >
>
> Seems you're right. Although I can't really follow the way the content is parsed
> and rendered.
> Somebody who can explain it to me maybe?

Your code tells the parser to replace the contents on the appropriate
tags with the empty string, so it just displays everything that is
outside the tags. The line breaks (which are, in effect, a character
like any other) are outside the tags, so aren't replaced by your code.

<section lang=en>Foobar</section>(line break)

Parses to:

(line break)

Which displays as a blank line. You need the (line break) to be inside
the section tag, so it doesn't display:

<section lang=en>Foobar(line break)</section>

ie. you need to write:

<section lang=en>Foobar
</section>

Does that make more sense?

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic