From 3e3dddc4aab5f5b686ba4b40c5c0e17c9c11a7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=98=C3=ADdk=C3=BD?= Date: Mon, 10 Jul 2023 08:06:27 +0200 Subject: [PATCH] Resolves: #2220936 - fix invalid escape sequence --- asciidoc-table-separator.patch | 24 ++++++++++++++++++++++++ asciidoc.spec | 7 ++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 asciidoc-table-separator.patch diff --git a/asciidoc-table-separator.patch b/asciidoc-table-separator.patch new file mode 100644 index 0000000..4e13fe4 --- /dev/null +++ b/asciidoc-table-separator.patch @@ -0,0 +1,24 @@ +From 34d5d9ffa005af9edbe8fde64b8fa6ccb33c8796 Mon Sep 17 00:00:00 2001 +From: Jerry James +Date: Fri, 7 Jul 2023 11:11:49 -0600 +Subject: [PATCH] Table separator may contain escapes + +Signed-off-by: Jerry James +--- + asciidoc/asciidoc.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/asciidoc/asciidoc.py b/asciidoc/asciidoc.py +index 0ccf24de..6d23a9de 100644 +--- a/asciidoc/asciidoc.py ++++ b/asciidoc/asciidoc.py +@@ -2908,7 +2908,7 @@ def validate(self): + self.error('missing section: [tabletags-%s]' % t, halt=True) + if self.separator: + # Evaluate escape characters. +- self.separator = ast.literal_eval('"' + self.separator + '"') ++ self.separator = ast.literal_eval('r"' + self.separator + '"') + # TODO: Move to class Tables + # Check global table parameters. + elif config.pagewidth is None: + diff --git a/asciidoc.spec b/asciidoc.spec index bc6372c..ce898a1 100644 --- a/asciidoc.spec +++ b/asciidoc.spec @@ -1,6 +1,6 @@ Name: asciidoc Version: 10.2.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Text based document generation License: GPL-2.0-only @@ -9,6 +9,8 @@ Source0: https://github.com/asciidoc-py/asciidoc-py/archive/%{version}/%{ BuildArch: noarch +Patch1: asciidoc-table-separator.patch + BuildRequires: python3-devel BuildRequires: python3-pip BuildRequires: python3-setuptools @@ -99,6 +101,9 @@ rm %{buildroot}/share/doc/{BUGS.adoc,CHANGELOG.adoc,INSTALL.adoc,README.md,dbla %dir %{python3_sitelib}/asciidoc/resources/filters/latex %changelog +* Mon Jul 10 2023 Josef Ridky - 10.2.0-5 +- fix invalid escape sequence (#2220936) + * Thu Jun 15 2023 Python Maint - 10.2.0-4 - Rebuilt for Python 3.12