Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '“'
Expand Down