Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Inline <br> causes crash rather than just ignoring #301

@Halfwalker

Description

@Halfwalker

I understand that inline markup and table cell wrapping is not supported. But upon encountering a <br> perhaps it should ignore or treat as whitespace rather than crashing ?

The table is as follows (minus some previous rows)

| Port PoE | Connection | Jack number | Location | Power |
| --- | --- | --- | --- | --- |
| 8+ | PoE Splitter<br>G5 Left Rear<br>G5 Front Lawn | Direct | Outside left rear | 3W PoE<br>4W PoE<br>4W PoE |

This results in the crash output

"name" = "mdcat"
"operating_system" = "Ubuntu 22.4.0 (jammy) [64-bit]"
"crate_version" = "2.6.1"
"explanation" = """
Panic occurred in file '/home/runner/work/mdcat/mdcat/pulldown-cmark-mdcat/src/render.rs' at line 946
"""
"cause" = 'Event InlineHtml(Borrowed("<br>")) impossible in state Stacked(StateStack { top_level: TopLevelAttrs { margin_before: Margin }, states: [] }, TableBlock)'
"method" = "Panic"
"backtrace" = """

   0: 0x6095d2b69fb5 - <unresolved>
   1: 0x6095d2b58114 - <unresolved>
   2: 0x6095d2b5f0ed - <unresolved>
   3: 0x6095d2a94d3c - <unresolved>
   4: 0x6095d2a95b5d - <unresolved>
   5: 0x6095d2a99903 - <unresolved>
   6: 0x6095d2a97409 - <unresolved>
   7: 0x6095d320b150 - <unresolved>
   8: 0x6095d2a95dc5 - <unresolved>
   9: 0x7f3f8f251d90 - __libc_start_call_main
                at ./csu/../sysdeps/nptl/libc_start_call_main.h:58
  10: 0x7f3f8f251e40 - __libc_start_main_impl
                at ./csu/../csu/libc-start.c:392
  11: 0x6095d2a89245 - <unresolved>
  12:        0x0 - <unresolved>"""

PS. If any markup/inline was to be supported, <br> would get my vote ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions