nvpy
nvpy copied to clipboard
Improve handling of fenced code blocks
It looks like the simplenote web-app only has weak support for fenced code blocks. For example, I can't specify the language like I can here on github.
Investigate what's possible, get nvpy to do a little more. Look to nvalt for inspiration.
Some notes:
- simplenote supports triple-tilde fences, python markdown does not by default. Urgh.
How about Trent Mick's python-markdown2 library? It has fenced code blocks with syntax highlighting as well as a few other nice extensions.
For the HTML output, this would be a good candidate.
However, we also need something to do partial real-time syntax highlighting in the nvpy tk interface. (text control)
So this is a question of extending the current functionality of activate_markdown_highlighting
?
I assume you've already taken a look at using the Pygments lexer for marked code blocks and simply applying colours to the text according to the token types it finds?