Variable with line-breaks

Hi, when I put a text into a variable with line-breaks, it´s not working when showing into bubble block. I have tried with '\n' as well but no look. Is there some workaround? For sample: myvar='text1 text2 ... text3'
8 Replies
Baptiste
Baptiste9mo ago
Try this syntax: myvay = 'text1\ntext2'
LuizAlves
LuizAlves9mo ago
Hi, I tried with myvar=return "- Ortopedia:\nSegunda a Sexta-feira: das 07h às 19h\nSábados: das 07h às 13h\n- Fisioterapia:\nSegunda a Sexta-feira: das 07h às 19h\nSábados: das 07h às 13h" but the http ap is eating some '\n' on backend. I am receving: "children": [ { "type": "ul", "children": [ { "type": "li", "children": [ { "type": "lic", "children": [ { "bold": true, "text": "Ortopedia:\nSegunda a Sexta-feira: das 07h às 19h\nSábados: das 07h às 13h" } ] } ] }, { "type": "li", "children": [ { "type": "lic", "children": [ { "bold": true, "text": "Fisioterapia:\nSegunda a Sexta-feira: das 07h às 19h\nSábados: das 07h às 13h" } ] } ] } ] } ] The trailing '\n' in the 'Sábados: das 07h às 13h\n- Fisioterapia:' is getting rid off
LuizAlves
LuizAlves9mo ago
Here is the screen capture fter I send to whatsapp
No description
Baptiste
Baptiste9mo ago
That’s expected since it is another rich text list child, the new lines between list items are “ignored”
LuizAlves
LuizAlves9mo ago
OK, thank you @Baptiste . But, How can I put a linebreak into this string myvar=return "- Ortopedia:\nSegunda a Sexta-feira: das 07h às 19h\nSábados: das 07h às 13h\n- Fisioterapia:\nSegunda a Sexta-feira: das 07h às 19h\nSábados: das 07h às 13h"? I need to put a linebreak before '- Fisioterapia:', but it´s ignored when I receive the http api results. And, the '-' is also ignored as well.
Baptiste
Baptiste9mo ago
The markdown syntax is transformed into a rich text object. The “-“ are replaced by the “li” type which means “list item”
LuizAlves
LuizAlves9mo ago
Thank you. I modified my parse to handle it
Want results from more Discord servers?
Add your server