I just released v0.1.0 of the “python-string-markdown”, VSCode extension. This extension is a syntax highlighter for Markdown in Python docstring. This will be helpful when using streamlit!
- Visual Studio Code | Marketplace: “python-string-markdown”
- GitHub: nukopy/python-string-markdown
Summary
When you use streamlit, you can write texts in Markdown in Python docsting written with three double-quotation like """ text """
. However, texts in docsting is NOT highlighted, so this extension would be helpful like below:
Current Problem
This extension enable VSCode highlight Markdown in Python docstring by HTML comments <!-- md -->
, <!-- end-md -->
, referred to VSCode’s Syntax Highlight Guide. However, as described in this GitHub issue, HTML comments in Python docstring are NOT removed when rendering by streamlit. This looks bad
At right side of the image below, HTML comments <!-- md -->
, <!-- end-md -->
are rendered:
A question associated with this problem is posted and discussed in streamlit discussion forum, “Are you using HTML in Markdown? Tell us why!”.
I think the solution to this problem is removing HTML comments when streamlit renders docstring. Anyone has good idea to realize this?
Personally, streamlit has potential to replace Jupyter Notebook. Those who like to develop app, analyze data in 1 editor such as VSCode, Vim, Emacs, etc… will love streamlit. Streamlit realizes all in 1 editor!
Thanks.