Remove unnecessary options
This commit is contained in:
parent
5ac61da7e3
commit
aee43d976b
2 changed files with 1 additions and 3 deletions
|
|
@ -177,7 +177,6 @@ proc asSeq*(pattern: Captures, default: string = nil): seq[string] =
|
||||||
let Options: Table[string, int] = {
|
let Options: Table[string, int] = {
|
||||||
"8" : pcre.UTF8,
|
"8" : pcre.UTF8,
|
||||||
"9" : pcre.NEVER_UTF,
|
"9" : pcre.NEVER_UTF,
|
||||||
"?" : pcre.NO_UTF8_CHECK,
|
|
||||||
"A" : pcre.ANCHORED,
|
"A" : pcre.ANCHORED,
|
||||||
# "C" : pcre.AUTO_CALLOUT, unsuported XXX
|
# "C" : pcre.AUTO_CALLOUT, unsuported XXX
|
||||||
"E" : pcre.DOLLAR_ENDONLY,
|
"E" : pcre.DOLLAR_ENDONLY,
|
||||||
|
|
@ -185,7 +184,6 @@ let Options: Table[string, int] = {
|
||||||
"i" : pcre.CASELESS,
|
"i" : pcre.CASELESS,
|
||||||
"m" : pcre.MULTILINE,
|
"m" : pcre.MULTILINE,
|
||||||
"N" : pcre.NO_AUTO_CAPTURE,
|
"N" : pcre.NO_AUTO_CAPTURE,
|
||||||
"O" : pcre.NO_AUTO_POSSESS,
|
|
||||||
"s" : pcre.DOTALL,
|
"s" : pcre.DOTALL,
|
||||||
"U" : pcre.UNGREEDY,
|
"U" : pcre.UNGREEDY,
|
||||||
"u" : pcre.UTF8,
|
"u" : pcre.UTF8,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ suite "Test NRE initialization":
|
||||||
test "correct options":
|
test "correct options":
|
||||||
expect(SyntaxError): # ValueError would be bad
|
expect(SyntaxError): # ValueError would be bad
|
||||||
discard initRegex("[0-9]+",
|
discard initRegex("[0-9]+",
|
||||||
"89?AEfimNOsUWXxY<any><anycrlf><cr><crlf><lf><bsr_anycrlf><bsr_unicode><js>")
|
"89AEfimNsUWXxY<any><anycrlf><cr><crlf><lf><bsr_anycrlf><bsr_unicode><js>")
|
||||||
|
|
||||||
test "incorrect options":
|
test "incorrect options":
|
||||||
expect(KeyError): discard initRegex("[0-9]+", "a")
|
expect(KeyError): discard initRegex("[0-9]+", "a")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue