Make message more verbose & tweak style

Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
This commit is contained in:
Yukai Huang 2019-08-16 23:22:58 +08:00
parent 2852be0980
commit 31765a9d34
No known key found for this signature in database
GPG Key ID: D4D3B2F0E99D4914
2 changed files with 9 additions and 9 deletions

View File

@ -1,6 +1,6 @@
import markdownlint from 'markdownlint'
// load lint plugin explicitly
// load CM lint plugin explicitly
import 'script-loader!@hackmd/codemirror/addon/lint/lint'
import './lint.css'
@ -21,7 +21,7 @@ import './lint.css'
}
return {
message: error.ruleDescription,
messageHTML: `${error.ruleNames.join('/')}: ${error.ruleDescription}`,
severity: 'error',
from: CodeMirror.Pos(lineNumber, start),
to: CodeMirror.Pos(lineNumber, end)

View File

@ -4,11 +4,11 @@
}
.CodeMirror-lint-tooltip {
background-color: #ffd;
border: 1px solid black;
border-radius: 4px 4px 4px 4px;
color: black;
font-family: monospace;
background-color: #333333;
border: 1px solid #eeeeee;
border-radius: 4px;
color: white;
font-family: "Source Code Pro", Consolas, monaco, monospace;
font-size: 10pt;
overflow: hidden;
padding: 2px 5px;
@ -32,7 +32,6 @@
.CodeMirror-lint-mark-error {
background-image: url(/images/lint/mark-error.png);
;
}
.CodeMirror-lint-mark-warning {
@ -52,9 +51,10 @@
}
.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning {
padding-left: 18px;
padding-left: 20px;
background-position: top left;
background-repeat: no-repeat;
background-position-y: 2px;
}
.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {