Last modified: 2013-04-17 12:37:30 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 T25393, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23393 - Generated TOC does not match the hierarchy of sections created by <h1> tags
Generated TOC does not match the hierarchy of sections created by <h1> tags
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.21.x
All All
: Low normal (vote)
: ---
Assigned To: Bartosz Dziewoński
http://en.wikipedia.org/w/index.php?t...
: newparser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-03 16:54 UTC by Helder
Modified: 2013-04-17 12:37 UTC (History)
3 users (show)

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


Attachments

Description Helder 2010-05-03 16:54:08 UTC
When a Header is created with a code like
<h1>Header 1</h1>
it shows correctly, but the same doesn't happens when we use
<h1>Header 2
</h1>
(with a line break before the closing tag)

See for example this link:
http://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&oldid=359875876#toctitle

Helder
Comment 1 Bartosz Dziewoński 2013-03-02 18:07:48 UTC
Still happening. It is actually not displayed in the TOC at all.

This is probably caused by the regex used to match headings in Parser.php:

    /<H(?P<level>[1-6])(?P<attrib>.*?'.'>)(?P<header>.*?)<\/H[1-6] *>/i

The dot in '.*?' will match all characters except a newline. It should be changed to [\s\S], or we could add a 's' at the end.
Comment 2 Bartosz Dziewoński 2013-03-06 20:30:31 UTC
I0f2d81dd.
Comment 3 Bartosz Dziewoński 2013-03-21 23:52:59 UTC
Merged by Brion.
Comment 4 Kevin Israel (PleaseStand) 2013-04-16 21:16:57 UTC
This patch adds an entry to RELEASE-NOTES-1.21 yet is not on the REL1_21 branch. Should it be backported?
Comment 5 Nemo 2013-04-17 02:52:31 UTC
(In reply to comment #4)
> This patch adds an entry to RELEASE-NOTES-1.21 yet is not on the REL1_21
> branch. 

Patch for this and other errors in the release notes appreciated. :)
Comment 6 Kevin Israel (PleaseStand) 2013-04-17 03:25:45 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > This patch adds an entry to RELEASE-NOTES-1.21 yet is not on the REL1_21
> > branch. 
> 
> Patch for this and other errors in the release notes appreciated. :)

I'll upload a patch for this soon (and will post the link here). I just wanted someone to confirm that it is an error first :)
Comment 7 Gerrit Notification Bot 2013-04-17 12:37:30 UTC
Related URL: https://gerrit.wikimedia.org/r/59620 (Gerrit Change I6a51e3ee07fe7622b9c708c78563795d7a1118fc)

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


Navigation
Links