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

fix: nonbreaking space in control #141

Merged
merged 4 commits into from
Nov 28, 2022
Merged

fix: nonbreaking space in control #141

merged 4 commits into from
Nov 28, 2022

Conversation

erdos
Copy link
Owner

@erdos erdos commented Nov 27, 2022

As mentioned in #139 (comment)

The most nasty issue we've got probably. We've had a long DOCX template which included {% end %} tag that contained a Non-breaking space between d and % which failed the rendering. It was only returning stencil.exceptions.ParsingException: Unexpected command I believe.

Apparently, java.lang.Character/isWhitespace is false for non-breaking whitepsace and therefore java.lang.String/trim also does not work on it. It produces cryptic error messages so lets fix it properly.

@codecov
Copy link

codecov bot commented Nov 27, 2022

Codecov Report

Merging #141 (dad60d2) into master (858b1e2) will decrease coverage by 0.16%.
The diff coverage is 73.33%.

@@            Coverage Diff             @@
##           master     #141      +/-   ##
==========================================
- Coverage   92.08%   91.91%   -0.17%     
==========================================
  Files          26       26              
  Lines        1894     1905      +11     
  Branches      106      109       +3     
==========================================
+ Hits         1744     1751       +7     
- Misses         44       45       +1     
- Partials      106      109       +3     
Impacted Files Coverage Δ
src/stencil/infix.clj 87.29% <0.00%> (-0.56%) ⬇️
src/stencil/util.clj 95.40% <72.72%> (-3.29%) ⬇️
src/stencil/postprocess/list_ref.clj 92.34% <100.00%> (ø)
src/stencil/tokenizer.clj 96.82% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@erdos erdos merged commit a7dc048 into master Nov 28, 2022
@erdos erdos deleted the fix-nonbreakingspace branch November 28, 2022 07:33
@erdos erdos added the bug Something isn't working label Nov 28, 2022
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.

1 participant