OLD | NEW |
---|---|
1 | 1 |
2 Running: testWikiParser | 2 Running: testWikiParser |
3 "{{A|B={{C|D=blablabla}}}}" is parsed | 3 "{{A|Code={{=}} }}" is parsed |
4 { | |
5 A : { | |
6 Code : { | |
7 _children : [ | |
8 { | |
9 _children : [ | |
10 { | |
11 _isHighlighted : false | |
12 _text : "=" | |
13 _type : "PlainText" | |
14 } | |
15 ] | |
16 _hasBullet : false | |
17 _type : "Block" | |
18 } | |
19 ] | |
20 _hasBullet : false | |
21 _type : "Block" | |
22 } | |
23 } | |
24 } | |
25 "{{ABC|Array={{A|B=c}}{{X|y=Z}}|text=blabla}}" is parsed | |
26 { | |
27 ABC : { | |
28 Array : [ | |
29 { | |
30 title : "A" | |
31 values : { | |
32 B : { | |
33 _children : [ | |
34 { | |
35 _children : [ | |
36 { | |
37 _isHighlighted : false | |
38 _text : "c" | |
39 _type : "PlainText" | |
40 } | |
41 ] | |
42 _hasBullet : false | |
43 _type : "Block" | |
44 } | |
45 ] | |
46 _hasBullet : false | |
47 _type : "Block" | |
48 } | |
49 } | |
50 } | |
51 { | |
52 title : "X" | |
53 values : { | |
54 y : { | |
55 _children : [ | |
56 { | |
57 _children : [ | |
58 { | |
59 _isHighlighted : false | |
60 _text : "Z" | |
61 _type : "PlainText" | |
62 } | |
63 ] | |
64 _hasBullet : false | |
65 _type : "Block" | |
66 } | |
67 ] | |
68 _hasBullet : false | |
69 _type : "Block" | |
70 } | |
71 } | |
72 } | |
73 ] | |
74 text : { | |
75 _children : [ | |
76 { | |
77 _children : [ | |
78 { | |
79 _isHighlighted : false | |
80 _text : "blabla" | |
81 _type : "PlainText" | |
82 } | |
83 ] | |
84 _hasBullet : false | |
85 _type : "Block" | |
86 } | |
87 ] | |
88 _hasBullet : false | |
89 _type : "Block" | |
90 } | |
91 } | |
92 } | |
93 "{{A|B=C}}" is parsed | |
4 { | 94 { |
5 A : { | 95 A : { |
6 B : { | 96 B : { |
7 C : { | 97 _children : [ |
8 D : "blablabla" | 98 { |
9 } | 99 _children : [ |
100 { | |
101 _isHighlighted : false | |
102 _text : "C" | |
103 _type : "PlainText" | |
104 } | |
105 ] | |
106 _hasBullet : false | |
107 _type : "Block" | |
108 } | |
109 ] | |
110 _hasBullet : false | |
111 _type : "Block" | |
112 } | |
113 } | |
114 } | |
115 "{{A|B={{C|D=blablabla}}}}" is parsed | |
116 { | |
117 A : { | |
118 B : [ | |
119 { | |
120 title : "C" | |
121 values : { | |
122 D : { | |
123 _children : [ | |
124 { | |
125 _children : [ | |
126 { | |
127 _isHighlighted : false | |
128 _text : "blablabla" | |
129 _type : "PlainText" | |
130 } | |
131 ] | |
132 _hasBullet : false | |
133 _type : "Block" | |
134 } | |
135 ] | |
136 _hasBullet : false | |
137 _type : "Block" | |
138 } | |
139 } | |
140 } | |
141 ] | |
142 } | |
143 } | |
144 "{{A|B={{C|D=bla}}|x=y}}" is parsed | |
145 { | |
146 A : { | |
147 B : [ | |
148 { | |
149 title : "C" | |
150 values : { | |
151 D : { | |
152 _children : [ | |
153 { | |
154 _children : [ | |
155 { | |
156 _isHighlighted : false | |
157 _text : "bla" | |
158 _type : "PlainText" | |
159 } | |
160 ] | |
161 _hasBullet : false | |
162 _type : "Block" | |
163 } | |
164 ] | |
165 _hasBullet : false | |
166 _type : "Block" | |
167 } | |
168 } | |
169 } | |
170 ] | |
171 x : { | |
172 _children : [ | |
173 { | |
174 _children : [ | |
175 { | |
176 _isHighlighted : false | |
177 _text : "y" | |
178 _type : "PlainText" | |
179 } | |
180 ] | |
181 _hasBullet : false | |
182 _type : "Block" | |
183 } | |
184 ] | |
185 _hasBullet : false | |
186 _type : "Block" | |
10 } | 187 } |
11 } | 188 } |
12 } | 189 } |
13 "{{CS|Init=black|Values={{CSS Property Value | 190 "{{CS|Init=black|Values={{CSS Property Value |
14 |Data Type=color | 191 |Data Type=color |
15 |Description=[[css/color|CSS color value]]}} | 192 |Description= [[css/color|CSS color value]]}} |
lushnikov
2014/09/12 06:39:28
why added space?
iliia
2014/09/12 08:46:41
We assume that link has a space in the beginning.
| |
16 }}" is parsed | 193 }}" is parsed |
17 { | 194 { |
18 CS : { | 195 CS : { |
19 Init : "black" | 196 Init : { |
20 Values : { | 197 _children : [ |
21 CSS Property Value : { | 198 { |
22 Data Type : "color" | 199 _children : [ |
23 Description : "[[css/color|CSS color value]]" | 200 { |
24 } | 201 _isHighlighted : false |
25 } | 202 _text : "black" |
203 _type : "PlainText" | |
204 } | |
205 ] | |
206 _hasBullet : false | |
207 _type : "Block" | |
208 } | |
209 ] | |
210 _hasBullet : false | |
211 _type : "Block" | |
212 } | |
213 Values : [ | |
214 { | |
215 title : "CSS Property Value" | |
216 values : { | |
217 Data Type : { | |
218 _children : [ | |
219 { | |
220 _children : [ | |
221 { | |
222 _isHighlighted : false | |
223 _text : "color" | |
224 _type : "PlainText" | |
225 } | |
226 ] | |
227 _hasBullet : false | |
228 _type : "Block" | |
229 } | |
230 ] | |
231 _hasBullet : false | |
232 _type : "Block" | |
233 } | |
234 Description : { | |
235 _children : [ | |
236 { | |
237 _children : [ | |
238 { | |
239 _children : [ | |
240 { | |
241 _children : [ | |
242 { | |
243 _isHighlighted : false | |
244 _text : "CSS color value " | |
245 _type : "PlainText" | |
246 } | |
247 ] | |
248 _type : "Inline" | |
249 } | |
250 ] | |
251 _type : "Link" | |
252 _url : "css/color" | |
253 } | |
254 ] | |
255 _hasBullet : false | |
256 _type : "Block" | |
257 } | |
258 ] | |
259 _hasBullet : false | |
260 _type : "Block" | |
261 } | |
262 } | |
263 } | |
264 ] | |
26 } | 265 } |
27 } | 266 } |
28 "{{A}}" is parsed | 267 "{{A}}" is parsed |
29 { | 268 { |
269 A : undefined | |
270 } | |
271 "{{A|B= [[google.com{{!}}Google]]}}" is parsed | |
272 { | |
30 A : { | 273 A : { |
31 } | 274 B : { |
32 } | 275 _children : [ |
33 "{{A|B=bla<a=c>bla}}" is parsed | 276 { |
34 { | 277 _children : [ |
35 A : { | 278 { |
36 B : "bla<a=c>bla" | 279 _children : [ |
37 } | 280 { |
38 } | 281 _children : [ |
39 "{{A}}" is parsed | 282 { |
40 { | 283 _isHighlighted : false |
41 A : { | 284 _text : "Google" |
285 _type : "PlainText" | |
286 } | |
287 ] | |
288 _type : "Inline" | |
289 } | |
290 ] | |
291 _type : "Link" | |
292 _url : "google.com" | |
293 } | |
294 ] | |
295 _hasBullet : false | |
296 _type : "Block" | |
297 } | |
298 ] | |
299 _hasBullet : false | |
300 _type : "Block" | |
301 } | |
42 } | 302 } |
43 } | 303 } |
44 "{{AbC|xyz | 304 "{{AbC|xyz |
45 » \r}}" is parsed | 305 » \r}}" is parsed |
46 { | 306 { |
47 AbC : "xyz | 307 AbC : { |
48 » " | 308 _children : [ |
309 { | |
310 _children : [ | |
311 { | |
312 _isHighlighted : false | |
313 _text : "xyz" | |
314 _type : "PlainText" | |
315 } | |
316 ] | |
317 _hasBullet : false | |
318 _type : "Block" | |
319 } | |
320 ] | |
321 _hasBullet : false | |
322 _type : "Block" | |
323 } | |
324 } | |
325 "{{Table|there is a table {{{!}} | |
326 }}" is parsed | |
327 { | |
328 Table : { | |
329 _children : [ | |
330 { | |
331 _children : [ | |
332 { | |
333 _isHighlighted : false | |
334 _text : "there is a table {{{!}}" | |
335 _type : "PlainText" | |
336 } | |
337 ] | |
338 _hasBullet : false | |
339 _type : "Block" | |
340 } | |
341 ] | |
342 _hasBullet : false | |
343 _type : "Block" | |
344 } | |
345 } | |
346 "{{External_Attribution|MSDN_link=[http://msdn.microsoft.com/en-us/library/ie/ms 536365(v=vs.85).aspx cloneNode Method]|HTML5Rocks_link=}}" is parsed | |
347 { | |
348 External_Attribution : { | |
349 HTML5Rocks_link : undefined | |
350 MSDN_link : { | |
351 _children : [ | |
352 { | |
353 _children : [ | |
354 { | |
355 _isHighlighted : false | |
356 _text : "[http://msdn.microsoft.com/en-us/library/ie /ms536365(v=vs.85).aspx cloneNode Method]" | |
357 _type : "PlainText" | |
358 } | |
359 ] | |
360 _hasBullet : false | |
361 _type : "Block" | |
362 } | |
363 ] | |
364 _hasBullet : false | |
365 _type : "Block" | |
366 } | |
367 } | |
368 } | |
369 "{{JS_Syntax|Formats={{JS Syntax Format|Format='''JSON.stringify(''' value [ , r eplacer] [ , space] ''')'''}} | |
370 }}" is parsed | |
371 { | |
372 JS_Syntax : { | |
373 Formats : [ | |
374 { | |
375 title : "JS Syntax Format" | |
376 values : { | |
377 Format : { | |
378 _children : [ | |
379 { | |
380 _children : [ | |
381 { | |
382 _isHighlighted : true | |
383 _text : "JSON.stringify(" | |
384 _type : "PlainText" | |
385 } | |
386 { | |
387 _isHighlighted : false | |
388 _text : " value" | |
389 _type : "PlainText" | |
390 } | |
391 { | |
392 _children : [ | |
393 ] | |
394 _type : "Link" | |
395 _url : " , replacer" | |
396 } | |
397 { | |
398 _children : [ | |
399 ] | |
400 _type : "Link" | |
401 _url : " , space" | |
402 } | |
403 { | |
404 _isHighlighted : false | |
405 _text : " " | |
406 _type : "PlainText" | |
407 } | |
408 { | |
409 _isHighlighted : true | |
410 _text : ")" | |
411 _type : "PlainText" | |
412 } | |
413 ] | |
414 _hasBullet : false | |
415 _type : "Block" | |
416 } | |
417 ] | |
418 _hasBullet : false | |
419 _type : "Block" | |
420 } | |
421 } | |
422 } | |
423 ] | |
424 } | |
49 } | 425 } |
50 | 426 |
51 Running: testJS | 427 Running: testJS |
52 { | 428 { |
53 examples : [ | 429 examples : [ |
54 ] | 430 ] |
55 parameters : [ | 431 parameters : [ |
56 ] | 432 ] |
57 remarks : { | 433 remarks : { |
58 _children : [ | 434 _children : [ |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 _type : "PlainText" | 492 _type : "PlainText" |
117 } | 493 } |
118 ] | 494 ] |
119 _hasBullet : false | 495 _hasBullet : false |
120 _type : "Block" | 496 _type : "Block" |
121 } | 497 } |
122 ] | 498 ] |
123 _hasBullet : false | 499 _hasBullet : false |
124 _type : "Block" | 500 _type : "Block" |
125 } | 501 } |
502 summary : undefined | |
126 } | 503 } |
127 | 504 |
128 Running: testSmall | 505 Running: testSmall |
129 { | 506 { |
130 examples : [ | 507 examples : [ |
131 ] | 508 ] |
132 parameters : [ | 509 parameters : [ |
133 ] | 510 ] |
511 remarks : null | |
134 summary : { | 512 summary : { |
135 _children : [ | 513 _children : [ |
136 { | 514 { |
137 _children : [ | 515 _children : [ |
138 { | 516 { |
139 _isHighlighted : false | 517 _isHighlighted : false |
140 _text : "blabla " | 518 _text : "blabla " |
141 _type : "PlainText" | 519 _type : "PlainText" |
142 } | 520 } |
143 { | 521 { |
(...skipping 10 matching lines...) Expand all Loading... | |
154 _type : "Block" | 532 _type : "Block" |
155 } | 533 } |
156 } | 534 } |
157 | 535 |
158 Running: testHighlightAndLink | 536 Running: testHighlightAndLink |
159 { | 537 { |
160 examples : [ | 538 examples : [ |
161 ] | 539 ] |
162 parameters : [ | 540 parameters : [ |
163 ] | 541 ] |
542 remarks : null | |
164 summary : { | 543 summary : { |
165 _children : [ | 544 _children : [ |
166 { | 545 { |
167 _children : [ | 546 _children : [ |
168 { | 547 { |
169 _isHighlighted : false | 548 _isHighlighted : false |
170 _text : "The " | 549 _text : "The " |
171 _type : "PlainText" | 550 _type : "PlainText" |
172 } | 551 } |
173 { | 552 { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 _type : "Block" | 641 _type : "Block" |
263 } | 642 } |
264 } | 643 } |
265 | 644 |
266 Running: testNamedLink | 645 Running: testNamedLink |
267 { | 646 { |
268 examples : [ | 647 examples : [ |
269 ] | 648 ] |
270 parameters : [ | 649 parameters : [ |
271 ] | 650 ] |
651 remarks : null | |
272 summary : { | 652 summary : { |
273 _children : [ | 653 _children : [ |
274 { | 654 { |
275 _children : [ | 655 _children : [ |
276 { | 656 { |
277 _children : [ | 657 _children : [ |
278 { | 658 { |
279 _children : [ | 659 _children : [ |
280 { | 660 { |
281 _isHighlighted : false | 661 _isHighlighted : false |
(...skipping 16 matching lines...) Expand all Loading... | |
298 _type : "Block" | 678 _type : "Block" |
299 } | 679 } |
300 } | 680 } |
301 | 681 |
302 Running: testBullet | 682 Running: testBullet |
303 { | 683 { |
304 examples : [ | 684 examples : [ |
305 ] | 685 ] |
306 parameters : [ | 686 parameters : [ |
307 ] | 687 ] |
688 remarks : null | |
308 summary : { | 689 summary : { |
309 _children : [ | 690 _children : [ |
310 { | 691 { |
311 _children : [ | 692 _children : [ |
312 { | 693 { |
313 _isHighlighted : false | 694 _isHighlighted : false |
314 _text : "blabla" | 695 _text : "blabla" |
315 _type : "PlainText" | 696 _type : "PlainText" |
316 } | 697 } |
317 ] | 698 ] |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
437 console.log(Object.keys(my_array)); | 818 console.log(Object.keys(my_array)); |
438 | 819 |
439 // Output | 820 // Output |
440 // ["0"]" | 821 // ["0"]" |
441 _type : "CodeBlock" | 822 _type : "CodeBlock" |
442 } | 823 } |
443 ] | 824 ] |
444 _hasBullet : false | 825 _hasBullet : false |
445 _type : "Block" | 826 _type : "Block" |
446 } | 827 } |
828 summary : undefined | |
447 } | 829 } |
448 | 830 |
449 Running: testComplexLinkName | 831 Running: testComplexLinkName |
450 { | 832 { |
451 examples : [ | 833 examples : [ |
452 ] | 834 ] |
453 parameters : [ | 835 parameters : [ |
454 ] | 836 ] |
837 remarks : null | |
455 summary : { | 838 summary : { |
456 _children : [ | 839 _children : [ |
457 { | 840 { |
458 _children : [ | 841 _children : [ |
459 { | 842 { |
460 _children : [ | 843 _children : [ |
461 { | 844 { |
462 _children : [ | 845 _children : [ |
463 { | 846 { |
464 _isHighlighted : false | 847 _isHighlighted : false |
(...skipping 26 matching lines...) Expand all Loading... | |
491 _type : "Block" | 874 _type : "Block" |
492 } | 875 } |
493 } | 876 } |
494 | 877 |
495 Running: testCodeInsideBullet | 878 Running: testCodeInsideBullet |
496 { | 879 { |
497 examples : [ | 880 examples : [ |
498 ] | 881 ] |
499 parameters : [ | 882 parameters : [ |
500 ] | 883 ] |
884 remarks : null | |
501 summary : { | 885 summary : { |
502 _children : [ | 886 _children : [ |
503 { | 887 { |
504 _children : [ | 888 _children : [ |
505 { | 889 { |
506 _isHighlighted : false | 890 _isHighlighted : false |
507 _text : "some text " | 891 _text : "some text " |
508 _type : "PlainText" | 892 _type : "PlainText" |
509 } | 893 } |
510 { | 894 { |
(...skipping 10 matching lines...) Expand all Loading... | |
521 _hasBullet : true | 905 _hasBullet : true |
522 _type : "Block" | 906 _type : "Block" |
523 } | 907 } |
524 ] | 908 ] |
525 _hasBullet : false | 909 _hasBullet : false |
526 _type : "Block" | 910 _type : "Block" |
527 } | 911 } |
528 } | 912 } |
529 | 913 |
530 Running: testInvalidInput | 914 Running: testInvalidInput |
531 error: Can't parse remarks | |
532 [object Object] | 915 [object Object] |
533 | 916 |
534 Running: testLinkInsideCode | 917 Running: testLinkInsideCode |
535 { | 918 { |
536 examples : [ | 919 examples : [ |
537 ] | 920 ] |
538 parameters : [ | 921 parameters : [ |
539 ] | 922 ] |
923 remarks : null | |
540 summary : { | 924 summary : { |
541 _children : [ | 925 _children : [ |
542 { | 926 { |
543 _children : [ | 927 _children : [ |
544 { | 928 { |
545 _children : [ | 929 _children : [ |
546 { | 930 { |
547 _children : [ | 931 _children : [ |
548 { | 932 { |
549 _children : [ | 933 _children : [ |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
628 ] | 1012 ] |
629 _hasBullet : false | 1013 _hasBullet : false |
630 _type : "Block" | 1014 _type : "Block" |
631 } | 1015 } |
632 language : "HTML" | 1016 language : "HTML" |
633 liveUrl : "http://samples.msdn.microsoft.com/workshop/samples/author /dhtml/refs/insertBefore.htm" | 1017 liveUrl : "http://samples.msdn.microsoft.com/workshop/samples/author /dhtml/refs/insertBefore.htm" |
634 } | 1018 } |
635 ] | 1019 ] |
636 parameters : [ | 1020 parameters : [ |
637 ] | 1021 ] |
1022 remarks : null | |
1023 summary : undefined | |
638 } | 1024 } |
639 | 1025 |
640 Running: testJsMethod | 1026 Running: testJsMethod |
641 { | 1027 { |
642 examples : [ | 1028 examples : [ |
643 ] | 1029 ] |
644 methods : { | 1030 methods : { |
645 returnValueDescription : "The inserted node." | 1031 returnValueDescription : "The inserted node." |
646 returnValueName : "DOM Node" | 1032 returnValueName : "DOM Node" |
647 } | 1033 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
684 _type : "Block" | 1070 _type : "Block" |
685 } | 1071 } |
686 ] | 1072 ] |
687 _hasBullet : false | 1073 _hasBullet : false |
688 _type : "Block" | 1074 _type : "Block" |
689 } | 1075 } |
690 name : "refChild" | 1076 name : "refChild" |
691 optional : true | 1077 optional : true |
692 } | 1078 } |
693 ] | 1079 ] |
1080 remarks : null | |
1081 summary : undefined | |
694 } | 1082 } |
695 | 1083 |
696 Running: testLinkWithoutSpace | 1084 Running: testLinkWithoutSpace |
697 error: Can't parse summary | 1085 Expected error: Error: Two closing braces expected; found WRONG_LINK |
698 { | |
699 examples : [ | |
700 ] | |
701 parameters : [ | |
702 ] | |
703 summary : null | |
704 } | |
705 | 1086 |
OLD | NEW |