Page header now uses h1-title logic.
This commit is contained in:
@@ -14,7 +14,7 @@ module Precious
|
|||||||
end
|
end
|
||||||
|
|
||||||
def page_header
|
def page_header
|
||||||
page_header_from_content(@content) || title
|
title
|
||||||
end
|
end
|
||||||
|
|
||||||
def content
|
def content
|
||||||
@@ -163,8 +163,10 @@ module Precious
|
|||||||
#
|
#
|
||||||
def content_without_page_header(content)
|
def content_without_page_header(content)
|
||||||
doc = build_document(content)
|
doc = build_document(content)
|
||||||
|
if @h1_title
|
||||||
title = find_header_node(doc)
|
title = find_header_node(doc)
|
||||||
title.remove unless title.empty?
|
title.remove unless title.empty?
|
||||||
|
end
|
||||||
# .inner_html will cause href escaping on UTF-8
|
# .inner_html will cause href escaping on UTF-8
|
||||||
doc.css("div#gollum-root").children.to_xml(@@to_xml)
|
doc.css("div#gollum-root").children.to_xml(@@to_xml)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user