1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-25 18:56:52 +03:00

Markdown editor code highlightning restored to defaults; fixes #352 #359

This commit is contained in:
Avele 2019-09-02 21:53:26 +04:00
parent d69ce310d1
commit c9d512cb08

View File

@ -174,10 +174,10 @@ export default class MarkdownEditor extends Vue {
if (!line.styles) { if (!line.styles) {
return return
} }
const isLineInCodeblock = line.styles.some(x => typeof x === 'string' && x.includes('comment')) const isLineInCodeblock = line.styles
.some(x => typeof x === 'string' && x.includes('comment'))
// Highlightens full line inside code block, since codeMirror itself highlights only symbols // Highlightens full line inside code block, since codeMirror itself highlights only symbols
if (isLineInCodeblock) { if (isLineInCodeblock) {
element.style.background = 'rgba(0, 0, 0, 0.05)'
element.style.fontFamily = 'monospace, monospace' element.style.fontFamily = 'monospace, monospace'
element.style.fontSize = '85%' element.style.fontSize = '85%'
} }
@ -265,10 +265,6 @@ export default class MarkdownEditor extends Vue {
.cm-header-6 { .cm-header-6 {
font-size: 0.67rem; font-size: 0.67rem;
} }
.cm-comment {
background: unset;
}
} }
.markdown-editor_has-top-toolbar >>> .CodeMirror { .markdown-editor_has-top-toolbar >>> .CodeMirror {
border-top: 1px solid #ddd; border-top: 1px solid #ddd;