File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed
packages/parser/src/parser/rules/inline
tests/fixtures/color/fail Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,8 @@ export const colorRule: InlineRule = {
6363
6464 const trimmedColor = colorSpec . trim ( ) ;
6565
66- // Wikidot allows empty color (##|text##), but text must have content
67- if ( textChildren . length === 0 ) {
66+ // Wikidot requires non- empty color spec and non-empty content
67+ if ( trimmedColor === "" || textChildren . length === 0 ) {
6868 return { success : false } ;
6969 }
7070
Original file line number Diff line number Diff line change 3333 "elements" : [
3434 {
3535 "element" : " text" ,
36- "data" : " ##|no spec##"
36+ "data" : " ##"
37+ },
38+ {
39+ "element" : " text" ,
40+ "data" : " |"
41+ },
42+ {
43+ "element" : " text" ,
44+ "data" : " no"
45+ },
46+ {
47+ "element" : " text" ,
48+ "data" : " "
49+ },
50+ {
51+ "element" : " text" ,
52+ "data" : " spec"
53+ },
54+ {
55+ "element" : " text" ,
56+ "data" : " ##"
3757 }
3858 ]
3959 }
You can’t perform that action at this time.
0 commit comments