in src/commonMain/kotlin/org/intellij/markdown/parser/markerblocks/providers/SetextHeaderProvider.kt [14:30]
override fun createMarkerBlocks(pos: LookaheadText.Position,
productionHolder: ProductionHolder,
stateInfo: MarkerProcessor.StateInfo): List<MarkerBlock> {
if (stateInfo.paragraphBlock != null) {
return emptyList()
}
val currentConstaints = stateInfo.currentConstraints
if (stateInfo.nextConstraints != currentConstaints) {
return emptyList()
}
if (MarkerBlockProvider.isStartOfLineWithConstraints(pos, currentConstaints)
&& getNextLineFromConstraints(pos, currentConstaints)?.let { REGEX.matches(it) } == true) {
return listOf(SetextHeaderMarkerBlock(currentConstaints, productionHolder))
} else {
return emptyList()
}
}