Skip to content

Commit 5ac335c

Browse files
committed
🚧 update formatting logic for long description
- update tests once the relative imports are updated
1 parent d8ecd52 commit 5ac335c

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
A general description of the report.
1+
A general description of the report.
2+
3+
It should test all major components which are available
4+
to be integrated into VueGen.
5+
6+
Check our tests folder for examples of report files used to generate actual reports.

src/vuegen/streamlit_reportview.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -392,17 +392,19 @@ def _format_text(
392392
)
393393

394394
text = text.strip() # get rid of new lines
395-
396-
return textwrap.dedent(
397-
f"""
395+
text = textwrap.indent(text, " ")
396+
ret = textwrap.dedent(
397+
f"""\
398398
st.markdown(
399-
(
400-
"<{tag} style='text-align: {text_align}; "
401-
"color: {color};'>{text}</{tag}>"
402-
),
399+
'''
400+
<{tag} style='text-align: {text_align};
401+
color: {color};'>\n {text}
402+
</{tag}>
403+
''',
403404
unsafe_allow_html=True)
404405
"""
405406
)
407+
return ret
406408

407409
def _generate_home_section(
408410
self,

0 commit comments

Comments
 (0)