Ladsgroup has uploaded a new change for review.

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

Change subject: Strip parameters and values of templates in mwparserfromhell 
parser
......................................................................

Strip parameters and values of templates in mwparserfromhell parser

It currently creates lots of issues.

Change-Id: Ie4a294e8127f58b03731cd4f4a524dd998363d50
---
M pywikibot/textlib.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/02/221602/1

diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index cffc04c..076ffde 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -1278,7 +1278,7 @@
     for template in code.filter_templates(recursive=True):
         params = OrderedDict()
         for param in template.params:
-            params[unicode(param.name)] = unicode(param.value)
+            params[unicode(param.name).strip()] = unicode(param.value).strip()
         result.append((unicode(template.name.strip()), params))
     return result
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4a294e8127f58b03731cd4f4a524dd998363d50
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>

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

Reply via email to