From 40fc0fe353ebd45eea3751356c4760758ebeabcf Mon Sep 17 00:00:00 2001 From: Robert Bennett Date: Thu, 23 Dec 2021 23:58:33 -0700 Subject: added example to docs of extending the pygments adapter to link to a custom stylesheet --- .../pygments-syntax-highlighter-with-custom-stylesheet.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/modules/syntax-highlighting/examples/pygments-syntax-highlighter-with-custom-stylesheet.rb (limited to 'docs/modules/syntax-highlighting/examples') 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] + %() + end +end -- cgit v1.2.3