mirror of
https://github.com/heyman/heynote.git
synced 2024-12-28 09:39:05 +01:00
Override default highlighting style to remove ugly underline on heading tags
This commit is contained in:
parent
0d7c04991f
commit
3aa9e5d512
@ -1,6 +1,9 @@
|
||||
import { EditorView } from "@codemirror/view";
|
||||
import { HighlightStyle, syntaxHighlighting, defaultHighlightStyle } from '@codemirror/language';
|
||||
import { tags } from '@lezer/highlight';
|
||||
|
||||
export const heynoteLight = EditorView.theme({
|
||||
|
||||
const lightTheme = EditorView.theme({
|
||||
"&": {
|
||||
backgroundColor: "#fff",
|
||||
},
|
||||
@ -37,4 +40,16 @@ export const heynoteLight = EditorView.theme({
|
||||
},
|
||||
})
|
||||
|
||||
const highlightStyle = HighlightStyle.define([
|
||||
...defaultHighlightStyle.specs,
|
||||
|
||||
// override heading style, in order to remove the ugly underline
|
||||
{ tag: tags.heading, fontWeight: 'bold'},
|
||||
])
|
||||
|
||||
const heynoteLight = [
|
||||
lightTheme,
|
||||
syntaxHighlighting(highlightStyle),
|
||||
];
|
||||
|
||||
export { heynoteLight };
|
||||
|
Loading…
Reference in New Issue
Block a user