Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: some whitespaces disappear around substitution expressions #4

Merged
merged 10 commits into from
Oct 20, 2018

Conversation

erdos
Copy link
Owner

@erdos erdos commented Oct 20, 2018

In some cases whitespace characters disappear around substitutions in Microsoft Office Word.

For example consider the following dummy xml content:

<a>Amount: {%=x</a><a>%} pieces</a>

After substitution it gives:

<a>Amount: 23</a><a> pieces</a>

The second <a> starts with a whitespace character, however, Word does not display that.

This bugfix works the following way:

  • In a postprocess steps it looks for t elements with text content starting or ending with a whitespace character and adds an xml:whitespace=preserve attribute to them.

@erdos erdos merged commit 7229c98 into master Oct 20, 2018
@erdos erdos deleted the bug/whitespaces branch October 20, 2018 13:51
@erdos erdos added the bug Something isn't working label Oct 21, 2018
@erdos erdos added the syntax template language syntax label Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working syntax template language syntax
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant