fix(dsl): keep single spaces after opening tags

Dictionaries use a space right after an opening tag as a visible
separator, and dropping it glued words together.

Drop only space runs at the start of a block and collapse runs to one
space everywhere else; spaces after opening tags are now kept.
This commit is contained in:
OneWay authored and Evgenii committed 2026-09-21 16:35:08 +08:00
1 parent ee19f84f91
commit a5b54def51
1 file changed
+4 -1
@@ -124,7 +124,10 @@ object DslAnnotatedParser {
mClosedPendingBreak = false
}
fun appendChar(char: Char) {
fun appendChar(char: Char, hard: Boolean = false) {
if (char == ' ' && !hard) {
if (lastAppended == null || lastAppended == ' ') return
}
lastAppended = char
if (mClosedPendingBreak) {
mClosedPendingBreak = false