mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-26 20:02:27 +03:00
fix partial isSingleQuoted/isDoubleQuoted functions
This commit is contained in:
parent
c24609f468
commit
0cb0c61fcb
@ -97,8 +97,11 @@ whitespacechars = " \t\n\r"
|
||||
stripquotes :: String -> String
|
||||
stripquotes s = if isSingleQuoted s || isDoubleQuoted s then init $ tail s else s
|
||||
|
||||
isSingleQuoted s = head s == '\'' && last s == '\''
|
||||
isDoubleQuoted s = head s == '"' && last s == '"'
|
||||
isSingleQuoted s@(_:_:_) = head s == '\'' && last s == '\''
|
||||
isSingleQuoted _ = False
|
||||
|
||||
isDoubleQuoted s@(_:_:_) = head s == '"' && last s == '"'
|
||||
isDoubleQuoted _ = False
|
||||
|
||||
unbracket :: String -> String
|
||||
unbracket s
|
||||
|
Loading…
Reference in New Issue
Block a user