VolkovLabs / business-text

Dynamic, data-driven text for @grafana
https://docs.volkovlabs.io
Apache License 2.0
79 stars 14 forks source link

Bug Markdown rendering: Two new lines #357

Closed yulipumal closed 5 days ago

yulipumal commented 1 week ago

Dear volkovLabst team, thank you for the business-text plugin. It works great, except of one bug that is very anoying.

When the markdown is: text in first line\n\ntext in new line The markdown renderer ignores the two lines and renderes it as one line:

<p>text in first line</p>
<p>text in second line</p>

The second line (one empty <p></p>) is missing.

vitPinchuk commented 5 days ago

@yulipumal Thank you for your question

text in first line\n\ntext in new line

return text in first line\n\ntext in new line

it is expected behavior

please, try to use
tag to add lines break

yulipumal commented 5 days ago

You misunderstood, as I wanted to know how to have two new lines. More precisely, one empty line in between the text.

<p>text in first line</p>
<p></p>
<p>text in second line</p>

text in first line \n \n text in new line Does not work, see above.

mikhail-vl commented 5 days ago

@yulipumal Business Text panel supports markdown, HTML and Handlebars as we explained in the documentation and YouTube tutorials.

\n annotations are used in preformatted text, which requires additional element <pre></pre> to use them.

You can use

<p>text in first line</p>
<p></p>
<p>text in second line</p>

or

text in first line
<p></p>
text in second line

Let us know if it's clear.