Skip to content

Commit

Permalink
doxygen xml parser: ignore empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Jul 11, 2024
1 parent efd0755 commit cad8e79
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions doc/python/doxygen_xml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
# ruff: noqa: E501

from __future__ import print_function
from lxml import etree

import sys
from os import path

from lxml import etree

from xml_docstring import XmlDocString
import sys

template_file_header = """#ifndef DOXYGEN_AUTODOC_{header_guard}
#define DOXYGEN_AUTODOC_{header_guard}
Expand Down Expand Up @@ -163,7 +166,11 @@ def xmlToType(self, node, array=None, parentClass=None, tplargs=None):
refid = c.attrib["refid"]
if parentClass is not None and refid == parentClass.id:
t += " " + parentClass.name
if c.tail is not None and c.tail.lstrip()[0] != "<":
if (
c.tail is not None
and c.tail.strip()
and c.tail.lstrip()[0] != "<"
):
if tplargs is not None:
t += tplargs
elif (
Expand Down

0 comments on commit cad8e79

Please sign in to comment.