File tree 4 files changed +72
-2
lines changed
fluent-bundle/test/fixtures_reference
4 files changed +72
-2
lines changed Original file line number Diff line number Diff line change 11
11
" This line is indented by 4 spaces,"
12
12
],
13
13
"attributes" : {}
14
+ },
15
+ {
16
+ "id" : " key05" ,
17
+ "value" : " \t " ,
18
+ "attributes" : {}
19
+ },
20
+ {
21
+ "id" : " key06" ,
22
+ "value" : null ,
23
+ "attributes" : {
24
+ "attr" : " \t\t "
25
+ }
14
26
}
15
27
]
16
28
}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import type { Resource, Entry } from "./ast.js";
6
6
import { EOF , EOL , FluentParserStream } from "./stream.js" ;
7
7
import { ParseError } from "./errors.js" ;
8
8
9
- const trailingWSRe = / [ \t \ n\r ] + $ / ;
9
+ const trailingWSRe = / [ \n \r ] + $ / ;
10
10
11
11
type ParseFn < T > =
12
12
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Original file line number Diff line number Diff line change @@ -12,3 +12,10 @@ key03 =
12
12
key04 =
13
13
This line is indented by 4 spaces,
14
14
whereas this line by 1 tab.
15
+
16
+ # OK (value is a single tab)
17
+ key05 =
18
+
19
+ # OK (attribute value is two tabs)
20
+ key06 =
21
+ .attr =
Original file line number Diff line number Diff line change 64
64
{
65
65
"type" : " Junk" ,
66
66
"annotations" : [],
67
- "content" : " \t whereas this line by 1 tab.\n "
67
+ "content" : " \t whereas this line by 1 tab.\n\n "
68
+ },
69
+ {
70
+ "type" : " Message" ,
71
+ "id" : {
72
+ "type" : " Identifier" ,
73
+ "name" : " key05"
74
+ },
75
+ "value" : {
76
+ "type" : " Pattern" ,
77
+ "elements" : [
78
+ {
79
+ "type" : " TextElement" ,
80
+ "value" : " \t "
81
+ }
82
+ ]
83
+ },
84
+ "attributes" : [],
85
+ "comment" : {
86
+ "type" : " Comment" ,
87
+ "content" : " OK (value is a single tab)"
88
+ }
89
+ },
90
+ {
91
+ "type" : " Message" ,
92
+ "id" : {
93
+ "type" : " Identifier" ,
94
+ "name" : " key06"
95
+ },
96
+ "value" : null ,
97
+ "attributes" : [
98
+ {
99
+ "type" : " Attribute" ,
100
+ "id" : {
101
+ "type" : " Identifier" ,
102
+ "name" : " attr"
103
+ },
104
+ "value" : {
105
+ "type" : " Pattern" ,
106
+ "elements" : [
107
+ {
108
+ "type" : " TextElement" ,
109
+ "value" : " \t\t "
110
+ }
111
+ ]
112
+ }
113
+ }
114
+ ],
115
+ "comment" : {
116
+ "type" : " Comment" ,
117
+ "content" : " OK (attribute value is two tabs)"
118
+ }
68
119
}
69
120
]
70
121
}
You can’t perform that action at this time.
0 commit comments