Improve link highlighting
- Metadata key highlighting - Don't show "[[", "]]" around links
This commit is contained in:
parent
5000ab768a
commit
dec8e85064
|
@ -358,7 +358,7 @@ function Editor(holder, input) {
|
||||||
let re = /^([A-Z0-9 ]+)::\s*(.+)$/i;
|
let re = /^([A-Z0-9 ]+)::\s*(.+)$/i;
|
||||||
let res = text.match(re)
|
let res = text.match(re)
|
||||||
if (res) {
|
if (res) {
|
||||||
converted = '**[[' + res[1] + ']]**: ' + res[2]
|
converted = '<span class="metadata-key">[[' + res[1] + ']]</span>: ' + res[2]
|
||||||
} else if (text.match(/#\[\[TODO]]/)) {
|
} else if (text.match(/#\[\[TODO]]/)) {
|
||||||
converted = converted.replace('#[[TODO]]', '<input class="checkbox" type="checkbox" />')
|
converted = converted.replace('#[[TODO]]', '<input class="checkbox" type="checkbox" />')
|
||||||
todo = true;
|
todo = true;
|
||||||
|
|
|
@ -48,15 +48,21 @@ body {
|
||||||
font-family: 'Inter', sans-serif;
|
font-family: 'Inter', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.highlight-links {
|
||||||
.content a.wiki-link::before {
|
.content a.wiki-link::before {
|
||||||
content: "[[";
|
content: "[[";
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content a.wiki-link::after {
|
.content a.wiki-link::after {
|
||||||
content: "]]";
|
content: "]]";
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.metadata-key a {
|
||||||
|
font-weight: bold;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
@supports (font-variation-settings: normal) {
|
@supports (font-variation-settings: normal) {
|
||||||
html {
|
html {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user