MarkdownConstraints

interface MarkdownConstraints

A generalized "indent" in markdown world. Stores types of blocks spawning indents alongside indents themselves.

Functions

addModifierIfNeeded
Link copied to clipboard
common
abstract fun addModifierIfNeeded(pos: LookaheadText.Position?): MarkdownConstraints?
Return new constraints with a new modifier added or {@code null} if position does not add new modifiers
applyToNextLine
Link copied to clipboard
common
abstract fun applyToNextLine(pos: LookaheadText.Position?): MarkdownConstraints
Returns a constraints for the next line (at given pos) by continuing as much as possible from {@code this} constraints without adding any new modifiers
containsListMarkers
Link copied to clipboard
common
abstract fun containsListMarkers(upToIndex: Int): Boolean
Leaking abstraction: whether there are "breaking" modifiers which do not continue other constraints even if all types and indents are correct.
startsWith
Link copied to clipboard
common
abstract fun startsWith(other: MarkdownConstraints): Boolean
Whether another constraints can "continue" opened blocks corresponding to {@code this} constraints

Properties

charsEaten
Link copied to clipboard
common
abstract val charsEaten: Int
indent
Link copied to clipboard
common
abstract val indent: Int
isExplicit
Link copied to clipboard
common
abstract val isExplicit: BooleanArray
types
Link copied to clipboard
common
abstract val types: CharArray

Inheritors

CommonMarkdownConstraints
Link copied to clipboard

Extensions

eatItselfFromString
Link copied to clipboard
common
extendsList
Link copied to clipboard
common
fun MarkdownConstraints.extendsList(other: MarkdownConstraints): Boolean
extendsPrev
Link copied to clipboard
common
fun MarkdownConstraints.extendsPrev(other: MarkdownConstraints): Boolean
getCharsEaten
Link copied to clipboard
common
fun MarkdownConstraints.getCharsEaten(s: CharSequence): Int
upstreamWith
Link copied to clipboard
common
fun MarkdownConstraints.upstreamWith(other: MarkdownConstraints): Boolean