Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/221018
Change subject: Hide the red border around syntax errors ...................................................................... Hide the red border around syntax errors MZMcBride noticed the red border around '國' in https://en.wikipedia.org/wiki/Swift_(programming_language)#Example_code That particular case happens to be a Pygments bug, because multibyte characters are valid variable names in Swift. But even in cases of legitimate syntax errors, I don't think we want to show the red border. This behavior may be useful in code editors, but it is not useful in a wiki environment, especially given the longstanding habit of using an existing, mostly-compatible lexer to highlight a language for which no specific lexer exists. To fix this, override the style in pygments.wrapper.css, and swap the order in which the two CSS files are concatenated, so that in general we have the ability to override Pygments-generated CSS. Change-Id: I304fdaf3a462445d316e0f7fecc983fa87afc629 (cherry picked from commit 927f40e98ac63cd93d79fbac622478344274fade) --- M extension.json M modules/pygments.wrapper.css 2 files changed, 12 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SyntaxHighlight_GeSHi refs/changes/18/221018/1 diff --git a/extension.json b/extension.json index f2d238d..af19063 100644 --- a/extension.json +++ b/extension.json @@ -36,8 +36,8 @@ "mobile" ], "styles": [ - "pygments.wrapper.css", - "pygments.generated.css" + "pygments.generated.css", + "pygments.wrapper.css" ] } }, diff --git a/modules/pygments.wrapper.css b/modules/pygments.wrapper.css index b1f7cb9..643e3c3 100644 --- a/modules/pygments.wrapper.css +++ b/modules/pygments.wrapper.css @@ -14,3 +14,13 @@ border: 0; padding: 0; } + +/* + * Don't show a red border around syntax errors. This behavior may be useful + * in code editors, but it is not useful in a wiki environment, especially + * given the longstanding habit of using an existing, mostly-compatible lexer + * to highlight a language for which no lexer exists. + */ +.mw-highlight .err { + border: 0; +} -- To view, visit https://gerrit.wikimedia.org/r/221018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I304fdaf3a462445d316e0f7fecc983fa87afc629 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SyntaxHighlight_GeSHi Gerrit-Branch: wmf/1.26wmf11 Gerrit-Owner: Ori.livneh <o...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits