aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2020-12-25 16:19:53 +0700
committerShulhan <ms@kilabit.info>2020-12-25 16:19:53 +0700
commite39ff0f9ee29f290fcd5eedb94309db71fa78d25 (patch)
tree1749e282887f050f6b460a3e17a28f94aa5b8ba5
parent707d145f0883d22096a0effbc712176a70b46adf (diff)
downloadasciidoctor-go-e39ff0f9ee29f290fcd5eedb94309db71fa78d25.tar.xz
inline_parser: add zero-width space after ellipsis character
This is to make it compatible with generated HTML from asciidoctor.
-rw-r--r--inline_parser.go1
-rw-r--r--testdata/got.test.html2
2 files changed, 2 insertions, 1 deletions
diff --git a/inline_parser.go b/inline_parser.go
index 10b11d1..cf1b392 100644
--- a/inline_parser.go
+++ b/inline_parser.go
@@ -331,6 +331,7 @@ func (pi *inlineParser) do() {
}
if pi.nextc == '.' && pi.nextcc == '.' {
pi.current.WriteString(htmlSymbolEllipsis)
+ pi.current.WriteString(htmlSymbolZeroWidthSpace)
pi.x += 3
pi.prev = pi.c
continue
diff --git a/testdata/got.test.html b/testdata/got.test.html
index 9020107..5e99975 100644
--- a/testdata/got.test.html
+++ b/testdata/got.test.html
@@ -1674,7 +1674,7 @@ D</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">C1</p></td>
</tr>
<tr>
-<td class="tableblock halign-left valign-top" colspan="3"><p class="tableblock">A2&#8230;C2</p></td>
+<td class="tableblock halign-left valign-top" colspan="3"><p class="tableblock">A2&#8230;&#8203;C2</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">A3</p></td>