Skip to content

Commit a0c4ca2

Browse files
committed
🐛 with textwrap the text cannot contain new line statements
1 parent 37cc80f commit a0c4ca2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vuegen/streamlit_reportview.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ def _format_text(
365365
str
366366
A formatted markdown string for the specified text.
367367
"""
368-
tag = ""
369368
if type == "header":
370369
tag = f"h{level}"
371370
elif type == "paragraph" or type == "caption":
@@ -374,6 +373,9 @@ def _format_text(
374373
raise ValueError(
375374
f"Unsupported text type: {type}. Supported types are 'header', "
376375
"'paragraph', and 'caption'."
376+
)
377+
378+
text = text.strip() # get rid of new lines
377379

378380
return textwrap.dedent(
379381
f"""

0 commit comments

Comments
 (0)