r22771 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22770‎ | r22771 | r22772 >
Date:18:34, 5 June 2007
Author:avar
Status:old
Tags:
Comment:
Expand a bit on the comment for Parser::stripToc, make it clearer what it does
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -3405,7 +3405,13 @@
34063406 }
34073407
34083408 /**
3409 - * Detect __TOC__ magic word and set a placeholder
 3409+ * Find the first __TOC__ magic word and set a <!--MWTOC-->
 3410+ * placeholder that will then be replaced by the real TOC in
 3411+ * ->formatHeadings, this works because at this points real
 3412+ * comments will have already been discarded by the sanitizer.
 3413+ *
 3414+ * Any additional __TOC__ magic words left over will be discarded
 3415+ * as there can only be one TOC on the page.
34103416 */
34113417 function stripToc( $text ) {
34123418 # if the string __NOTOC__ (not case-sensitive) occurs in the HTML,

Follow-up revisions

RevisionCommit summaryAuthorDate
r22791Merged revisions 22747-22790 via svnmerge from...david09:21, 6 June 2007

Status & tagging log