[gtk-doc] mkhtml2: use the titles we already have
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkhtml2: use the titles we already have
- Date: Fri, 27 Apr 2018 07:30:03 +0000 (UTC)
commit 8eed0805d966606112f51adea9cc18cc95a5db42
Author: Stefan Sauer <ensonic users sf net>
Date: Fri Apr 27 09:00:45 2018 +0200
mkhtml2: use the titles we already have
We were looking them up again for most chunks.
gtkdoc/mkhtml2.py | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gtkdoc/mkhtml2.py b/gtkdoc/mkhtml2.py
index ad744b5..802b3a5 100644
--- a/gtkdoc/mkhtml2.py
+++ b/gtkdoc/mkhtml2.py
@@ -1223,13 +1223,12 @@ def convert_chunk_with_toc(ctx, div_class, title_tag):
generate_basic_nav(ctx),
'<div class="%s">' % div_class,
]
- title = node.xml.find('title')
- if title is not None:
+ if node.title:
result.append("""
<div class="titlepage">
<%s class="title"><a name="%s"></a>%s</%s>
</div>""" % (
- title_tag, get_id(node), title.text, title_tag))
+ title_tag, get_id(node), node.title, title_tag))
toc = generate_toc(ctx, node)
if toc:
@@ -1337,12 +1336,11 @@ def convert_preface(ctx):
generate_basic_nav(ctx),
'<div class="preface">'
]
- title = node.xml.find('title')
- if title is not None:
+ if node.title:
result.append("""
<div class="titlepage">
<h2 class="title"><a name="%s"></a>%s</h2>
-</div>""" % (get_id(node), title.text))
+</div>""" % (get_id(node), node.title))
convert_inner(ctx, node.xml, result)
result.extend(generate_footer(ctx))
result.append("""</div>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]