From 497c76db2dead8d0f5729db009268a1e49b43020 Mon Sep 17 00:00:00 2001 From: Fredrik Unger Date: Mon, 2 Mar 2026 11:53:49 +0100 Subject: [PATCH] docbook: adding asciidoc support - subtitle it is not possible to easilly express titelabbrev in asciidoc adding subtitle if titleabbrev is not availible --- treecutter/docbook.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/treecutter/docbook.py b/treecutter/docbook.py index 1a65873..912d0e2 100644 --- a/treecutter/docbook.py +++ b/treecutter/docbook.py @@ -27,7 +27,11 @@ class Docbook(): t = t[0].text ta = self._doc.xpath(u'/db:article/db:info/db:titleabbrev',namespaces=const.XPATH) if ta: - ta = unicode(ta[0].text) + ta = ta[0].text + else: + ta = self._doc.xpath(u'/db:article/db:info/db:subtitle',namespaces=const.XPATH) + if ta: + ta = ta[0].text return (t, ta) def status(self): -- 2.30.2