mirror of https://github.com/gorhill/uBlock.git
Fix wrong syntax color highlight in "Trusted sites" pane
Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/discussions/2521
This commit is contained in:
parent
cc979c900f
commit
a60a5c2772
|
@ -33,7 +33,7 @@
|
|||
<button id="exportUserFiltersToFile" class="iconified" type="button"><span class="fa-icon">upload-alt</span><span data-i18n="1pExport">_</span><span class="hover"></span></button>
|
||||
</p>
|
||||
</div>
|
||||
<div id="userFilters" class="codeMirrorContainer codeMirrorBreakAll codeMirrorFilters" spellcheck="false"></div>
|
||||
<div id="userFilters" class="codeMirrorContainer codeMirrorBreakAll cm-theme-override" spellcheck="false"></div>
|
||||
<div class="hidden">
|
||||
<input id="importFilePicker" type="file" accept="text/plain">
|
||||
</div>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<button id="subscribeButton" type="button" data-i18n="subscribeButton">_<span class="hover"></span></button>
|
||||
</section>
|
||||
|
||||
<div id="content" class="codeMirrorContainer codeMirrorBreakAll codeMirrorFilters"></div>
|
||||
<div id="content" class="codeMirrorContainer codeMirrorBreakAll cm-theme-override"></div>
|
||||
|
||||
<script src="lib/codemirror/lib/codemirror.js"></script>
|
||||
<script src="lib/codemirror/addon/display/panel.js"></script>
|
||||
|
|
|
@ -68,67 +68,67 @@
|
|||
word-break: break-all;
|
||||
}
|
||||
|
||||
.codeMirrorFilters .cm-s-default .cm-comment {
|
||||
.cm-theme-override .cm-s-default .cm-comment {
|
||||
color: var(--sf-comment-ink);
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-def {
|
||||
.cm-theme-override .cm-s-default .cm-def {
|
||||
color: var(--sf-def-ink);
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-directive {
|
||||
.cm-theme-override .cm-s-default .cm-directive {
|
||||
color: var(--sf-directive-ink);
|
||||
font-weight: bold;
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-error {
|
||||
.cm-theme-override .cm-s-default .cm-error {
|
||||
color: inherit;
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-error,
|
||||
.cm-theme-override .cm-s-default .cm-error,
|
||||
.CodeMirror-linebackground.error {
|
||||
background-color: var(--sf-error-surface);
|
||||
text-decoration: underline var(--sf-error-ink);
|
||||
text-underline-position: under;
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-link {
|
||||
.cm-theme-override .cm-s-default .cm-link {
|
||||
text-decoration: none;
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-link:hover {
|
||||
.cm-theme-override .cm-s-default .cm-link:hover {
|
||||
color: var(--link-ink);
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-keyword {
|
||||
.cm-theme-override .cm-s-default .cm-keyword {
|
||||
color: var(--sf-keyword-ink);
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-negative {
|
||||
.cm-theme-override .cm-s-default .cm-negative {
|
||||
color: var(--cm-negative);
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-positive {
|
||||
.cm-theme-override .cm-s-default .cm-positive {
|
||||
color: var(--cm-positive);
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-notice {
|
||||
.cm-theme-override .cm-s-default .cm-notice {
|
||||
text-underline-position: under;
|
||||
text-decoration-color: var(--sf-notice-ink);
|
||||
text-decoration-style: solid;
|
||||
text-decoration-line: underline;
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-unicode {
|
||||
.cm-theme-override .cm-s-default .cm-unicode {
|
||||
text-underline-position: under;
|
||||
text-decoration-color: var(--sf-unicode-ink);
|
||||
text-decoration-style: dashed;
|
||||
text-decoration-line: underline;
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-tag {
|
||||
.cm-theme-override .cm-s-default .cm-tag {
|
||||
color: var(--sf-tag-ink);
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-value {
|
||||
.cm-theme-override .cm-s-default .cm-value {
|
||||
color: var(--sf-value-ink);
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-variable {
|
||||
.cm-theme-override .cm-s-default .cm-variable {
|
||||
color: var(--sf-variable-ink);
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-warning {
|
||||
.cm-theme-override .cm-s-default .cm-warning {
|
||||
background-color: var(--sf-warning-surface);
|
||||
text-decoration: underline var(--sf-warning-ink);
|
||||
text-underline-position: under;
|
||||
}
|
||||
.codeMirrorFilters .cm-s-default .cm-readonly {
|
||||
.cm-theme-override .cm-s-default .cm-readonly {
|
||||
color: var(--sf-readonly-ink);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ CodeMirror.defineMode("ubo-whitelist-directives", function() {
|
|||
return null;
|
||||
}
|
||||
if ( reComment.test(line) ) {
|
||||
return whitelistDefaultSet.has(directiveFromLine(line))
|
||||
? 'keyword comment'
|
||||
: 'comment';
|
||||
return 'comment';
|
||||
}
|
||||
if ( line.indexOf('/') === -1 ) {
|
||||
if ( reBadHostname.test(line) ) { return 'error'; }
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<aside>
|
||||
<section>
|
||||
<div>
|
||||
<div class="codeMirrorContainer codeMirrorBreakAll codeMirrorFilters"></div>
|
||||
<div class="codeMirrorContainer codeMirrorBreakAll cm-theme-override"></div>
|
||||
<div class="resultsetWidgets">
|
||||
<span id="resultsetModifiers">
|
||||
<span id="resultsetDepth" class="resultsetModifier">
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<button id="exportWhitelistToFile" class="iconified" type="button"><span class="fa-icon">upload-alt</span><span data-i18n="whitelistExport">_</span><span class="hover"></span></button>
|
||||
</p>
|
||||
</div>
|
||||
<div id="whitelist" class="codeMirrorContainer"></div>
|
||||
<div id="whitelist" class="codeMirrorContainer cm-theme-override"></div>
|
||||
|
||||
<div class="hidden">
|
||||
<input id="importFilePicker" type="file" accept="text/plain">
|
||||
|
|
Loading…
Reference in New Issue