jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/384173 )

Change subject: Suppress wrapping <div class="mw-parser-output"> around our 
<citation> tags
......................................................................


Suppress wrapping <div class="mw-parser-output"> around our <citation> tags

This wrapping and the ability to disable it was introduced in MW 1.30.

Bug: T171389
Change-Id: Id2eeda5602c75cafea293abd125989c29d3fc314
---
M SpecialCiteThisPage.php
M extension.json
2 files changed, 8 insertions(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/SpecialCiteThisPage.php b/SpecialCiteThisPage.php
index 41455a6..d7f5adb 100644
--- a/SpecialCiteThisPage.php
+++ b/SpecialCiteThisPage.php
@@ -184,10 +184,14 @@
         * @return string
         */
        public function citationTag( $text, $params, Parser $parser ) {
+               $parserOptions = $this->getParserOptions();
+               // This will be inserted into the output of another parser, so 
there will actually be a wrapper
+               $parserOptions->setWrapOutputClass( false );
+
                $ret = $this->citationParser->parse(
                        $text,
                        $this->getPageTitle(),
-                       $this->getParserOptions(),
+                       $parserOptions,
                        /* $linestart = */ false
                );
 
diff --git a/extension.json b/extension.json
index 3f9bbd3..0736a74 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,9 @@
        "descriptionmsg": "citethispage-desc",
        "license-name": "GPL-2.0+",
        "type": "specialpage",
+       "requires": {
+               "MediaWiki": ">= 1.30.0"
+       },
        "ExtensionMessagesFiles": {
                "CiteThisPageAliases": "CiteThisPage.alias.php"
        },

-- 
To view, visit https://gerrit.wikimedia.org/r/384173
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2eeda5602c75cafea293abd125989c29d3fc314
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CiteThisPage
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski <matma....@gmail.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to