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

Modification to be able to handle quadruple repetitions #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Stormur
Copy link

@Stormur Stormur commented Feb 28, 2025

They are often not considered "standard" Roman numerals, but quadruple repetitions, such as in VIIII (instead of IX) do in fact appear since the first attestation, and are quite commonplace in some context.

Copy link
Member

@dataflake dataflake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no change log entry describing the change and there are no unit tests for it.

@@ -82,11 +82,11 @@ def toRoman(n):
romanNumeralPattern = re.compile("""
^ # beginning of string
M{0,4} # thousands - 0 to 4 M's
(CM|CD|D?C{0,3}) # hundreds - 900 (CM), 400 (CD), 0-300 (0 to 3 C's),
(CM|CD|D?C{0,4}) # hundreds - 900 (CM), 400 (CD), 0-300 (0 to 3 C's),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wherever you make changes in the pattern you must change the comment that describes it because that's now wrong.

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

Successfully merging this pull request may close these issues.

2 participants