-
Notifications
You must be signed in to change notification settings - Fork 826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown
: Sections missing in the rendering
#2781
Comments
Thanks; given that this really comes down to how the Textual |
It's worth noting that if I drop the document linked above into the markdown-it online demo it appears to render fine. Initially this would suggest a bug in our |
here's a minimum markdown that doesn't work:
|
Nice job! Thanks. As minimal examples go it doesn't get better than that! 👍 |
It looks like Textual parses fenced code blocks, but not code blocks created with indentation which have a different Token type. Might be worth also taking issue #2676 into consideration for any changes to how the code blocks are parsed? (Apologies for the broken up code below caused by the triple backticks!) from markdown_it import MarkdownIt
from textual.app import App, ComposeResult
from textual.containers import Container
from textual.widgets import Footer, Markdown, TextLog
MARKDOWN_V1 = """
## General *ftl* Commands
«?» Show this man page
"""
MARKDOWN_V2 = """
## General *ftl* Commands
|
Thanks for diving in and checking this @TomJGooding, very helpful (good recollection of the other issue too). Looking like |
Going to put this on the ToDo for next week. |
Markdown
: Sections missing in the rendering
I believe this should be a fine way to solve this. I don't see anything that means that a `code_block` is in any way different than a fenced block that has no syntax specified. See Textualize#2781.
* Initial set of Markdown widget unit tests Noting too crazy or clever to start with, initially something to just test the basics and to ensure that the resulting Textual node list is what we'd expect. Really just the start of a testing framework for Markdown. * Allow handling of an unknown token This allow for a couple of things: 1. First and foremost this will let me test for unhandled tokens in testing. 2. This will also let applications support other token types. * Update the Markdown testing to get upset about unknown token types * Treat a code_block markdown token the same as a fence I believe this should be a fine way to solve this. I don't see anything that means that a `code_block` is in any way different than a fenced block that has no syntax specified. See #2781. * Add a test for a code_block within Markdown * Allow for inline fenced code and code blocks See #2676 Co-authored-by: TomJGooding <[email protected]> * Update the ChangeLog * Improve the external Markdown elements are added to the document * Improve the testing of Markdown Also add a test for the list inline code block * Remove the unnecessary pause * Stop list items in Markdown being added to the focus chain See #2380 * Remove hint to pyright/pylance/pylint that it's okay to ignore the arg --------- Co-authored-by: TomJGooding <[email protected]>
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
50% of this file is missing in the rendering https://github.com/nkh/ftl/blob/main/config/ftl/man/ftl.md, all the other renderes I use renders the missing sections, the link above also shows a rendering.
The text was updated successfully, but these errors were encountered: