Markdown broken when an image is not found when using flet -d
I searched for duplicate issue, didn't found.
Mentioned the problem on discord, no response.
Description
Markdown often breaks silently on images and produces a huge grey zone without content when run by flet -d
Code example to reproduce the issue:
Go to: https://flet.dev/docs/controls/markdown/ Copy the whole example to mdtest.py
Run with flet -d mdtest.py
import flet as ft
md1 = """

"""
def main(page: ft.Page):
page.scroll = "auto"
page.add(
ft.Markdown(
md1,
selectable=True,
extension_set=ft.MarkdownExtensionSet.GITHUB_WEB,
on_tap_link=lambda e: page.launch_url(e.data),
)
)
ft.app(target=main)
Describe the results you received: Empty dialog with a vertically scrollable grey zone:
Note: the example does not contain the icon assets.
Describe the results you expected:
The example from the docs:
Additional information you deem important (e.g. issue happens only occasionally): It works mostly when I run the program directly and I use the web browser.
Flet version (pip show flet):
$ pip show flet Name: flet Version: 0.13.0
Operating system:
Windows 10
Additional environment details: Python 3.12
I encountered this as well for flet app mode. Works fine in flet web mode. -- flet fails to render all markdown in the Markdown object if there is a broken local image link.