[Docx Reader] Explicit spans disablinig inline styles for docx+styles #6511
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
During discussion in #6501 another interesting issue was brought to my attention. When reading

docx+styles
, pandoc fails to indicate if inline run styles are explicitly disabled, for instance:here, a character style applied to the whole string defines underlined style, but for
der
that is explicitly disabled inline. Currently, pandoc doesn't handle this at all:pandoc -f docx+styles -t markdown /tmp/test.docx
outputswhich is strictly speaking incorrect.
This PR adds explicit annotations for such runs via spans with classes
.no-emph
,.no-strong
, etc, so that the output becomesThis is more of a proposal, so I'm marking this as draft.
With HTML, this works only partially: while italic, bold and smallcaps all work well enough, strikeout and underline do not, because those two are styled via
text-decoration
which can not be overridden on child elements. Ideas welcome.