Formatting issues with nested spans and Word styles
This is somewhat related to #131 (closed)
In the attached example, "Acknowledgements" comes through in bold and small caps but it should not - it uses the Word style "BookTitle + Not Bold, Not Small caps". It looks like this is a question of nested spans, the priority in which the formatting is resolved, and how Word style modifiers are extracted into the html.
Here's the html after the join step:
<p style="margin-bottom: 0pt">
<span style="font-variant: normal; font-weight: bold">
<span class="BookTitle">
<span style="font-weight: normal">Acknowledgements</span>
</span>
</span>
<a class="bookmarkStart" id="docx-bookmark_0">
<!-- bookmark ='_GoBack'-->
</a>
<a href="#docx-bookmark_0">
<!-- bookmark end -->
</a>
</p>
Here it is after the the collapse step. At this point, I believe the innermost span's font-weight: normal
should have been passed to the outer class="BookTitle
span, but it is not:
<p style="margin-bottom: 0pt">
<span style="font-variant: normal; font-weight: bold">
<span class="BookTitle">Acknowledgements</span>
</span>
<a class="bookmarkStart" id="docx-bookmark_0">
<!-- bookmark ='_GoBack'-->
</a>
<a href="#docx-bookmark_0">
<!-- bookmark end -->
</a>
</p>
And here is the final rinsed html:
<h2 style="margin-bottom: 0pt">
<span style="font-variant: normal; font-weight: bold">
<span class="BookTitle">Acknowledgements</span>
</span>
<a class="bookmarkStart" id="docx-bookmark_0"><!-- bookmark ='_GoBack'--></a>
<a href="#docx-bookmark_0"><!-- bookmark end --></a>
</h2>
And, the font-variant: normal
needs to be passed down to the innermost span, or else it's clobbered by the BookTitle
styling on the innermost span.