diff --git a/languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/disambiguation.xml b/languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/disambiguation.xml index bfa64dfc81b6..5d50decdd4e5 100644 --- a/languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/disambiguation.xml +++ b/languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/disambiguation.xml @@ -3473,6 +3473,13 @@ + + + \d+d(4|6|8|10|12|20) + + + + \d+h(\d+min)?(\d+s(ec)?)? diff --git a/languagetool-language-modules/pt/src/test/java/org/languagetool/rules/pt/MorfologikPortugueseSpellerRuleTest.java b/languagetool-language-modules/pt/src/test/java/org/languagetool/rules/pt/MorfologikPortugueseSpellerRuleTest.java index b9a712ae7881..9897da5b5865 100644 --- a/languagetool-language-modules/pt/src/test/java/org/languagetool/rules/pt/MorfologikPortugueseSpellerRuleTest.java +++ b/languagetool-language-modules/pt/src/test/java/org/languagetool/rules/pt/MorfologikPortugueseSpellerRuleTest.java @@ -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