From 974b8b5068b688258dbe1ffcc37d0ce0f3f4b4c7 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Wed, 18 Feb 2026 11:12:44 +0700 Subject: 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. --- inline_parser.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'inline_parser.go') 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 // SPDX-License-Identifier: GPL-3.0-or-later +// SPDX-FileCopyrightText: 2020 M. Shulhan 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 -- cgit v1.3