Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in toRomanNumeral #1249

Closed
jkr opened this issue Apr 16, 2014 · 1 comment
Closed

Bug in toRomanNumeral #1249

jkr opened this issue Apr 16, 2014 · 1 comment

Comments

@jkr
Copy link
Collaborator

jkr commented Apr 16, 2014

9 (and numbers ending with a 9) will translate to "IXIV". The code in Text.Pandoc.Shared is currently

...
_ | x >= 9    -> "IX" ++ toRomanNumeral (x - 5)
...

I imagine it should be

...
_ | x >= 9    -> "IX" ++ toRomanNumeral (x - 9)
...

Although, since 9 is the only number it applies to (10 and larger have a different rule), I'm not sure if the string addition is necessary at all. I.e., it seems like you could get away with the following, and leave less room for error:

...
_ | x >= 9    -> "IX"
...
@jgm
Copy link
Owner

jgm commented Apr 16, 2014

Oh, that's a bad one. Amazing how long it has gone undetected! Thank you.

@jgm jgm closed this as completed in 7f036c0 Apr 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants