lib: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
This commit is contained in:
parent
d681812465
commit
43bddf62dd
67 changed files with 2435 additions and 2435 deletions
|
|
@ -11,7 +11,7 @@
|
|||
## See http://en.wikipedia.org/wiki/Roman_numerals for reference.
|
||||
|
||||
const
|
||||
RomanNumeralDigits* = {'I', 'i', 'V', 'v', 'X', 'x', 'L', 'l', 'C', 'c',
|
||||
RomanNumeralDigits* = {'I', 'i', 'V', 'v', 'X', 'x', 'L', 'l', 'C', 'c',
|
||||
'D', 'd', 'M', 'm'} ## set of all characters a Roman numeral may consist of
|
||||
|
||||
proc romanToDecimal*(romanVal: string): int =
|
||||
|
|
@ -28,7 +28,7 @@ proc romanToDecimal*(romanVal: string): int =
|
|||
of 'C', 'c': val = 100
|
||||
of 'D', 'd': val = 500
|
||||
of 'M', 'm': val = 1000
|
||||
else:
|
||||
else:
|
||||
raise newException(EInvalidValue, "invalid roman numeral: " & $romanVal)
|
||||
if val >= prevVal:
|
||||
inc(result, val)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue