robotskirt icon indicating copy to clipboard operation
robotskirt copied to clipboard

async renderer.blockcode support?

Open suan opened this issue 12 years ago • 2 comments

Very similar to this issue on marked, It'd be nice to have async support for using something like pygments in .blockcode. Especially since github-flavored-markdown is so prevalent, and uses pygments for code highlighting.

Also, the pygments example in the README is wrong or outdated, according to the latest pygments code.

suan avatar Dec 09 '12 18:12 suan

:+1:

  1. Yeah, but Sundown is, in nature, synchronous. Making it async would involve work in both Robotskirt and Sundown.
  2. The Pygments example in the README is indeed ficticious. I just wanted to give a notion of how to use the feature.
  3. For now, you can use a synchronous version of Pygments or something like Fibers to accomplish it.
  4. Sundown is currently frozen because a new renderer is coming. Better, faster, complete, ...
    Please see vmg/sundown@37728fb2d7137ff7c37d0a474cb827a8d6d846d8

mildsunrise avatar Dec 13 '12 14:12 mildsunrise

Also, that GFM is prevalent doesn't mean you have to use the same highlighting engine! I'd use a more standard approach like CodeMirror or ACE (they both have the same API and they're JavaScript).

mildsunrise avatar Dec 28 '12 18:12 mildsunrise