I have a doc where I use split(linebreak()) to split up the lines of a chunk of text into a list, but it seems to no longer be functioning the way it used to.
I’ve created a test doc here to demonstrate the problem. Previously when I would input text similar to what is currently in first row of this doc, I would get the lines split up in the second column, but it’s no longer working.
Am I missing something? Is there some other way to achieve what I want here? I tried splitting by character (10) and character (13) thinking maybe it was a difference between a hard and soft line break, but neither of those work either.
I want each line to be split into a separate list item. I added a third column called ‘expected output’ to show what this looks like. I achieved it in that column by manually typing a comma after each row, and splitting by comma rather than linebreak.
I’m not entirely sure of what I’m going to say but I think Coda takes your Input not as a multiline string but as a whole string displayed as a multiline one (if that makes any sense )
So, if there’s no line to break, Split() can’t really do its job here I guess …
I’ve added few fields to the doc you shared (thanks for sharing ) trying to find a workaround to your issue … and reproduced those in the sample you’ll find below
I think the easiest way to Split() your Input according to your needs would be to use RegexReplace() to convert any apparent (“visual”) line breaks into LineBreak() which you can then Split() using something like :
I’ve been able to get my original doc working the way I want using the regex trick. And knowing that linebreak() now accepts true and false parameters will actually be useful for a few other things I’m doing (even if it doesn’t work properly with split() yet).