Closed cexbrayat closed 1 year ago
I cannot reproduce this issue using:
$ npx asciidoctor -r asciidoctor-kroki --embedded -a allow-uri-read doc.adoc -o -
<div class="imageblock text-center kroki">
<div class="content">
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="98" version="1.0" shape-rendering="geometricPrecision"><defs><filter id="shadowBlur" x="0" y="0" width="200%" height="200%"><feOffset in="SourceGraphic" dx="3.0003002" dy="3.0003002" result="offOut"></feOffset><feGaussianBlur in="offOut" stdDeviation="3"></feGaussianBlur></filter></defs><g stroke-width="1" stroke-linecap="square" stroke-linejoin="round"><rect x="0" y="0" width="150" height="98" style="fill: #ffffff"></rect><path stroke="#969696" fill="#969696" filter="url(#shadowBlur)" d="M25.0 35.0 L125.0 35.0 L125.0 63.0 L25.0 63.0 z"></path><path stroke="#000000" stroke-width="1.0" stroke-linecap="round" stroke-linejoin="round" fill="white" d="M25.0 35.0 L125.0 35.0 L125.0 63.0 L25.0 63.0 z"></path><text x="55" y="54" font-family="sans-serif" font-size="15" stroke="none" fill="#000000"><![CDATA[Hello]]></text></g></svg>
</div>
</div>
$ cat doc.adoc
[ditaa, hello, svg, align=center, opts=inline]
----
+---------+
| Hello |
+---------+
----
The text is indeed in a <![CDATA[Hello]]>
but the text is shown on Chrome, Firefox and Safari.
In your case the CDATA
is transformed into a comment: <!--[CDATA[Hello]]-->
. My guess is that you have some JavaScript running on this page that must convert <![CDATA[Hello]]>
to <!--[CDATA[Hello]]-->
. Maybe it's a security setting?
Ho! you're probably right, sorry about that!
No worries, let me know if there's something to be done on my side.
First, thank you for kroki!
I'm adding a ditaa diagram to a document rendered via asciidoctor.js, but the text is not properly rendered when using the inline SVG option.
produces the following SVG (note that the text is in a CDATA comment):
Rendered image
If I remove
opts=inline
then the image is working perfectly:rendering:
I'm using
"asciidoctor-kroki": "0.16.0"
and"asciidoctor": "2.2.6"
Am I missing something?