From: Ian Baker Date: Wed, 20 Jul 2011 17:08:37 +0000 (+0000) Subject: Documenting new parser hook, re r92506. X-Git-Tag: 1.31.0-rc.0~28716 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=db03d2545b4538c99a71548d0758614d093d6a20;p=lhc%2Fweb%2Fwiklou.git Documenting new parser hook, re r92506. This refers to an extension that's not checked in quite yet, FYI --- 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