Skip to content

HTML comments in Python docstring are not removed when rendering by streamlit #1

@nukopy

Description

@nukopy

Problem

HTML comments like <!-- md --> in Python docstring are not removed when rendering by streamlit. This is different than what I was expecting. We need investigate how Python docstring is rendered by streamlit.

This promblem is like below:

demo-streamlit

Solution

Maybe, we can find the solution to this problem by reading a part of docstring parser in streamlit's implementation:

In addition, docstirng is treated as "magic command" in streamlit. May be there's a hint of a solution in streamlit's documentation.

How it works is simple: any time Streamlit sees either a variable or literal value on its own line, it automatically writes that to your app using st.write (which you’ll learn about later).

Screen Shot 2020-06-10 at 16 38 22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions