fun splitByPipes()

in src/commonMain/kotlin/org/intellij/markdown/flavours/gfm/table/GitHubTableMarkerBlock.kt [102:120]


        fun splitByPipes(text: CharSequence): List<String> {
            val result = arrayListOf<String>()
            var startIndex = 0
            for (index in text.indices) {
                val char = text[index]
                if (char != '|') {
                    continue
                }
                val charBefore = text[(index - 1).coerceAtLeast(0)]
                if (charBefore == '\\') {
                    continue
                }
                val substring = text.substring(startIndex, index)
                result.add(substring)
                startIndex = index + 1
            }
            result.add(text.substring(startIndex))
            return result
        }