File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 85
85
color : # c0c ;
86
86
}
87
87
88
- .exp-error {
89
- background : # d22 ;
88
+ .exp-syntax- error {
89
+ border-top : solid 2 px # d22 ;
90
90
}
91
91
92
92
span .match-char {
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ export class ExpressionField extends EventDispatcher {
53
53
this . highlighter . clearError ( ) ;
54
54
}
55
55
56
- tippy ( ".exp-error" , {
56
+ tippy ( ".exp-syntax- error" , {
57
57
allowHTML : true ,
58
58
animation : false ,
59
59
placement : "bottom" ,
Original file line number Diff line number Diff line change @@ -74,17 +74,20 @@ export default class ExpressionHighlighter extends EventDispatcher {
74
74
error . location . end - error . location . start
75
75
) ;
76
76
const widget = document . createElement ( "span" ) ;
77
- widget . className = `${ pre } -error` ;
77
+ widget . className = `${ pre } -syntax- error` ;
78
78
79
- widget . style . height = `2px ` ;
79
+ widget . style . height = `5px ` ;
80
80
widget . style . zIndex = "10" ;
81
- widget . setAttribute ( "data-tippy-content" , error . message ) ;
81
+ widget . setAttribute (
82
+ "data-tippy-content" ,
83
+ `<span class="fw-bolder text-danger">${ error . behavior } :</span> ${ error . message } `
84
+ ) ;
82
85
83
86
editor . addWidget ( location . startPos , widget ) ;
84
87
const startCoords = editor . charCoords ( location . startPos , "local" ) ;
85
88
const endCoords = editor . charCoords ( location . endPos , "local" ) ;
86
89
widget . style . left = `${ startCoords . left + 1 } px` ;
87
- widget . style . top = `${ startCoords . bottom } px` ;
90
+ widget . style . top = `${ startCoords . bottom - 1 } px` ;
88
91
widget . style . width = `${ endCoords . left - startCoords . left - 2 } px` ;
89
92
90
93
this . widgets . push ( widget ) ;
You can’t perform that action at this time.
0 commit comments