browser.markdown fails at ordered list?
See original GitHub issueBonjour, Pierre. I notice that the browser.markdown
does not (yet?) support ordered list.
from browser import markdown
payload = """
1. hello
2. world
"""
html, scripts = markdown.mark(payload)
It would encounter an exception.
Traceback (most recent call last):
File http://192.168.1.8:8000/main.py line 49, in <module>
html, scripts = markdown.mark(payload)
File VFS.browser.markdown.py line 154, in mark
lines[i]='<li>'+lines[i][len(mo.groups()[0]):]
IndexError: tuple index out of range
By the way, can you also give a sample of markdown snippet here (and later also add it to this document page), to demonstrate what input would generate that scripts
?
Off-topic:
I also attempted to use brip
to install this generic markdown module. The installation was successful, but the import markdown
failed with this trace:
Traceback (most recent call last):
File http://192.168.1.8:8000/main.py line 50, in <module>
import markdown
File VFS.markdown/__init__.py line 29, in <module>
from .core import Markdown,markdown,markdownFromFile
File VFS.markdown.core.py line 26, in <module>
from . import util
ImportError: cannot import name 'util'
Not sure whether Brython’s VFS is expected to support from . import module
. Those are typical errors I encountered when I worked on brip
. Perhaps you can also help take a look, too.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Unable to escape ordered list · Issue #53 - GitHub
I'm trying to get the following string to render as a paragraph: "1. This is some text" This gets converted into an ordered...
Read more >Markdown: continue numbered list - Stack Overflow
For those trying to continue a numbered list after something other than a code block. For example a second paragraph.
Read more >Problems creating a bullet and number list with markdown
Let me specify: I'm trying to create a 2 item bullet list, some space, then a 3 item number list, some space, a...
Read more >GitHub Pages: Ordered & Unordered Lists with Markdown
Your browser can't play this video. ... GitHub Pages: Ordered & Unordered Lists with Markdown. 508 views 3 years ago.
Read more >Lists — Ordered, Unordered, Bullets and Nesting — Mastering ...
Working with lists and nested content in Markdown. ... Your browser can't play this video. ... 7.8K views 6 years ago Mastering Markdown....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ray,
The commit above should make the rendering of markdown pages much faster, the longest of your pages (Function.md) loads in about 3 seconds.
Amazing news! I tested it just now, and found out 2 things:
Thanks! Closing issue.