[gtk-doc] mkhtml2: skip sections without 'id' atts for refentry nav
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkhtml2: skip sections without 'id' atts for refentry nav
- Date: Fri, 30 Mar 2018 19:12:30 +0000 (UTC)
commit 0530af38534d990e3b8a433fe6c7acc007d74be7
Author: Stefan Sauer <ensonic users sf net>
Date: Fri Mar 30 21:10:28 2018 +0200
mkhtml2: skip sections without 'id' atts for refentry nav
It only makes sense to link to them if they have an id.
gtkdoc/mkhtml2.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtkdoc/mkhtml2.py b/gtkdoc/mkhtml2.py
index a6d4b43..7653d9b 100644
--- a/gtkdoc/mkhtml2.py
+++ b/gtkdoc/mkhtml2.py
@@ -876,6 +876,9 @@ def generate_refentry_nav(ctx, refsect1s, result):
# don't list TOC sections (role="xxx_proto")
if s.attrib.get('role', '').endswith("_proto"):
continue
+ # skip section without 'id' attrs
+ if 'id' not in s.attrib:
+ continue
title = xml_get_title(s)
result.append("""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]