mosra / m.css

A no-nonsense, no-JavaScript CSS framework, site and documentation theme for content-oriented websites
https://mcss.mosra.cz
Other
406 stars 92 forks source link

[doxygen] assertion on itemized list content #159

Closed liamstask closed 2 years ago

liamstask commented 4 years ago

doxygen 1.8.18, m.css at e6eff549fb5edeabacf01369d6b845a2a59c2ebe

while parsing the output from a markdown doc, i see the following traceback (minor local modification to print the contents of the invalid tag in the assertion, to make the source of the error easier to search for):

Traceback (most recent call last):
  File "/opt/mosra/mcss/documentation/doxygen.py", line 3858, 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 "/opt/mosra/mcss/documentation/doxygen.py", line 3717, in run
    parsed = parse_xml(state, file)
  File "/opt/mosra/mcss/documentation/doxygen.py", line 2507, 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 "/opt/mosra/mcss/documentation/doxygen.py", line 1746, in parse_toplevel_desc
    parsed = parse_desc_internal(state, element)
  File "/opt/mosra/mcss/documentation/doxygen.py", line 694, in parse_desc_internal
    add_css_class=add_css_class)
  File "/opt/mosra/mcss/documentation/doxygen.py", line 1314, in parse_desc_internal
    content = parse_inline_desc(state, i).strip()
  File "/opt/mosra/mcss/documentation/doxygen.py", line 1778, in parse_inline_desc
    parsed = parse_desc_internal(state, element, trim=False)
  File "/opt/mosra/mcss/documentation/doxygen.py", line 736, in parse_desc_internal
    assert element.tag in ['para', '{http://mcss.mosra.cz/doxygen/}div'], f"invalid tag '{element.tag}' in itemizedlist or orderedlist"
AssertionError: invalid tag 'computeroutput' in itemizedlist or orderedlist

The offending xml is:

<listitem><para><computeroutput>Section 1</computeroutput>: description of section 1.</para></listitem>

which corresponds to the following markdown:

- `Section 1`: description of section 1.

Apologies for the somewhat piecemeal report - cannot share the original sources, but please let me know if there's more info I can share to help troubleshoot.

mosra commented 3 years ago

Hello again, sorry for replying half a year late.

The assert is "upside down" -- it's complaining that <itemizedlist> should be inside <para> but for some reason it appeared inside <computeroutput>. I tried to reproduce with 1.8.18 and some extra crazy combinations of lists and code blocks, but no luck. In case this is still relevant, could you show a bit more of the markdown file (or craft a small repro case)? Especially interested in what's happening before and after the list.

mosra commented 2 years ago

Closing as impossible to reproduce.