ktxt2 join apply special chars within joined block

This commit is contained in:
2022-05-09 11:34:11 -04:00
parent 10b6222e9d
commit ba15529769
2 changed files with 6 additions and 2 deletions

View File

@@ -137,4 +137,8 @@
((text.endsWith "\n")
(+ (substr text 0 -1) "↵"))
(true
text))))
text))))
// Apply special chars in the middle of a block, and insert them at the end
(function :String normalizeSpecialChars [:String text]
(insertSpecialChars (applySpecialChars text)))

View File

@@ -261,7 +261,7 @@
(function joinBlocks [element nextElement]
(assertLet [(Block (object sourceStart start source source1 output output1 outputLocked lock1)) element
(Block (object outputEnd end source source2 output output2 outputLocked lock2)) nextElement
text "${source1}${source2}${KTxt2.unlockedStart}${output1}${output2}"]
text "$(KTxt2.normalizeSpecialChars "${source1}${source2}")${KTxt2.unlockedStart}$(KTxt2.normalizeSpecialChars "${output1}${output2}")"]
(unless (or lock1 lock2)
(postMessage (objectWith [type "replace"] start end text)))))