Class: Qiita::Markdown::Filters::SyntaxHighlight

Inherits:
HTML::Pipeline::Filter
  • Object
show all
Defined in:
lib/qiita/markdown/filters/syntax_highlight.rb

Defined Under Namespace

Classes: Highlighter

Constant Summary collapse

DEFAULT_LANGUAGE =
"text"

Instance Method Summary collapse

Instance Method Details

#callObject



7
8
9
10
11
12
13
14
15
# File 'lib/qiita/markdown/filters/syntax_highlight.rb', line 7

def call
  doc.search("pre").each do |node|
    Highlighter.call(
      default_language: default_language,
      node: node,
    )
  end
  doc
end