jenkins-bot has submitted this change and it was merged.
Change subject: Replace cosmetic change 'validXhtml' with 'HTML' fix
......................................................................
Replace cosmetic change 'validXhtml' with 'HTML' fix
MediaWiki 1.16+ $wgWellFormedXml defaults to converting <br> to <br/>
when rendering, making this cosmetic change unnecessary, and undesirable
to be performing it in every save operation.
Re-adding it as part of the 'HTML' fix which can be applied as desired,
e.g. versions prior to 1.16, cleaning the underlying wikitext. It was
disabled from the HTML fix in compat dcf27d0c:
https://www.mediawiki.org/wiki/Special:Code/pywikipedia/991
Bug: 55236
Change-Id: I27789904778c6d86dc6897d88215939f22fe68ca
---
M pywikibot/fixes.py
M scripts/cosmetic_changes.py
2 files changed, 2 insertions(+), 8 deletions(-)
Approvals:
John Vandenberg: Looks good to me, but someone else must approve
Nullzero: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/fixes.py b/pywikibot/fixes.py
index a59f110..5a7f09e 100644
--- a/pywikibot/fixes.py
+++ b/pywikibot/fixes.py
@@ -68,9 +68,9 @@
# Keep in mind that MediaWiki automatically converts <br> to <br />
# when rendering pages, so you might comment the next two lines out
# to save some time/edits.
- # (r'(?i)<br>', r'<br />'),
+ (r'(?i)<br *>', r'<br />'),
# linebreak with attributes
- # (r'(?i)<br ([^>/]+?)>', r'<br \1 />'),
+ (r'(?i)<br ([^>/]+?)>', r'<br \1 />'),
(r'(?i)<b>(.*?)</b>', r"'''\1'''"),
(r'(?i)<strong>(.*?)</strong>', r"'''\1'''"),
(r'(?i)<i>(.*?)</i>', r"''\1''"),
diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py
index e9437a1..f1f1c2c 100755
--- a/scripts/cosmetic_changes.py
+++ b/scripts/cosmetic_changes.py
@@ -184,7 +184,6 @@
# FIXME: self.translateMagicWords,
self.replaceDeprecatedTemplates,
# FIXME: self.resolveHtmlEntities,
- self.validXhtml,
self.removeUselessSpaces,
self.removeNonBreakingSpaceBeforePercent,
@@ -576,11 +575,6 @@
if self.template:
ignore += [58]
text = pywikibot.html2unicode(text, ignore=ignore)
- return text
-
- def validXhtml(self, text):
- text = textlib.replaceExcept(text, r'(?i)<br[ /]*>', r'<br />',
- ['comment', 'math', 'nowiki', 'pre'])
return text
def removeUselessSpaces(self, text):
--
To view, visit https://gerrit.wikimedia.org/r/176640
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I27789904778c6d86dc6897d88215939f22fe68ca
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Nullzero <nullzero.free(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: Copy sysop attribute from bases
......................................................................
Copy sysop attribute from bases
Change-Id: Iceb61afbbaf17c351b202b1e0dfa9fa13a08ac00
---
M tests/aspects.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
John Vandenberg: Looks good to me, but someone else must approve
Nullzero: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/aspects.py b/tests/aspects.py
index b19df47..d3dbb0b 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -465,9 +465,9 @@
# Inherit superclass attributes
for base in bases:
- for key in ('pwb', 'net', 'site', 'wikibase', 'user', 'write',
+ for key in ('pwb', 'net', 'site', 'user', 'sysop', 'write',
'sites', 'family', 'code', 'dry',
- 'cached', 'cacheinfo'):
+ 'cached', 'cacheinfo', 'wikibase'):
if hasattr(base, key) and key not in dct:
# print('%s has %s; copying to %s'
# % (base.__name__, key, name))
--
To view, visit https://gerrit.wikimedia.org/r/171212
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iceb61afbbaf17c351b202b1e0dfa9fa13a08ac00
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Nullzero <nullzero.free(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
Build Update for jayvdb/pywikibot-core
-------------------------------------
Build: #113
Status: Passed
Duration: 38 minutes and 28 seconds
Commit: ab6a806 (test-preload-workarounds)
Author: John Vandenberg
Message: Preloading: workaround problems with api module
QueryGenerator emits pagedata for the same Page many times.
update_page should set _templates and _langlinks to empty lists
when the page does not contain them.
langlinks are currently broken until Family.langs is dynamic.
Change-Id: Ie89f9ee68d2206c1aaa707c44c314710ad00494a
View the changeset: https://github.com/jayvdb/pywikibot-core/compare/e6888ebee83e^...ab6a806ee6…
View the full build log and details: https://travis-ci.org/jayvdb/pywikibot-core/builds/43105493
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications