Skip to content

Error when parsing markdown headers with code element #270

Description

@rlalik

When parsing md file with header starting with code element, like (github parses the code markers automatically)
#### coverage
then it fails with error quoted below. There is no problem if there is some extra text in the beginning:
#### Target coverage

Apparently, i.text element in doxygen.py#711 is None in that case. In the generated documentation, when using "Traget coverage" form, I see only "Target" as a hedaer title. Not sure whether this is Doxygen issue or m.css issue.

Image
  File "/home/rafal/cbm/software/src/sts/geri-smx-decoder/build/release/mcss/documentation/doxygen.py", line 4317, in <module>
    run(state, templates=os.path.abspath(args.templates), wildcard=args.wildcard, index_pages=args.index_pages, search_merge_subtrees=not args.search_no_subtree_merging, search_add_lookahead_barriers=not args.search_no_lookahead_barriers, search_merge_prefixes=not args.search_no_prefix_merging)
    ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rafal/cbm/software/src/sts/geri-smx-decoder/build/release/mcss/documentation/doxygen.py", line 4168, in run
    parsed = parse_xml(state, file)
  File "/home/rafal/cbm/software/src/sts/geri-smx-decoder/build/release/mcss/documentation/doxygen.py", line 2839, in parse_xml
    compound.description, templates, compound.sections, footer_navigation, example_navigation, search_keywords, compound.deprecated, compound.since = parse_toplevel_desc(state, compounddef.find('detaileddescription'))
                                                                                                                                                      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rafal/cbm/software/src/sts/geri-smx-decoder/build/release/mcss/documentation/doxygen.py", line 1917, in parse_toplevel_desc
    parsed = parse_desc_internal(state, element)
  File "/home/rafal/cbm/software/src/sts/geri-smx-decoder/build/release/mcss/documentation/doxygen.py", line 649, in parse_desc_internal
    parsed = parse_desc_internal(state, i)
  File "/home/rafal/cbm/software/src/sts/geri-smx-decoder/build/release/mcss/documentation/doxygen.py", line 649, in parse_desc_internal
    parsed = parse_desc_internal(state, i)
  File "/home/rafal/cbm/software/src/sts/geri-smx-decoder/build/release/mcss/documentation/doxygen.py", line 649, in parse_desc_internal
    parsed = parse_desc_internal(state, i)
  File "/home/rafal/cbm/software/src/sts/geri-smx-decoder/build/release/mcss/documentation/doxygen.py", line 711, in parse_desc_internal
    title = html.escape(i.text)
  File "/usr/lib/python3.14/html/__init__.py", line 19, in escape
    s = s.replace("&", "&amp;") # Must be done first!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions