diff options
| author | Shulhan <ms@kilabit.info> | 2026-02-18 11:12:44 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-02-18 11:12:44 +0700 |
| commit | 974b8b5068b688258dbe1ffcc37d0ce0f3f4b4c7 (patch) | |
| tree | 1973262929e18e8cd0bb1d6e7ee5bae4356ae8d6 /inline_parser.go | |
| parent | 4956de038af8b52db6d03f0b6f5b77e6b7cfa721 (diff) | |
| download | asciidoctor-go-974b8b5068b688258dbe1ffcc37d0ce0f3f4b4c7.tar.xz | |
all: fix parsing inline format with escaped character
If the text inside the inline format contains escaped character, the
parsing failed to find the closed character which cause the format is
not rendered as expected.
Diffstat (limited to 'inline_parser.go')
| -rw-r--r-- | inline_parser.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/inline_parser.go b/inline_parser.go index 84fae21..9a33b56 100644 --- a/inline_parser.go +++ b/inline_parser.go @@ -1,5 +1,5 @@ -// SPDX-FileCopyrightText: 2020 M. Shulhan <ms@kilabit.info> // SPDX-License-Identifier: GPL-3.0-or-later +// SPDX-FileCopyrightText: 2020 M. Shulhan <ms@kilabit.info> package asciidoctor @@ -1074,6 +1074,9 @@ func indexByteUnescape(in []byte, c byte) (out []byte, idx int) { } return out, x } + if isEsc { + isEsc = false + } out = append(out, in[x]) } return nil, -1 |
