Linebreak() behavior changed?

so the answer is YES

coda HAS changed the behaviour of the Split(LineBreak()) combination!
and it has BROKEN a LOT of my clients documents.

basically, they decided to introduce TWO types of line-breaks generated by LineBreak();

  • the HARD line-break which occurs between paragraphs, generated by LineBreak(FALSE)
  • the SOFT line-break which separates lines without creating a new paragraph, by LineBreak(TRUE)

BUT - alas - the Split(LineBreak(TRUE)) and Split(LineBreak(FALSE)) behave exactly the same…
they only split your text on the HARD line-breaks and ignore the soft line breaks!

so, as @Pch has indicated above (bravo!), you need to replace the soft line-breaks with hard line-breaks first, and then use the Split(LineBreak()) to split your text into lines as you wanted to do.

the RegexReplace(‘\R’,LineBreak()) scans for ANY type of line-break and replaces it with the hard line-break. so your Split(LineBreak()) then does exactly what you wanted it to do.

in the regex language \R stands for “any-line-break”

the sample table below shows how the three options behave (using three blocks of text)…
i have used the numbered-list format for the outputs, so we can see clearly how they split

i hope this makes the issue and the solution clearer

max

4 Likes