File tree Expand file tree Collapse file tree 6 files changed +48
-3
lines changed
Expand file tree Collapse file tree 6 files changed +48
-3
lines changed Original file line number Diff line number Diff line change 1717 " missing space {|foo|:func}" ,
1818 " missing space {|foo|@bar}" ,
1919 " missing space {:func@bar}" ,
20+ " missing space {:func @bar@baz}" ,
21+ " missing space {:func @bar=42@baz}" ,
22+ " missing space {+reserved@bar}" ,
23+ " missing space {&private@bar}" ,
2024 " bad {:} placeholder" ,
2125 " bad {\\ u0000placeholder}" ,
2226 " no-equal {|42| :number minimumFractionDigits 2}" ,
Original file line number Diff line number Diff line change 114114 }
115115 ]
116116 },
117+ {
118+ "src" : " {#tag foo=bar/}" ,
119+ "cleanSrc" : " {#tag foo=bar /}" ,
120+ "exp" : " " ,
121+ "parts" : [
122+ {
123+ "type" : " markup" ,
124+ "kind" : " standalone" ,
125+ "name" : " tag" ,
126+ "options" : { "foo" : " bar" }
127+ }
128+ ]
129+ },
117130 {
118131 "src" : " {#tag a:foo=|foo| b:bar=$bar}" ,
119132 "params" : { "bar" : " b a r" },
136149 "src" : " {42 @foo=$bar}" ,
137150 "exp" : " 42" ,
138151 "parts" : [{ "type" : " string" , "value" : " 42" }]
152+ },
153+ {
154+ "src" : " foo {+reserved}" ,
155+ "exp" : " foo {+}" ,
156+ "parts" : [
157+ { "type" : " literal" , "value" : " foo " },
158+ { "type" : " fallback" , "source" : " +" }
159+ ],
160+ "errors" : [{ "type" : " unsupported-annotation" }]
161+ },
162+ {
163+ "src" : " foo {&private}" ,
164+ "exp" : " foo {&}" ,
165+ "parts" : [
166+ { "type" : " literal" , "value" : " foo " },
167+ { "type" : " fallback" , "source" : " &" }
168+ ],
169+ "errors" : [{ "type" : " unsupported-annotation" }]
170+ },
171+ {
172+ "src" : " foo {?reserved @a @b=$c}" ,
173+ "exp" : " foo {?}" ,
174+ "parts" : [
175+ { "type" : " literal" , "value" : " foo " },
176+ { "type" : " fallback" , "source" : " ?" }
177+ ],
178+ "errors" : [{ "type" : " unsupported-annotation" }]
139179 }
140180]
Original file line number Diff line number Diff line change @@ -259,6 +259,7 @@ export function parseReservedBody(
259259 case '|' :
260260 pos = parseQuotedLiteral ( ctx , pos ) . end ;
261261 break ;
262+ case '@' :
262263 case '}' :
263264 break loop;
264265 default : {
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ export interface FunctionRef {
151151/** @beta */
152152export interface ReservedAnnotation {
153153 type : 'reserved-annotation' ;
154- open : Syntax < '!' | '# ' | '% ' | '^ ' | '& ' | '* ' | '<' | '>' | '?' | '~' > ;
154+ open : Syntax < '!' | '% ' | '^ ' | '& ' | '* ' | '+ ' | '<' | '>' | '?' | '~' > ;
155155 source : Syntax < string > ;
156156 start : number ;
157157 end : number ;
Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ export interface FunctionAnnotation {
222222 */
223223export interface UnsupportedAnnotation {
224224 type : 'unsupported-annotation' ;
225- sigil : '!' | '# ' | '% ' | '^ ' | '& ' | '* ' | '<' | '>' | '?' | '~' | '�' ;
225+ sigil : '!' | '% ' | '^ ' | '& ' | '* ' | '+ ' | '<' | '>' | '?' | '~' | '�' ;
226226 source : string ;
227227 name ?: never ;
228228 options ?: never ;
Original file line number Diff line number Diff line change @@ -1234,7 +1234,7 @@ export interface MessageOption extends Element {
12341234export interface MessageUnsupported extends Element {
12351235 name : 'mf:unsupported' ;
12361236 attributes : {
1237- sigil : '!' | '# ' | '% ' | '^ ' | '& ' | '* ' | '<' | '>' | '?' | '~' | '�' ;
1237+ sigil : '!' | '% ' | '^ ' | '& ' | '* ' | '+ ' | '<' | '>' | '?' | '~' | '�' ;
12381238 } ;
12391239 elements : ( Text | CharCode ) [ ] ;
12401240}
You can’t perform that action at this time.
0 commit comments