From 10bfd6fc6e9dfbe007b06e51a9ea2c73eb19db91 Mon Sep 17 00:00:00 2001 From: Christopher Williams Date: Fri, 14 Oct 2022 13:17:53 -0700 Subject: Add XML declarations (#424) This is recommend by the XHTML spec. The "Send to Kindle" feature also seems to require this line (otherwise non-ASCII characters in the HTML, like em dash and curly quotes, get mangled). Also remove `` lines as those are now redundant. --- lib/asciidoctor-epub3/converter.rb | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'lib') diff --git a/lib/asciidoctor-epub3/converter.rb b/lib/asciidoctor-epub3/converter.rb index 2dc862c..1ad1d36 100644 --- a/lib/asciidoctor-epub3/converter.rb +++ b/lib/asciidoctor-epub3/converter.rb @@ -388,10 +388,10 @@ module Asciidoctor linkcss = true # NOTE: kindlegen seems to mangle the
element, so we wrap its content in a div - lines = [%( + lines = [%( + - #{chapter_title} @@ -1382,10 +1382,10 @@ document.addEventListener('DOMContentLoaded', function(event, reader) { end # NOTE: SVG wrapper maintains aspect ratio and confines image to view box - content = %( + content = %( + - #{sanitize_doctitle_xml doc, :cdata}