summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2015-10-21 23:20:45 -0600
committerDan Allen <dan.j.allen@gmail.com>2015-10-22 00:01:58 -0600
commitc522cd3939db00af4c95a6d98aeb19aeb7c5c80a (patch)
tree73407bd097081b2b1c1d86236b15aa0488f8e61f /lib
parent03b78e1b1c2b9b4ac2aa5b066f31bf5b341691ae (diff)
resolves #1530 honor htmlsyntax attribute when backend is html/html5
Diffstat (limited to 'lib')
-rw-r--r--lib/asciidoctor/document.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asciidoctor/document.rb b/lib/asciidoctor/document.rb
index bdd6358b..e8f9d66a 100644
--- a/lib/asciidoctor/document.rb
+++ b/lib/asciidoctor/document.rb
@@ -839,7 +839,7 @@ class Document < AbstractBlock
else
case name
when 'backend'
- update_backend_attributes apply_attribute_value_subs(value)
+ update_backend_attributes apply_attribute_value_subs(value), !!@attributes_modified.delete?('htmlsyntax')
when 'doctype'
update_doctype_attributes apply_attribute_value_subs(value)
else
@@ -913,7 +913,7 @@ class Document < AbstractBlock
attrs['htmlsyntax'] = 'xml'
new_backend = new_backend[1..-1]
elsif new_backend.start_with? 'html'
- attrs['htmlsyntax'] = 'html'
+ attrs['htmlsyntax'] = 'html' unless attrs['htmlsyntax'] == 'xml'
end
if (resolved_name = BACKEND_ALIASES[new_backend])
new_backend = resolved_name