Consider adding check for explicit 'outline' assignment in WordML source
Where WordML actually designates outline levels for paragraph styles (or even at the paragraph level?), this might be a place to look for header promotion as well ... just coincidentally. These values turn up as /w:styles/w:style/w:pPr/w:outlineLvl/@w:val
in the styles.xml
document.
Just a thought. Exposing these could tell us what a Word document things its headers are for free ... a key would be, how to carry the outline level in HTML Typescript or better as a pseudo- or extended-CSS property ... -xsweet-outline-level: [0-9]
might do nicely.
What we don't know is whether or where these values are reliable indicators of headers or (by implication) structure. They would certainly seem to be at least in some use cases (documents). More commonly, they might be noisy and interfere with better induction logic based on formatting. (It depends on the document.) In any case these values can certainly be exposed where we find them.
Experimentation is perhaps warranted.