mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-18 00:48:35 +00:00
Remove DUPNAMES option
It makes the rest of the implementation more complicated and is confusing anyway. The user expects a 1:1 mapping between a match and a name
This commit is contained in:
@@ -15,7 +15,6 @@ let Options: Table[string, int] = {
|
||||
"E" : pcre.DOLLAR_ENDONLY,
|
||||
"f" : pcre.FIRSTLINE,
|
||||
"i" : pcre.CASELESS,
|
||||
"J" : pcre.DUPNAMES,
|
||||
"m" : pcre.MULTILINE,
|
||||
"N" : pcre.NO_AUTO_CAPTURE,
|
||||
"O" : pcre.NO_AUTO_POSSESS,
|
||||
|
||||
@@ -9,7 +9,7 @@ suite "Test NRE initialization":
|
||||
test "correct options":
|
||||
expect(SyntaxError): # ValueError would be bad
|
||||
discard initRegex("[0-9]+",
|
||||
"89?AEfiJmNOsUWXxY<any><anycrlf><cr><crlf><lf><bsr_anycrlf><bsr_unicode><js>")
|
||||
"89?AEfimNOsUWXxY<any><anycrlf><cr><crlf><lf><bsr_anycrlf><bsr_unicode><js>")
|
||||
|
||||
test "incorrect options":
|
||||
expect(KeyError): discard initRegex("[0-9]+", "a")
|
||||
|
||||
Reference in New Issue
Block a user