projects
/
treecutter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf7493a
)
docbook: adding asciidoc support - subtitle
author
Fredrik Unger
<fredrik.unger@openchip.com>
Mon, 2 Mar 2026 10:53:49 +0000
(11:53 +0100)
committer
Fredrik Unger
<fredrik.unger@openchip.com>
Mon, 2 Mar 2026 10:53:49 +0000
(11:53 +0100)
it is not possible to easilly express titelabbrev in asciidoc
adding subtitle if titleabbrev is not availible
treecutter/docbook.py
patch
|
blob
|
history
diff --git
a/treecutter/docbook.py
b/treecutter/docbook.py
index 1a65873f4a5080732704e7ea3828298ee1dcec33..912d0e2c7b6ac38fe114bd0c061d2a8aac1ef4ec 100644
(file)
--- 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):