From 0530af38534d990e3b8a433fe6c7acc007d74be7 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Fri, 30 Mar 2018 21:10:28 +0200 Subject: [PATCH] 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 file changed, 3 insertions(+) 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(""" -- 2.11.4.GIT