From e0af18f99d0499f73f42237ea8d10d10cdaff831 Mon Sep 17 00:00:00 2001 From: bhsd <2545473905@qq.com> Date: Thu, 18 Jan 2024 23:27:40 +0800 Subject: [PATCH] fix heading style conflict with CM5 CSS classes such as `.cm-mw-section-3` are assigned to the `
` elements in CM5 while to the `` elements in CM6. The heading styles for CM6 should not interfere with CM5, at least for now.

Bug: T355290
Change-Id: I47426a8319e67503014f847fba39891bdf42db5b
---
 resources/mode/mediawiki/mediawiki.less | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/resources/mode/mediawiki/mediawiki.less b/resources/mode/mediawiki/mediawiki.less
index 8d906c93..21522eec 100644
--- a/resources/mode/mediawiki/mediawiki.less
+++ b/resources/mode/mediawiki/mediawiki.less
@@ -67,7 +67,11 @@ pre.CodeMirror-line.cm-mw-section-5,
 pre.CodeMirror-line-like.cm-mw-section-5,
 pre.CodeMirror-line.cm-mw-section-6,
 pre.CodeMirror-line-like.cm-mw-section-6,
-.cm-mw-section-3 ~ *, .cm-mw-section-4 ~ *, .cm-mw-section-5 ~ *, .cm-mw-section-6 ~ * {
+/* TODO: remove overqualified `span` after CM6 upgrade */
+span.cm-mw-section-3 ~ *,
+span.cm-mw-section-4 ~ *,
+span.cm-mw-section-5 ~ *,
+span.cm-mw-section-6 ~ * {
 	font-weight: bold;
 }