diff --git a/src/main/kotlin/com/github/darderion/mundaneassignmentpolice/rules/RuleSet.kt b/src/main/kotlin/com/github/darderion/mundaneassignmentpolice/rules/RuleSet.kt index 17e8fbd..59a47d1 100644 --- a/src/main/kotlin/com/github/darderion/mundaneassignmentpolice/rules/RuleSet.kt +++ b/src/main/kotlin/com/github/darderion/mundaneassignmentpolice/rules/RuleSet.kt @@ -28,7 +28,7 @@ val RULE_SET_RU = RuleSet( RULE_VARIOUS_ABBREVIATIONS, RULE_SECTIONS_ORDER, RULE_LOW_QUALITY_CONFERENCES, - RULE_DOUBLE_SPACE + RULE_DOUBLE_SPACE, RULE_NUMBER_OF_BRACKETS, RULE_TEXT_IN_BRACKETS, ) diff --git a/src/main/kotlin/com/github/darderion/mundaneassignmentpolice/rules/Rules.kt b/src/main/kotlin/com/github/darderion/mundaneassignmentpolice/rules/Rules.kt index 2718134..5cd10e0 100644 --- a/src/main/kotlin/com/github/darderion/mundaneassignmentpolice/rules/Rules.kt +++ b/src/main/kotlin/com/github/darderion/mundaneassignmentpolice/rules/Rules.kt @@ -85,18 +85,30 @@ val RULE_MEDIUM_DASH = SymbolRuleBuilder() val longDash = '—' val RULE_LONG_DASH = SymbolRuleBuilder() - .symbol(longDash) - .ignoringAdjusting(' ') - .shouldNotHaveNeighbor(*numbers.toCharArray()) - //.called("Incorrect usage of '---' symbol") - .called("Неправильное использование длинного тире") - .setDescription("В русском языке оно ставится вместо отсутствующего члена предложения, для указания маршрутов и в ряде других случаев. Подробнее написано тут https://www.vgsa.ru/blogs/mos/80/index.php?special=Y и https://theoryandpractice.ru/posts/18471-dlinnoe-ili-korotkoe-kak-stavit-tire") - .inArea(PDFRegion.EVERYWHERE.except(PDFArea.BIBLIOGRAPHY, PDFArea.FOOTNOTE)) - .getRule() and SymbolRuleBuilder() - .symbol(longDash) - .shouldHaveNeighbor(' ') - .inArea(PDFRegion.EVERYWHERE.except(PDFArea.BIBLIOGRAPHY, PDFArea.FOOTNOTE)) - .getRule() + .symbol(longDash) + .ignoringAdjusting(' ') + .shouldNotHaveNeighbor(*numbers.toCharArray()) + //.called("Incorrect usage of '---' symbol") + .called("Неправильное использование длинного тире") + .setDescription("В русском языке оно ставится вместо отсутствующего члена предложения, для указания маршрутов и в ряде других случаев. Подробнее написано тут https://www.vgsa.ru/blogs/mos/80/index.php?special=Y и https://theoryandpractice.ru/posts/18471-dlinnoe-ili-korotkoe-kak-stavit-tire") + .inArea(PDFRegion.EVERYWHERE.except(PDFArea.BIBLIOGRAPHY, PDFArea.FOOTNOTE)) + .getRule() and (SymbolRuleBuilder() + .symbol(longDash) + .shouldHaveNeighbor(' ') + .inArea(PDFRegion.EVERYWHERE.except(PDFArea.BIBLIOGRAPHY, PDFArea.FOOTNOTE)) + .getRule() or + (SymbolRuleBuilder() + .symbol(longDash) + .fromLeft() + .shouldHaveNeighbor(' ') + .inArea(PDFRegion.EVERYWHERE.except(PDFArea.BIBLIOGRAPHY, PDFArea.FOOTNOTE)) + .getRule() and + SymbolRuleBuilder() + .symbol(longDash) + .fromRight() + .shouldHaveNeighbor('\n') + .inArea(PDFRegion.EVERYWHERE.except(PDFArea.BIBLIOGRAPHY, PDFArea.FOOTNOTE)) + .getRule())) val closingQuote = '”' val openingQuote = '“'