File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
tests/unit/components/ContentNode Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 41
41
v-for =" (line , index ) in syntaxHighlightedLines "
42
42
><span
43
43
:key =" index"
44
- :class =" ['code-line-container',{ highlighted: isHighlighted(index),
45
- highlighted: isUserHighlighted(index),
46
- strikethrough: isUserStrikethrough(index),}]"
44
+ :class =" [
45
+ 'code-line-container',
46
+ {
47
+ highlighted: isHighlighted(index) || isUserHighlighted(index),
48
+ strikethrough: isUserStrikethrough(index),
49
+ }
50
+ ]"
47
51
><span
48
52
v-if =" showLineNumbers"
49
53
class =" code-number"
Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ export default {
84
84
' --text' : codeColors .text ,
85
85
' --background' : codeColors .background ,
86
86
' --line-highlight' : codeColors .lineHighlight ,
87
- ' --user-line-highlight' : codeColors .userLineHighlight ,
88
87
' --url' : codeColors .commentURL ,
89
88
' --syntax-comment' : codeColors .comment ,
90
89
' --syntax-quote' : codeColors .comment ,
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ describe('CodeListing', () => {
129
129
const codeLine = codeLineContainer . find ( '.code-line' ) ;
130
130
expect ( codeLine . text ( ) ) . toBe ( line ) ;
131
131
132
- expect ( codeLineContainer . classes ( 'user- highlighted' ) ) . toBe ( shouldBeHighlighted ) ;
132
+ expect ( codeLineContainer . classes ( 'highlighted' ) ) . toBe ( shouldBeHighlighted ) ;
133
133
} ) ;
134
134
} ) ;
135
135
@@ -164,7 +164,7 @@ describe('CodeListing', () => {
164
164
const codeLine = codeLineContainer . find ( '.code-line' ) ;
165
165
expect ( codeLine . text ( ) ) . toBe ( line ) ;
166
166
167
- expect ( codeLineContainer . classes ( 'user- strikethrough' ) ) . toBe ( shouldBeStriked ) ;
167
+ expect ( codeLineContainer . classes ( 'strikethrough' ) ) . toBe ( shouldBeStriked ) ;
168
168
} ) ;
169
169
} ) ;
170
170
@@ -352,7 +352,7 @@ describe('CodeListing', () => {
352
352
353
353
await wrapper . setProps ( { wrap : 0 } ) ;
354
354
style = wrapper . attributes ( 'style' ) || '' ;
355
- expect ( style ) . toMatch ( / - - w r a p - c h : \s * 0 \b / ) ;
355
+ expect ( style === null || style === '' ) . toBe ( true ) ;
356
356
} ) ;
357
357
358
358
it ( 'treats negative wrap as no-wrap' , async ( ) => {
You can’t perform that action at this time.
0 commit comments