Module talk:ISO 3166: Difference between revisions

Content deleted Content added
Line 229:
:It might be the hyphen. "GuineaBissau" works as input, even though it shouldn't. Also, invalid values return nothing instead of an error message. See [[:Template:ISO 3166 code-3/testcases]]. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 17:42, 18 March 2022 (UTC)
::@[[User:Jonesey95|Jonesey95]], hmm, yeah. Any idea what it is about the hyphen that's leading to the bug? <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}&#125;</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 01:16, 23 March 2022 (UTC)
:::<syntaxhighlight lang="lua">
::: if string.find(code1,"%-") then
::: code1, code2 = string.match(code1,"^([^%-]*)%-(.*)$")
::: end
:::</syntaxhighlight>
:::This is the problamtic piece of code. It splits "Guinea-Bissau" into "Guinea" and "Bissau". I'm not sure what the design rational behind that was though. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 16:27, 31 March 2022 (UTC)