-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Description
Describe the bug
Whenever converting HTML with headings <h1> to <h6> with content starting with a number a bug occurs converting the heading incorrectly, below are some test cases:
<h2>1 Evokace (10 minut)</h2> <!-- bug 1.1 Evokace (10 minut) -->
<h2>1. Evokace (10 minut)</h2> <!-- bug 1.1 Evokace (10 minut) -->
<h2>1-Evokace (10 minut)</h2> <!-- bug: 1.1 Evokace (10 minut) -->
<h6>22 Evokace (10 minut)</h6> <!-- bug: 1.1.1.1.1.1 Evokace (10 minut) -->
<h2>Evokace 1 (10 minut)</h2> <!-- ok -->I've used LibreOffice to open the exported document, an example of the <h6> case:

Expected behavior
The heading is transformed correctly. This is specific to headings and does not occur with other tags (I've tested <p> and <pre>). I believe the issue lies here:
| if (runElement != null && IsNumbering(runElement)) |
IsNumbering aggressively.
Repro
See the table above.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels