I would like to have new line items in the basic card . Google's documentation states:
A limited subset of markdown is supported:
New line with a double space
*bold*
italics
I am able to get the bold and italics working but the new line is not working . I quite don't understand by the double space usage.
<br>
works in the simulator but in real device it renders as <br>
Can someone help me in rendering multiple lines using the buildrich response ?
My code:
app.ask(app.buildRichResponse()
.addSimpleResponse("Simple response")
.addBasicCard(app.buildBasicCard('L1 L2 L3')
)
Markdown requires that to force a line break, you need two spaces followed by a newline. So something like this in your code should work:
app.ask(app.buildRichResponse()
.addSimpleResponse("Simple response")
.addBasicCard(app.buildBasicCard("L1 \nL2 \nL3")
)
To be clear, that is <space><space><backslash><n>
For me works a double space enclosed by a \n
\n \n
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With