"Joel Nothman" <[email protected]> writes:

>
> As for mwlib:
>>>> mwlib.uparser.parseString('Test',
>>>> <table><tr><td>Foo</td></tr>\n{|\n|-\n|bar\n|}\nSome other
>>>> text').show()
> Article->'Test'
>       Table tagname='table'
>           Row tagname='tr'
>               Cell tagname='td'
>                   u'Foo'
>
> mwlib gave up in the middle of parsing, meaning that articles including
> this template are only parsed up until that template, and any further
> content is ignored.

Internally we parse the following:

,----
| >>> from mwlib.refine import core
| >>> s='<table><tr><td>Foo</td></tr>\n{|\n|-\n|bar\n|} Some other\n'
| >>> core.show(core.parse_txt(s))
| complex_table tagname='table'
|     complex_table_row tagname='tr'
|         complex_table_cell tagname='td'
|             t_text'Foo'
|     t_newline'\n'
|     complex_table tagname='table'
|         t_newline'\n'
|         complex_table_row tagname='tr'
|             t_newline'\n'
|             complex_table_cell tagname='td'
|                 t_text'bar'
|                 t_newline'\n'
|     t_text' Some other'
|     t_newline'\n'
`----

and then throw away everything that isn't a table row from the outer
table.

>
> This particular bug needn't be fixed, but can we please ensure that
> mwlib's parser outputs an error if it gives up when parsing a portion of
> the markup?

I've opened the following issue for this particular bug.

http://code.pediapress.com/wiki/ticket/888

Cheers,
- Ralf

-- 
You received this message because you are subscribed to the Google Groups 
"mwlib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/mwlib?hl=en.

Reply via email to