From: Ævar Arnfjörð Bjarmason Date: Tue, 5 Jun 2007 18:34:14 +0000 (+0000) Subject: Expand a bit on the comment for Parser::stripToc, make it clearer what it does X-Git-Tag: 1.31.0-rc.0~52657 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=2ca9d2cbe3d8aec98632961d03f48014f4782a3a;p=lhc%2Fweb%2Fwiklou.git Expand a bit on the comment for Parser::stripToc, make it clearer what it does --- diff --git a/includes/Parser.php b/includes/Parser.php index efade09c3c..75aef1d596 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3405,7 +3405,13 @@ class Parser } /** - * Detect __TOC__ magic word and set a placeholder + * Find the first __TOC__ magic word and set a + * placeholder that will then be replaced by the real TOC in + * ->formatHeadings, this works because at this points real + * comments will have already been discarded by the sanitizer. + * + * Any additional __TOC__ magic words left over will be discarded + * as there can only be one TOC on the page. */ function stripToc( $text ) { # if the string __NOTOC__ (not case-sensitive) occurs in the HTML,