transpect / docx2hub

Converts Microsoft docx to flat hub XML
BSD 2-Clause "Simplified" License
27 stars 15 forks source link

keep inline styles in index terms #26

Closed mkraetke closed 2 years ago

mkraetke commented 2 years ago

Inline styles in index terms are not kept. After the mode docx2hub:remove-redundant-run-atts, the inline styles still exist:

<w:r>
  <w:fldChar xml:id="fldChar_d3804e2370" w:fldCharType="begin"/>
</w:r>
<w:r>
  <w:instrText xml:space="preserve"> XE "α</w:instrText>
</w:r>
<w:r role="ZFTiefgestellt">
  <w:instrText>1</w:instrText>
</w:r>
<w:r>
  <w:instrText xml:space="preserve">-Adrenozeptor-Antagonist" </w:instrText>
</w:r>
<w:r>
  <w:fldChar xml:id="fldChar_d3804e2381" w:fldCharType="end"/>
</w:r>

However, after the mode docx2hub:join-instrText-runs just the string value of the node is present:

<w:r role="ZFTiefgestellt">
  <w:instrText docx2hub:fldChar-start-id="fldChar_d3804e2370" docx2hub:field-function-name="XE" docx2hub:field-function-args="&#34;α1-Adrenozeptor-Antagonist&#34;"><quot>"</quot>α1-Adrenozeptor-Antagonist<quot>"</quot>
</w:instrText>
</w:r>
mkraetke commented 2 years ago

I've attached two samples to reproduce this issue:

gimsieke commented 2 years ago

“Only I can fix it.” — Donald J. Trump

mkraetke commented 2 years ago

And you will have Mexico pay for that fix.

gimsieke commented 2 years ago

[narrator] His fix did more harm than good so far

gimsieke commented 2 years ago

I fixed it. I’m a very stable genius.