File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -606,12 +606,13 @@ class EditContextManager {
606
606
let deco = [ ]
607
607
for ( let format of e . getTextFormats ( ) ) {
608
608
let lineStyle = format . underlineStyle , thickness = format . underlineThickness
609
- if ( lineStyle != "None" && thickness != "None" ) {
609
+ if ( ! / n o n e / i . test ( lineStyle ) && ! / n o n e / i . test ( thickness ) ) {
610
610
let from = this . toEditorPos ( format . rangeStart ) , to = this . toEditorPos ( format . rangeEnd )
611
611
if ( from < to ) {
612
+ // These values changed from capitalized custom strings to lower-case CSS keywords in 2025
612
613
let style = `text-decoration: underline ${
613
- lineStyle == "Dashed" ? "dashed " : lineStyle == "Squiggle" ? "wavy " : ""
614
- } ${ thickness == "Thin" ? 1 : 2 } px`
614
+ / ^ [ a - z ] / . test ( lineStyle ) ? lineStyle + " " : lineStyle == "Dashed" ? "dashed " : lineStyle == "Squiggle" ? "wavy " : ""
615
+ } ${ / t h i n / i . test ( thickness ) ? 1 : 2 } px`
615
616
deco . push ( Decoration . mark ( { attributes : { style} } ) . range ( from , to ) )
616
617
}
617
618
}
You can’t perform that action at this time.
0 commit comments