lib/pagehub-markdown/processors/embedder.rb
# Returns the content of the node <div class='markdown-body'></div>,
# it will also remove all id attributes of all content nodes.
#
# Supported options:
# 1. reduce-headings: all heading nodes (<h1> through <h5>) will be
# stepped one level, so h1 becomes h2, etc.
Returns the content of the node ,
it will also remove all id attributes of all content nodes.

Supported options:
1. reduce-headings: all heading nodes ( through ) will be
stepped one level, so h1 becomes h2, etc.
Returns the content of the node it will also remove all id attributes of all content nodes . Supported options : 1 . reduce - headings : all heading nodes ( through ) will be stepped one level so h1 becomes h2 etc .
def process(content, uri, args = "")
        html_doc = Nokogiri::HTML(content) do |config| config.noerror end
        node = html_doc.xpath("//div[@class='markdown-body']").first
        stamp(node, uri, 'github-wiki')
        if args.include?("reduce-headings") then
          5.downto(1) { |level|
            node.xpath("//h#{level}").each { |heading_node|
              heading_node.name = "h#{level+1}"
            }
          }
        end
        node.to_s
      end
def process ( content , uri , args = "" ) html_doc = Nokogiri :: HTML ( content ) do | config | config . noerror end node = html_doc . xpath ( "//div[@class='markdown-body']" ) . first stamp ( node , uri , 'github-wiki' ) if args . include? ( "reduce-headings" ) then 5 . downto ( 1 ) { | level | node . xpath ( "//h#{level}" ) . each { | heading_node | heading_node . name = "h#{level+1}" } } end node . to_s end
Returns the content of the node <div class='markdown-body'></div>,
it will also remove all id attributes of all content nodes.
Returns the content of the node <div class = ' markdown - body ' > < / div > it will also remove all id attributes of all content nodes .
content
<not_specific>
uri
<not_specific>
args
<not_specific>