diff options
Diffstat (limited to 'docs/modules/syntax-highlighting/examples/pygments-syntax-highlighter-with-custom-stylesheet.rb')
| -rw-r--r-- | docs/modules/syntax-highlighting/examples/pygments-syntax-highlighter-with-custom-stylesheet.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/modules/syntax-highlighting/examples/pygments-syntax-highlighter-with-custom-stylesheet.rb b/docs/modules/syntax-highlighting/examples/pygments-syntax-highlighter-with-custom-stylesheet.rb new file mode 100644 index 00000000..9c6fdae1 --- /dev/null +++ b/docs/modules/syntax-highlighting/examples/pygments-syntax-highlighter-with-custom-stylesheet.rb @@ -0,0 +1,12 @@ +class MyPygmentsAdapter < (Asciidoctor::SyntaxHighlighter.for 'pygments') + register_for :pygments + + def write_stylesheet? doc + false + end + + def docinfo location, doc, opts + slash = opts[:self_closing_tag_slash] + %(<link rel="stylesheet" href="/styles/syntax-theme.css"#{slash}>) + end +end |
