cpbotha / nvpy

Simplenote syncing note-taking application, inspired by Notational Velocity and ResophNotes, but uglier and cross-platformerer.
Other
849 stars 114 forks source link

Improve handling of fenced code blocks #142

Open cpbotha opened 7 years ago

cpbotha commented 7 years ago

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:

bk commented 7 years ago

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

cpbotha commented 7 years ago

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)

bk commented 7 years ago

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?