onizet / html2openxml

Html2OpenXml is a small .Net library that convert simple or advanced HTML to plain OpenXml components. This program has started in 2009, initially to convert user's comments from SharePoint to Word.
MIT License
297 stars 106 forks source link

Regex matching Heading numbering incorrect #120

Closed timedelaar closed 1 year ago

timedelaar commented 1 year ago

Hi,

The regex that checks whether a heading should be converted to a numbered item seems incorrect. (?m)^(\d+.)*\s will match a number and any character. The regex will match 1a1a1a1a1a1a and will try to convert it to a numbered item. I will create a pull request with the fixed regex.