class Neo4j::AsciidoctorExtensions::InlineHighlighter::MonospacedTextInlineMacro
Apply syntax highlighting on monospaced text cypher:
Usage:
# [src-cypher]`MATCH (c:Customer {customerName: 'ABCCO'}) RETURN c.BOUGHT.productName`
Public Instance Methods
process(parent, target, attrs)
click to toggle source
# File lib/neo4j/asciidoctor/extensions/inline_highlighter_rouge/extension.rb, line 35 def process(parent, target, attrs) raw_text = attrs[:content] raw_text = raw_text.gsub('→', '->') if raw_text.include? '&' raw_text = raw_text.gsub('←', '<-') if raw_text.include? '&' highlighted_text = InlineHighlighter.highlight_code(target, raw_text, parent.document) create_inline_pass parent, %(<code class="rouge">#{highlighted_text}</code>), attrs end