From db03d2545b4538c99a71548d0758614d093d6a20 Mon Sep 17 00:00:00 2001 From: Ian Baker Date: Wed, 20 Jul 2011 17:08:37 +0000 Subject: [PATCH] Documenting new parser hook, re r92506. This refers to an extension that's not checked in quite yet, FYI --- docs/hooks.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/hooks.txt b/docs/hooks.txt index 9174351f85..6ad299a115 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1355,6 +1355,17 @@ $title: title object representing the file $file: file object that will be used to create the image &$params: 2-D array of parameters +'ParserSectionCreate': Called each time the parser creates a document section +from wikitext. Use this to apply per-section modifications to HTML (like +wrapping the section in a DIV). Caveat: DIVs are valid wikitext, and a DIV +can begin in one section and end in another. Make sure your code can handle +that case gracefully. See the EditSectionClearerLink extension for an +example. +$this: the calling Parser instance +$section: the section number, zero-based, but section 0 is usually empty +&$sectionContent: ref to the content of the section. modify this. +$showEditLinks: boolean describing whether this section has an edit link + 'ParserTestParser': called when creating a new instance of Parser in maintenance/parserTests.inc $parser: Parser object created -- 2.20.1