Class: Gitlab::Asciidoc::Html5Converter
- Inherits:
-
Object
- Object
- Gitlab::Asciidoc::Html5Converter
- Defined in:
- lib/gitlab/asciidoc/html5_converter.rb
Instance Method Summary collapse
- #convert_inline_anchor(node) ⇒ Object
- #convert_inline_quoted(node) ⇒ Object
- #convert_stem(node) ⇒ Object
Instance Method Details
#convert_inline_anchor(node) ⇒ Object
22 23 24 25 26 |
# File 'lib/gitlab/asciidoc/html5_converter.rb', line 22 def convert_inline_anchor(node) node.id = "user-content-#{node.id}" if node.id && !node.id.start_with?('user-content-') super(node) end |
#convert_inline_quoted(node) ⇒ Object
16 17 18 19 20 |
# File 'lib/gitlab/asciidoc/html5_converter.rb', line 16 def convert_inline_quoted(node) return super unless node.type.to_sym == :latexmath %(<code#{id_attribute(node)} data-math-style="inline">#{node.text}</code>) end |
#convert_stem(node) ⇒ Object
10 11 12 13 14 |
# File 'lib/gitlab/asciidoc/html5_converter.rb', line 10 def convert_stem(node) return super unless node.style.to_sym == :latexmath %(<pre#{id_attribute(node)} data-math-style="display"><code>#{node.content}</code></pre>) end |