File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed
packages/parser/src/parser/rules Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -133,12 +133,8 @@ export function parseBlockName(
133133 let pos = startPos ;
134134 let consumed = 0 ;
135135
136- // Skip whitespace
137- while ( ctx . tokens [ pos ] ?. type === "WHITESPACE" ) {
138- pos ++ ;
139- consumed ++ ;
140- }
141-
136+ // Wikidot does NOT allow whitespace between [[ and block name
137+ // e.g. [[ code ]] is treated as plain text, not a code block
142138 const token = ctx . tokens [ pos ] ;
143139 if ( ! token || ( token . type !== "TEXT" && token . type !== "IDENTIFIER" ) ) {
144140 return null ;
Original file line number Diff line number Diff line change 88 "elements" : [
99 {
1010 "element" : " text" ,
11- "data" : " [[ code ]]"
11+ "data" : " [["
12+ },
13+ {
14+ "element" : " text" ,
15+ "data" : " "
16+ },
17+ {
18+ "element" : " text" ,
19+ "data" : " code"
20+ },
21+ {
22+ "element" : " text" ,
23+ "data" : " "
24+ },
25+ {
26+ "element" : " text" ,
27+ "data" : " ]]"
1228 },
1329 {
1430 "element" : " line-break"
You can’t perform that action at this time.
0 commit comments