Skip to content

Commit

Permalink
[pt] Ignore spelling of dice roll notation (1d6)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-goulart committed May 16, 2024
1 parent ce29b0a commit 4de7888
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3473,6 +3473,13 @@
<disambig action="ignore_spelling"/>
</rule>

<rule id="DICE_ROLL_NOTATION">
<pattern>
<token regexp="yes">\d+d(4|6|8|10|12|20)</token>
</pattern>
<disambig action="ignore_spelling"/>
</rule>

<rule id="NONSTANDARD_DURATION_IGNORE">
<pattern>
<token regexp="yes">\d+h(\d+min)?(\d+s(ec)?)?</token>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,14 @@ public void testPortugueseSpellerIgnoresProbableUnitsOfMeasurement() throws Exce
assertNoErrors("5×10×50cm", ltBR, ruleBR);
}

@Test
public void testPortugueseSpellerIgnoresDiceRollNotation() throws Exception {
// Disambiguator rule
assertNoErrors("1d20", ltBR, ruleBR);
assertNoErrors("3d6", ltBR, ruleBR);
assertNoErrors("20d10", ltBR, ruleBR);
}

@Test
public void testPortugueseSpellerIgnoresNonstandardTimeFormat() throws Exception {
// Disambiguator rule; this is a style/typography issue to be taken care of in XML rules
Expand Down

0 comments on commit 4de7888

Please sign in to comment.