nvpy icon indicating copy to clipboard operation
nvpy copied to clipboard

Improve handling of fenced code blocks

Open cpbotha opened this issue 8 years ago • 3 comments

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.

cpbotha avatar Dec 01 '16 20:12 cpbotha

How about Trent Mick's python-markdown2 library? It has fenced code blocks with syntax highlighting as well as a few other nice extensions.

bk avatar Jan 28 '17 22:01 bk

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)

cpbotha avatar Jan 30 '17 06:01 cpbotha

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?

bk avatar Jan 30 '17 16:01 bk