File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed
Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 3030 },
3131 "Lang" :{
3232 "transformer" :" textNode" ,
33- "replace" : " <br />$(3||)<br />"
33+ "replace" : " $(2||)"
34+ },
35+ "Native name|native_name" :{
36+ "transformer" :" textNode" ,
37+ "replace" : " $(2||)"
38+ },
39+ "Nihongo2" :{
40+ "transformer" :" textNode" ,
41+ "replace" : " $(1||)"
42+ },
43+ "Nihongo" :{
44+ "transformer" :" textNode" ,
45+ "replace" : " $(2||)"
3446 },
3547 "Marriage" :{
3648 "transformer" :" extractChildren" ,
Original file line number Diff line number Diff line change @@ -53,6 +53,26 @@ class TemplateTransformParserTest extends FlatSpec with Matchers
5353 parse(" en" , " {{url|https://www.dji.com DJI.com}}" ) should be (Some (" [https://www.dji.com]" ))
5454 }
5555
56+ it should " extract text from {{lang|nap|Abbrùzzu}}" in
57+ {
58+ parse(" en" , " {{lang|nap|Abbrùzzu}}" ) should be (Some (" Abbrùzzu" ))
59+ }
60+
61+ it should " extract text from {{native name|nap|Abbrùzze}}" in
62+ {
63+ parse(" en" , " {{native name|nap|Abbrùzze}}" ) should be (Some (" Abbrùzze" ))
64+ }
65+
66+ it should " extract text from {{Nihongo2|東京都}}" in
67+ {
68+ parse(" en" , " {{Nihongo2|東京都}}" ) should be (Some (" 東京都" ))
69+ }
70+
71+ it should " extract text from {{Nihongo|Tokyo|東京|Tōkyō}}" in
72+ {
73+ parse(" en" , " {{Nihongo|Tokyo|東京|Tōkyō}}" ) should be (Some (" 東京" ))
74+ }
75+
5676
5777 private val wikiParser = WikiParser .getInstance()
5878
You can’t perform that action at this time.
0 commit comments