this seems to work for me using the latest mwlib/mwlib.rl (i.e. it
produces a blockquoted "line1 line 2", just like my mediawiki
installation does...
> Plenty of examples for the various behaviours here:
> http://www.ict4e.net/wiki/Collection/issues
>
It look like our tree cleaner code moves the paragraph nodes to the
outer paragraph:
In [3]: uparser.simpleparse("<blockquote><div>bla\n\nblubb</div></blockquote>")
2009-02-25T13:22:09 parser.info >> Parsing "'unknown'"
Article 'unknown': 1 children
Paragraph '': 1 children
Style '-': 1 children
TagNode u'div': 2 children
Paragraph '': 1 children
u'bla'
Node '': 1 children
u'blubb'
Volker?
Regards,
- Ralf
Actually the treecleaner has nothing to do with the problem. There was a
bug in mwlib.rl which is fixed now.
But the handling of multi-paragraph blockquotes in mwlib.rl is a bit
awkward. To be precise the current solution is a little hackish: the
output is not a real blockquote but only left indented , the right
indentation of a "real" blockquote is missing. I hope this is not a problem.
Bjoern, why do you use multi-paragraph blockquotes anyway? Why not use
multiple single-paragraph blockquotes?
--
volker haas brainbot technologies ag
fon +49 6131 2116394 boppstraße 64
fax +49 6131 2116392 55118 mainz
volke...@brainbot.com http://www.brainbot.com/
Bjoern wrote:
> Hi Ralf, hi Volker,
>
> thanks for the responses, and good to hear that a fix is available.
>
> Is there a public version of the latest mwlib.rl, that I could point
> my Extension at? Or would I actually have to install the code from
> source to test?
>
>
I haven't built a new release of mwlib.rl so you have to install from
source or wait a couple of days. Installing from source is not
difficult, you need to install mercurial (version control software) and
check out the source. Instructions can be found at
http://code.pediapress.com/wiki/wiki/mwlib-install (note: instructions
are for mwlib -> installing mwlib.rl pretty much only requires to
replace mwlib by mwlib.rl)
>> But the handling of multi-paragraph blockquotes in mwlib.rl is a bit
>> awkward. To be precise the current solution is a little hackish: the
>> output is not a real blockquote but only left indented , the right
>> indentation of a "real" blockquote is missing. I hope this is not a problem.
>>
>
> That would be ok for me, especially if background colour is preserved
> (see above examples), which would allow to distinguish quoted text
> further.
>
I forgot to mention that an unpleasant surprise is waiting for you
there. The coloring in your examples was not handled correctly by
mwlib.rl. Coloring multiple paragraphs with a solid background color is
not possible right now.
I fear currently the only solution with which you will be able to
achieve what you want is to use tables. I know it's ugly by I don't have
a better idea currently. You also have to make sure that the table has
more than just a single column b/c these tables are removed (content is
kept).
>
>> Bjoern, why do you use multi-paragraph blockquotes anyway? Why not use
>> multiple single-paragraph blockquotes?
>>
>
> I'm logging a discussion from an email list to a mediawiki. It's quite
> easy to insert a {{quote| ... }} and then paste the email text, which
> might contain multiple paragraphs, as well as lists and other wiki
> markup. It's quite awkward to have to insert a {{quote|...}} around
> every paragraph. Also, it's quite good to have the {{quote| ...}}
> around contiguous paragraphs from the same email, to distinguish (at
> least in the wiki markup) when new emails start.
>
>
Ok, this makes sense.
Regards,
Volker
Bjoern wrote:
>
>
> The colour isn't essential, but I'd like to give the blockquote
> another attribute to distinguish it from the main flow of the text.
> Would other attributes of the div (such as italic font), or an <i> tag
> around the whole contents of the blockquote be handled correctly?
>
>
Using a <i> (or <em>) tag should do the trick. But I guess it would be
better to stick it inside the div if possible.