summary refs log tree commit diff stats
path: root/lib/pure/unidecode
diff options
context:
space:
mode:
authorshirleyquirk <31934565+shirleyquirk@users.noreply.github.com>2021-04-12 06:32:37 +0100
committerGitHub <noreply@github.com>2021-04-12 07:32:37 +0200
commit0bc943ad54d707f93d47a6d52bf7d445c45388d8 (patch)
treea120cdc72b96e554d78e08c07ea56b963915904c /lib/pure/unidecode
parentcae183915490846a0ec7dbcd52b29a74c7c59f05 (diff)
downloadNim-0bc943ad54d707f93d47a6d52bf7d445c45388d8.tar.gz
followup strformat PR. backslash escapes, tests, docs (#17700)
* Allow use of colons inside fmt
allowing colons inside fmt by replacing the format specifier delimiter lets arbitrary nim code be run within fmt expressions.

Co-authored-by: flywind <xzsflywind@gmail.com>

* formatting,documentation,backslash escapes

Adding support for evaluating expressions by special-casing parentheses causes this regression: `&"""{ "(hello)" }"""` no longer parses.
In addition, code such as &"""{(if open: '(' else: ')')}""" wouldn't work.
To enable that, as well as the use of, e.g. Table constructors inside curlies, I've added backslash escapes.
This also means that if/for/etc statements, unparenthesized, will work, if the colons are escaped, but i've left that under-documented.

It's not exactly elegant having two types of escape, but I believe it's the least bad option.

* changelog
* added json strformat test
* pulled my thumb out and wrote a parser

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: flywind <xzsflywind@gmail.com>
Diffstat (limited to 'lib/pure/unidecode')
0 files changed, 0 insertions, 0 deletions
73ad8df0a663960f69a87f10e1e35'>^
bf6c2c5cc ^
4886cde78 ^
86556ebfd ^
ef975d277 ^


dfe5d115f ^
35ff17410 ^
2f43fdb83 ^
fedc13698 ^
6ea538cec ^
752052e90 ^
40ec7be45 ^

5f4e98bbc ^
1ba785dd7 ^
752052e90 ^


dc5e4b018 ^



40ec7be45 ^
0356f53b5 ^
752052e90 ^
40ec7be45 ^
0356f53b5 ^
936265df7 ^
40ec7be45 ^
7e747d11c ^

40ec7be45 ^
b47d9b7b9 ^
335c19c86 ^
7324ed7f1 ^
7e747d11c ^
752052e90 ^
40ec7be45 ^
e8aa6f6c3 ^


40ec7be45 ^
2a7fc84c8 ^
e8aa6f6c3 ^

7e747d11c ^
40ec7be45 ^
e8aa6f6c3 ^
40ec7be45 ^
0356f53b5 ^

40ec7be45 ^
dc5e4b018 ^
40ec7be45 ^

39ebe2175 ^
7e747d11c ^
2a7fc84c8 ^
39ebe2175 ^
40ec7be45 ^
39ebe2175 ^
c89397f82 ^
39ebe2175 ^
0356f53b5 ^


2a7fc84c8 ^
0356f53b5 ^
39ebe2175 ^
0356f53b5 ^
69c0a9c6f ^


752052e90 ^

5f4e98bbc ^



0c56eeda0 ^

b47d9b7b9 ^

0ead36dae ^

f9eec2aa1 ^
7e747d11c ^
e6c5622aa ^
936265df7 ^
5f4e98bbc ^
7e747d11c ^
0356f53b5 ^
40ec7be45 ^
7e747d11c ^

0356f53b5 ^

7e747d11c ^

752052e90 ^

936265df7 ^
5f4e98bbc ^
752052e90 ^

5f4e98bbc ^
752052e90 ^
936265df7 ^
7e747d11c ^

35d7a99b6 ^
d462cca21 ^
0356f53b5 ^



35d7a99b6 ^

7e747d11c ^

d462cca21 ^
40ec7be45 ^
ec50dab57 ^

35d7a99b6 ^
ec50dab57 ^

35d7a99b6 ^
40ec7be45 ^
ec50dab57 ^
752052e90 ^
f9a3de984 ^
c89397f82 ^
0356f53b5 ^
7e747d11c ^
f9a3de984 ^
e8aa6f6c3 ^
5f4e98bbc ^
c89397f82 ^
dc5e4b018 ^
5f4e98bbc ^
dc5e4b018 ^
752052e90 ^
0356f53b5 ^

e50441ab3 ^



7e747d11c ^
69c0a9c6f ^

0356f53b5 ^
7e747d11c ^
0356f53b5 ^
e8aa6f6c3 ^
40ec7be45 ^
0356f53b5 ^
2a7fc84c8 ^
752052e90 ^
0356f53b5 ^

2a7fc84c8 ^
7e747d11c ^
2a7fc84c8 ^
0356f53b5 ^
7e747d11c ^
0356f53b5 ^

dc5e4b018 ^
752052e90 ^
936265df7 ^
2a7fc84c8 ^
3bffb3ba3 ^

0356f53b5 ^

e2567e2e0 ^

47335aab4 ^
e2567e2e0 ^


0755f902d ^
e2567e2e0 ^

0356f53b5 ^
5f4e98bbc ^

0356f53b5 ^


7e747d11c ^
0356f53b5 ^
5f4e98bbc ^
0356f53b5 ^


7e747d11c ^
0356f53b5 ^
5f4e98bbc ^
822d2b508 ^


7e747d11c ^
822d2b508 ^

e4081a720 ^

5f4e98bbc ^
0356f53b5 ^



7e747d11c ^
2a7fc84c8 ^
0356f53b5 ^
7e747d11c ^


0356f53b5 ^
dec97924a ^

0356f53b5 ^
5f4e98bbc ^

752052e90 ^
936265df7 ^
5f4e98bbc ^
40c517514 ^
8a1055adc ^

7e747d11c ^

8a1055adc ^

7e747d11c ^
40c517514 ^
7e747d11c ^
5f4e98bbc ^

c94647aec ^
5f4e98bbc ^








c94647aec ^




5f4e98bbc ^
5f4e98bbc ^


0b0a3e5f2 ^





5f4e98bbc ^





fedc13698 ^
e879da579 ^
d462cca21 ^

5f4e98bbc ^
d462cca21 ^

5f4e98bbc ^
d462cca21 ^

721bf7188 ^
e30a08103 ^
752052e90 ^
40ec7be45 ^
b5eed8ab3 ^
d462cca21 ^
c89397f82 ^

40ec7be45 ^
b5eed8ab3 ^
0356f53b5 ^


40ec7be45 ^
b5eed8ab3 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312