From a94d8e640bac6c5918789321376ac6a13e27026f Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Fri, 10 May 2024 14:53:17 -0500 Subject: [PATCH] lint: Improve t-075 --- se/se_epub_lint.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/se/se_epub_lint.py b/se/se_epub_lint.py index 39b91cd8..40407b55 100644 --- a/se/se_epub_lint.py +++ b/se/se_epub_lint.py @@ -2755,7 +2755,7 @@ def _lint_xhtml_typography_checks(filename: Path, dom: se.easy_xml.EasyXmlTree, if nodes: # These words are English but have acute accents. Don't include the accent in this list because below we compare against the unaccented version. - ignored_words = ["cafe", "cafes", "regime", "regimes", "reveille", "reveilles"] + ignored_words = ["cafe", "cafes", "menage", "regime", "regimes", "reveille", "reveilles"] # Initialize our dictionary se.spelling.initialize_dictionary() @@ -2767,9 +2767,9 @@ def _lint_xhtml_typography_checks(filename: Path, dom: se.easy_xml.EasyXmlTree, # Extract each accented word, then compare against our dictionary. # If the word IS in the dictionary, add it to the error list. - # Words that are NOT in the dictinoary are more likely to be proper names + # Words that are NOT in the dictionary are more likely to be proper names # Note that this doesn't match word with two accent marks, like résumé. Such words are highly unlikely - # to altered for scansion anyway. + # to have accents for scansion anyway. for word in regex.findall(r"[A-Za-z]+[áéíóú]+[A-za-z]+", node.inner_text()): unaccented_word = unidecode(word) if unaccented_word in se.spelling.DICTIONARY and unaccented_word not in ignored_words: