Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
10.94k stars 775 forks source link

[🐛 BUG] <center> tag not working in Markdown files #1351

Closed FlorianJacta closed 2 months ago

FlorianJacta commented 3 months ago

What went wrong? 🤔

Users can no longer use the center tag inside Markdown files in CRLF mode. This is a regression.

image

This is what can be seen in the Python console:

[2024-06-04 10:35:31.237][Taipy][INFO] Detected 'ascii' encoding for file 'c:\Users\jacta\OneDrive\Bureau\taipy\Code\basic-demo\gui\t.md'.
[2024-06-04 10:35:31.436][Taipy][INFO]  * Server starting on http://127.0.0.1:5000

Expected Behavior

The text should be centered.

Steps to Reproduce Issue

t.md:

Working in LF: t.md

Not working in CRLF: t.md

<center>
Hello world
</center>

t.py

from taipy.gui import Gui, Markdown

md = Markdown('t.md')

Gui(md).run(title="Frontend Demo")

Browsers

Chrome

OS

Windows

Version of Taipy

Develop 5/31/2024

Acceptance Criteria

Code of Conduct

FredLL-Avaiga commented 3 months ago

I suppose the issue is not present with markdown string ?

from taipy.gui import Gui, Markdown

Gui("<center>Hello world</center>").run(title="Frontend Demo")
FlorianJacta commented 3 months ago

It is not. In fact, if the Markdown is in LF mode I have no issues. This is surely related to this issue: https://github.com/Avaiga/taipy/issues/1255

t.md