flet-dev / flet-dev/flet

Markdown toggle list not showing

Open
#1,743 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
17k
Forks
694
Avg merge
1d 14h
Merged PRs (30d)
33

Description

Hi! I recently got started with flet and would like to display some markdown code.
I have the following markdown code on a file:

<details>
  <summary>Click me</summary>
  
  1. item 1
  2. item 2
     * thing 1
     * thing 2
  
</details>

and this python code to display it:

        ft.Markdown(
            """
            <details>
              <summary>Click me</summary>
  
              1. item 1
              2. item 2
                 * thing 1
                 * thing 2
  
            </details>

            """ ,
            selectable=True,
            extension_set=ft.MarkdownExtensionSet.GITHUB_WEB,
            code_theme="a11y-light",
            on_tap_link=lambda e: page.launch_url(e.data),
            expand=True
        )

The markdown code should display a collapsable button, like this:

Click me
  1. item 1
  2. item 2
    • thing 1
    • thing 2

But instead just shows the content:
image

This markdown editor flet example also doesn't show this.

Flet version:

Name: flet
Version: 0.9.0
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page: None
Author: Appveyor Systems Inc.
Author-email: hello@flet.dev
License: Apache-2.0
Location: /home/phi/pythonRepos/notes/venv/lib/python3.8/site-packages
Requires: packaging, qrcode, watchdog, flet-runtime, pydantic, websocket-client, copier, websockets
Required-by: 

I am using WSL2 on Windows 11.

Any help would be appreciated!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the ft.Markdown entry point and the supplied details/summary example, using the reported Flet 0.9.0 configuration. Trace how the Markdown extension set handles details blocks; done when the example renders a collapsible control while preserving its nested list content.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.