Foxtrott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/133898
Change subject: Unstrip strip items of 'general' category before lingo-parsing
......................................................................
Unstrip strip items of 'general' category before lingo-parsing
The unstripping will be done again by the MW parser when the hook used by Lingo
returns, but it should not hurt to do this twice.
The only problem is with other hook handlers that might not expect strip items
to be unstripped already.
Bug 55829
Change-Id: I422650da84c07122451e19bf3424ad14f55d07af
---
M LingoHooks.php
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Lingo
refs/changes/98/133898/1
diff --git a/LingoHooks.php b/LingoHooks.php
index 06c287a..57942f2 100644
--- a/LingoHooks.php
+++ b/LingoHooks.php
@@ -37,10 +37,15 @@
if ( !isset( $parser->mDoubleUnderscores['noglossary'] ) && //
__NOGLOSSARY__ not present and
(
!$title || // title not set or
- !isset( $wgexLingoUseNamespaces[$title->getNamespace()]
) || // namespace not explicitly forbidden or
+ !isset( $wgexLingoUseNamespaces[ $title->getNamespace()
] ) || // namespace not explicitly forbidden (i.e. not in list of namespaces
and set to false) or
$wgexLingoUseNamespaces[$title->getNamespace()] //
namespace explicitly allowed
)
- ) {
+ ) {
+
+ // unstrip strip items of the 'general' group
+ // this will be done again by parse when this hook
returns, but it should not hurt to do this twice
+ // Only problem is with other hook handlers that might
not expect strip items to be unstripped already
+ $text = $parser->mStripState->unstripGeneral( $text );
LingoParser::parse( $parser, $text );
}
--
To view, visit https://gerrit.wikimedia.org/r/133898
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I422650da84c07122451e19bf3424ad14f55d07af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits