Last modified: 2014-09-23 23:51:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T3581, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 1581 - pre over multiple lines in lists
pre over multiple lines in lists
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.4.x
All All
: Low enhancement with 5 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: need-parsertest, newparser, patch, patch-need-review
: 3768 3989 6333 6668 6764 7417 9989 11455 22785 25384 32365 (view as bug list)
Depends on: 785 1115
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-24 11:07 UTC by Christoph Dittberner
Modified: 2014-09-23 23:51 UTC (History)
18 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Parser test (708 bytes, patch)
2008-01-11 19:01 UTC, Carl Fürstenberg
Details
Patch to fix <pre> in lists problem (460 bytes, patch)
2009-11-17 17:16 UTC, Ingo Rohloff
Details
Patch to fix <pre> in lists problem 2nd try (1007 bytes, patch)
2009-11-18 13:06 UTC, Ingo Rohloff
Details

Description Christoph Dittberner 2005-02-24 11:07:13 UTC
------- examples start -------

==origin==
<ul><li>line before  <pre>multiple lines
multiple lines
multiple lines</pre> line after
</li></ul>

==example 1==
*line before  <pre>single line</pre> line after
==example 2==
*line before  <pre>multiple lines
multiple lines
multiple lines</pre> line after
==example 3==
*line before  <pre>multiple lines
*:multiple lines
*:multiple lines</pre> line after

------- examples end -------

Example 2 or 3 should be rendered like the origin.
Comment 1 Ian Neubert 2005-06-22 22:19:25 UTC
Did you try example 2 like so:

==example 2==
*line before  <pre><nowiki>multiple lines
multiple lines
multiple lines</nowiki></pre> line after

I have a problem though with the next bullet, for example:
==example 4==
#line before  <pre><nowiki>multiple lines
multiple lines
multiple lines/</pre> line after
#bullet after

Results in the "bullet after" line not getting the <li></li> and the </ol>
ending after the </pre> 
Comment 2 Ian Neubert 2005-06-22 22:20:46 UTC
I should note I'm running MediaWiki 1.4.2 + ENotif+EAuthent v3.09
Comment 3 Christoph Dittberner 2005-06-23 07:24:21 UTC
(In reply to comment #1)
> Did you try example 2 like so:
> 
> ==example 2==
> *line before  <pre><nowiki>multiple lines
> multiple lines
> multiple lines</nowiki></pre> line after
> 

No, I tried it like I wrote ;)

IMHO it is a "pre-render-bug in list context". We wanted to use mediawiki as
knowledge database solution. Therefore the usage has to be fast and simple AND
''consistent''. 
It mustn't be the solution to include a parser error in nowiki-tags.
 
Comment 4 Ian Neubert 2005-06-23 17:14:17 UTC
Isn't this a duplicate of bug 785?
Comment 5 Brion Vibber 2005-06-23 18:29:16 UTC
Multi-line markup isn't even *expected* to work in lists. This may just be bug 785 and bug 1115.
Comment 6 Brion Vibber 2005-10-21 21:13:17 UTC
*** Bug 3768 has been marked as a duplicate of this bug. ***
Comment 7 Brion Vibber 2005-11-16 23:09:32 UTC
*** Bug 3989 has been marked as a duplicate of this bug. ***
Comment 8 JiangXin 2005-11-17 01:49:12 UTC
#list1
#:<pre>
blah blah blah
</pre>
#list2

My patch on this is here:  http://meta.wikimedia.org/wiki/User:Jiangxin/Patch_Indent_Pre
Comment 9 JiangXin 2005-11-17 07:30:00 UTC
I have one single solution to fix both this(bug 1581) and another bug (1115).
Please check it:

* http://bugzilla.wikimedia.org/show_bug.cgi?id=1115
* http://meta.wikimedia.org/wiki/User:Jiangxin/Patch_Blankline_As_List_Terminator
Comment 10 Brion Vibber 2006-06-17 00:20:02 UTC
*** Bug 6333 has been marked as a duplicate of this bug. ***
Comment 11 Brion Vibber 2006-07-13 18:29:01 UTC
*** Bug 6668 has been marked as a duplicate of this bug. ***
Comment 12 Brion Vibber 2006-07-21 04:47:13 UTC
*** Bug 6764 has been marked as a duplicate of this bug. ***
Comment 13 Brion Vibber 2006-09-26 14:43:13 UTC
*** Bug 7417 has been marked as a duplicate of this bug. ***
Comment 14 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-05-21 15:41:25 UTC
*** Bug 9989 has been marked as a duplicate of this bug. ***
Comment 15 Brion Vibber 2007-09-26 18:27:37 UTC
*** Bug 11455 has been marked as a duplicate of this bug. ***
Comment 16 Carl Fürstenberg 2008-01-11 19:01:29 UTC
Created attachment 4531 [details]
Parser test

Parser test for the following input: 

*line before  <pre>multiple lines
multiple lines
multiple lines</pre> line after
*line before  <pre>multiple lines
*:multiple lines
*:multiple lines</pre> line after
Comment 17 Ingo Rohloff 2009-11-17 17:16:03 UTC
Created attachment 6797 [details]
Patch to fix <pre> in lists problem

The PHP code actually looks like this patch implements the INTENDED behaviour.
Comment 18 Ingo Rohloff 2009-11-18 13:06:38 UTC
Created attachment 6800 [details]
Patch to fix <pre> in lists problem 2nd try

Ok, seems the patch has to do a little bit more.

Some more explanation: 
the "mInPre" flag in "Parser.php" already is used to handle the interaction between lists and "<pre>" flags. 
For example
<pre>
#  first line
#  second line
</pre>
already escapes the interpretation of the "#" signs. So this will NOT generate a list.

From this "mInPre" handling it seems obvious that 
# first line 
# second line <pre>
  some preforamatted
  text with more than
  onle line
</pre>
# third line

should also work and the code in "Parser->doBlockLevels" already ALMOST allows it. To me it seems the whole "mInPre" stuff already was supposed to handle the above WIKI markup.
I think my patch just fixes the "Parster->doBlockLevels" code in the sense that it provides the INTENDED behaviour.
Comment 19 p858snake 2011-04-30 00:10:01 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 20 au 2012-06-17 11:52:40 UTC
Hi Carl & Ingo, thank you for the patch!

As you may already know, MediaWiki is currently revamping its PHP-based parser into a "Parsoid" prototype component, to support the rich-text Visual Editor project:

   https://www.mediawiki.org/wiki/Parsoid
   https://www.mediawiki.org/wiki/Visual_editor

Folks interested in enhancing the parser's capabilities are very much welcome to join the Parsoid project, and contribute patches as Git branches:

   https://www.mediawiki.org/wiki/Git/Tutorial#How_to_submit_a_patch

Compared to .diff attachments in Bugzilla tickets, Git branches are much easier for us to review, refine and merge features together.

Each change set has a distinct URL generated by the "git review" tool, which can be referenced in Bugzilla by pasting its gerrit.wikimedia.org URL as a comment.

If you run into any issues with the patch process, please feel free to ask on irc.freenode.net #wikimedia-dev and the wikitext-l mailing list. Thank you!
Comment 21 Tim Landscheidt 2012-10-07 03:28:25 UTC
*** Bug 22785 has been marked as a duplicate of this bug. ***
Comment 22 Brad Jorsch 2013-04-09 16:01:37 UTC
*** Bug 25384 has been marked as a duplicate of this bug. ***
Comment 23 Brad Jorsch 2013-04-09 16:02:22 UTC
*** Bug 32365 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links