Discussion:
[hakyll] alternate syntax highlighting
Jon Schoning
2015-02-25 21:46:41 UTC
Permalink
Suppose I wanted to use a completely different 3rd party syntax highlighter
from any of the normal options i.e. using an arbitrary unixFilter.

Would I have to use the "teaser" method of surrounding the code with HTML
comments, and then using the unixFilter to process those parsed sections?
Or is there a different method that would be easier to find and parse the
code sections within the post?

thanks,

Jon
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
j***@gmail.com
2015-02-27 13:32:00 UTC
Permalink
Hello Jon,
For transforming some blocks of code in your posts, you could write a
custom pandoc filter[1] which calls your 3rd party highlighter and put its
result back into a Pandoc Raw Block, then wrap it into a hakyll
unsafeCompiler[2] for use with pandocCompilerWithTransformM[3].

If you need more than these pointers, I'll gladly answer your questions.

Julien

[1]: http://pandoc.org/scripting.html
[2]:http://jaspervdj.be/hakyll/reference/Hakyll-Core-Compiler.html
[3]: http://jaspervdj.be/hakyll/reference/Hakyll-Web-Pandoc.html
Post by Jon Schoning
Suppose I wanted to use a completely different 3rd party syntax
highlighter from any of the normal options i.e. using an arbitrary
unixFilter.
Would I have to use the "teaser" method of surrounding the code with HTML
comments, and then using the unixFilter to process those parsed sections?
Or is there a different method that would be easier to find and parse the
code sections within the post?
thanks,
Jon
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jon Schoning
2015-02-28 20:34:43 UTC
Permalink
Perfect, thank you! This was particularly nice because I learned more
about how both hakyll and pandoc work though this.
Post by j***@gmail.com
Hello Jon,
For transforming some blocks of code in your posts, you could write a
custom pandoc filter[1] which calls your 3rd party highlighter and put its
result back into a Pandoc Raw Block, then wrap it into a hakyll
unsafeCompiler[2] for use with pandocCompilerWithTransformM[3].
If you need more than these pointers, I'll gladly answer your questions.
Julien
[1]: http://pandoc.org/scripting.html
[2]:http://jaspervdj.be/hakyll/reference/Hakyll-Core-Compiler.html
[3]: http://jaspervdj.be/hakyll/reference/Hakyll-Web-Pandoc.html
Post by Jon Schoning
Suppose I wanted to use a completely different 3rd party syntax
highlighter from any of the normal options i.e. using an arbitrary
unixFilter.
Would I have to use the "teaser" method of surrounding the code with HTML
comments, and then using the unixFilter to process those parsed sections?
Or is there a different method that would be easier to find and parse the
code sections within the post?
thanks,
Jon
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...