Nikerabbit has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/270944

Change subject: Allow underscore in variables
......................................................................

Allow underscore in variables

Change-Id: I1506399c30ce4fe176ed1e455112c404cd491d1e
---
M groups/hivejs/Checker.php
M groups/hivejs/Suggester.php
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/44/270944/1

diff --git a/groups/hivejs/Checker.php b/groups/hivejs/Checker.php
index 6fbe5fe..23155dd 100644
--- a/groups/hivejs/Checker.php
+++ b/groups/hivejs/Checker.php
@@ -7,6 +7,6 @@
 
 class HivejsMessageChecker extends MessageChecker {
        protected function HivejsVariablesCheck( $messages, $code, &$warnings ) 
{
-               return parent::parameterCheck( $messages, $code, $warnings, 
'/{[a-z]+}/' );
+               return parent::parameterCheck( $messages, $code, $warnings, 
'/{[a-z_]+}/' );
        }
 }
diff --git a/groups/hivejs/Suggester.php b/groups/hivejs/Suggester.php
index 7fd9502..2306837 100644
--- a/groups/hivejs/Suggester.php
+++ b/groups/hivejs/Suggester.php
@@ -8,7 +8,7 @@
 class HivejsInsertablesSuggester {
        public function getInsertables( $text ) {
                $matches = array();
-               preg_match_all( '/{[a-z]+}/', $text, $matches, PREG_SET_ORDER );
+               preg_match_all( '/{[a-z_]+}/', $text, $matches, PREG_SET_ORDER 
);
                $insertables = array_map( function( $match ) {
                        return new Insertable( $match[0], $match[0] );
                }, $matches );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1506399c30ce4fe176ed1e455112c404cd491d1e
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to