Skip to content

Commit

Permalink
collapse space before and after CDATA block
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Oct 20, 2019
1 parent b52c3be commit c8ca2e2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/asciidoctor-epub3/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,15 @@ def document node
<title>#{doctitle_sanitized}</title>
<link rel="stylesheet" type="text/css" href="styles/epub3.css"/>
<link rel="stylesheet" type="text/css" href="styles/epub3-css3-only.css" media="(min-device-width: 0px)"/>
#{icon_css_head}<script type="text/javascript">
<![CDATA[
#{icon_css_head}<script type="text/javascript"><![CDATA[
document.addEventListener('DOMContentLoaded', function(event, reader) {
if (!(reader = navigator.epubReadingSystem)) {
if (navigator.userAgent.indexOf(' calibre/') >= 0) reader = { name: 'calibre-desktop' };
else if (window.parent == window || !(reader = window.parent.navigator.epubReadingSystem)) return;
}
document.body.setAttribute('class', reader.name.toLowerCase().replace(/ /g, '-'));
});
]]>
</script>
]]></script>
</head>
<body>
<section class="chapter" title="#{doctitle_sanitized.gsub '"', '&quot;'}" epub:type="chapter" id="#{docid}">
Expand Down

0 comments on commit c8ca2e2

Please sign in to comment.