# # AsciiDoc source code highlight filter configuration file. # # Documented in source-hightlight-filter.txt in AsciiDoc distribution # ./examples/website/ directory. # # HTML outputs require GNU source-highlight # http://www.gnu.org/software/src-highlite/source-highlight.html # ######################## # Source block templates ######################## [source-highlight-block] template::[listingblock] # Customized listingblock block for xhtml11 to ensure valid XHTML1.1. ifdef::backend-xhtml11[] [source-highlight-block] <div class="listingblock"> <a id="{id}"></a> <div class="title">{caption=Example: }{title}</div> <div class="content"> | </div></div> endif::backend-xhtml11[] # Use DocBook programlisting element. ifdef::backend-docbook[] [source-highlight-block] <programlisting language="{language}" linenumbering="{src_numbered=unnumbered}"> <![CDATA[ | ]]> </programlisting> endif::backend-docbook[] ######################### # Source paragraph styles ######################### [paradef-default] ifdef::backend-html4[] source-style=template="passthroughblock",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight -f html -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}}" endif::backend-html4[] ifdef::backend-xhtml11[] source-style=template="exampleblock",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight -f xhtml -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}}" endif::backend-xhtml11[] ifdef::backend-docbook[] source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="" endif::backend-docbook[] ######################### # Source block styles ######################### [blockdef-listing] ifdef::backend-html4[] source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight -f html -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}}" endif::backend-html4[] ifdef::backend-xhtml11[] source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight -f xhtml -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}}" endif::backend-xhtml11[] ifdef::backend-docbook[] source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="" endif::backend-docbook[] # # DEPRECATED: Pre 8.2.7 filter definition. # ######################### # Source block definition ######################### [blockdef-source-highlight] # The old ^ delimiter is for backward compatibility, may be removed from # in future versions. delimiter=(^source~{4,}$)|(^\^{4,}$) template=source-highlight-block presubs=none postsubs=callouts posattrs=language,src_numbered,src_tab ifndef::backend-docbook[] # GNU Source Highlight filter. filter=source-highlight -f {backend-xhtml11?xhtml}{backend-html4?html}{backend-docbook?docbook} -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}} endif::backend-docbook[] ifdef::backend-docbook[] # In the case of DocBook just pass the listing through and let the DocBook # toolchain handle it. filter= endif::backend-docbook[] # # DEPRECATED: End #