Last modified: 2014-09-23 23:32:04 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 T11760, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9760 - Multiline headers don't show in TOC
Multiline headers don't show in TOC
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser, patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-02 09:37 UTC by Jon Le Gras
Modified: 2014-09-23 23:32 UTC (History)
3 users (show)

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


Attachments
Parsertest fror bug 9760 (2.12 KB, patch)
2007-05-02 10:12 UTC, Platonides
Details

Description Jon Le Gras 2007-05-02 09:37:07 UTC
I have found a very strange formatting problem.  I can work around it, but 
there might be a better solution?

If I use the following heading in a Wiki Page:
---------- cut ----------
<table width="100%" cellpadding="2" cellspacing="5" style="vertical-
align:top;background-color:#f5fffa">
<tr>
<th><h2 style="margin:0;background-color:#cef2e0;font-size:120%;font-
weight:bold;border:1px solid #a3bfb1;text-align:left;color:#000;padding:0.2em 
0.4em;">Example Table</h2>
</th></tr>
<tr>
<td style="color:#000"><div style="float:left;margin-right:0.9em">
<p>
=== Introduction ===
=== Overview ===
=== More Detail ===
=== Even More Detail ===
=== Summary ===
</p>
---------- cut ----------

But if I use the following:
---------- cut ----------
<table width="100%" cellpadding="2" cellspacing="5" style="vertical-
align:top;background-color:#f5fffa">
<tr>
<th><h2 style="margin:0;background-color:#cef2e0;font-size:120%;font-
weight:bold;border:1px solid #a3bfb1;text-align:left;color:#000;padding:0.2em 
0.4em;">Example
 Table</h2>
</th></tr>
<tr>
<td style="color:#000"><div style="float:left;margin-right:0.9em">
<p>
=== Introduction ===
=== Overview ===
=== More Detail ===
=== Even More Detail ===
=== Summary ===
</p>
---------- cut ----------

The only difference is that the text for "Example Table" is split over two 
lines, but it completely changes the location of the contents table.  I 
actually want the effect of the second example.

Is this a feature or a bug (or just me not understanding something)?
Comment 1 Platonides 2007-05-02 09:56:04 UTC
First, your code has some html errors: unclosed div, <h2> into <p>

Second, this can be shortened to 
<table width="100%" style="background-color:#f5fffa"><tr>
<th><h2>Example 
Table</h2></th></tr>
<tr><td>
=== Introduction ===
=== Overview ===
=== More Detail ===
=== Even More Detail ===
</td></tr></table>


Third, the problem has nothing to do with the tables. (though they help to
visualize).
Multiline titles doesn't appear on TOC. There's is no problem when they're
wiki-titles because == on different lines doesn't make a title, but when you use
html titles, there is.
Comment 2 Platonides 2007-05-02 10:12:18 UTC
Created attachment 3560 [details]
Parsertest fror bug 9760

Attaching parsertest. Updating summary.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-05-03 00:53:42 UTC
How do we want to handle this anyway?  <br /> is allowed in headers, but note
that elements like <p> seem not to be (if I'm reading the XHTML DTD right).  I
guess we should just compress whitespace for TOC display?
Comment 4 Platonides 2007-05-03 21:54:16 UTC
Yes, we would change them into spaces. Or maybe into <br />s :P

Note however that this is not the reported problem. <h2>AAA\nBBB</h2> has the
same html output as <h2>AAA BBB</h2>. Thus it should work the same for the TOC.
Comment 5 p858snake 2011-04-30 00:09:28 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 6 Sumana Harihareswara 2011-11-09 19:24:24 UTC
+need-review
Comment 7 au 2012-06-17 17:44:49 UTC
Hi Platonides, thank you for working on this bug!

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 8 Platonides 2012-06-17 21:17:45 UTC
Hi audrey,
May I ask who you are and why are you pasting this template on multiple bugs? 
(Your only bugzilla contribution, on 14 parser related bugs, even when they have little relationship with the Visual editor)

On a bright note I hope that "are much easier for us to review" means you're volunteering to do that :)
Comment 9 au 2012-06-18 03:41:40 UTC
Hi Platonides. I'm 唐鳳, aka Audrey Tang:

   https://www.mediawiki.org/wiki/User:Au
   http://linkedin.com/in/tangaudrey
   http://pugs.blogs.com/

Recently I've started volunteering for the VE/Parsoid projects, and you're indeed correct that I've registered a Bugzilla account for the explicit purpose of sending this form letter to all parser bugs with patches attached, at the behest of Sumana, in an effort to encourage people signing up to Gerrit, and hopefully bring their patches to Parsoid where it makes sense.

I tried to triage them and send only to bugs that seems pertinent, but due to my inexperience, there may still be a bit of false positives -- e.g. this bug only pertains to parser tests and might indeed be unrelated to Parsoid.

My sincere apologies for the spamming -- it won't happen again anytime soon. :-)

As for review, I've just started reviewing and +1'ing Gerrit change sets as I can, however as I'm relatively new to the parser codebase, I'd be happy to defer to more seasoned devs for the actual merge & approval.

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


Navigation
Links