From 2ca9d2cbe3d8aec98632961d03f48014f4782a3a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 5 Jun 2007 18:34:14 +0000 Subject: [PATCH] Expand a bit on the comment for Parser::stripToc, make it clearer what it does --- includes/Parser.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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, -- 2.20.1