I've been using Kramdown for some time and love the extended syntax. However, the code blocks seem to be handled by CodeRay by default, but I heavily prefer the better supported Pygments.rb library (previously Albino) since it has much better syntax support (and CodeRay is on its way to abandonment I believe).
Is there already a good API hook/class to inherit from (similar to RedCarpet's renderer base class) so that I can use Pygments to render my code block whenever one is processed? I could hack around in a fork to use Pygments instead, but it would be nicer if this could be done with a simple render class or method overwrite.
Have a blessed day!
~ Jonathan Martin
The text was updated successfully, but these errors were encountered:
I've been using Kramdown for some time and love the extended syntax.
However, the code blocks seem to be handled by CodeRay by default,
but I heavily prefer the better supported Pygments.rb library
(previously Albino) since it has much better syntax support (and
CodeRay is on its way to abandonment I believe).
Is there already a good API hook/class to inherit from (similar to
RedCarpet's renderer base class) so that I can use Pygments to render
my code block whenever one is processed? I could hack around in a
fork to use Pygments instead, but it would be nicer if this could be
done with a simple render class or method overwrite.
Derive a class from Kramdown::Converter::Html and override the
necessary methods (convert_codeblock and convert_codespan).
I've been using Kramdown for some time and love the extended syntax. However, the code blocks seem to be handled by CodeRay by default, but I heavily prefer the better supported Pygments.rb library (previously Albino) since it has much better syntax support (and CodeRay is on its way to abandonment I believe).
Is there already a good API hook/class to inherit from (similar to RedCarpet's renderer base class) so that I can use Pygments to render my code block whenever one is processed? I could hack around in a fork to use Pygments instead, but it would be nicer if this could be done with a simple render class or method overwrite.
Have a blessed day!
~ Jonathan Martin
The text was updated successfully, but these errors were encountered: