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

Avoid trimming elements with the text content #2

Open
r-glazkov opened this issue Sep 16, 2023 · 0 comments
Open

Avoid trimming elements with the text content #2

r-glazkov opened this issue Sep 16, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@r-glazkov
Copy link
Owner

Trailing whitespaces in FB2 style elements should not be trimmed. It's fine to trim when parsing other non-span elements through. Looks like the proper fix should land in tafia/quick-xml#285.

While the quick-xml trims strings, we may try to fix the output, in a best-effort manner, by exploiting some heuristics:

  • consecutive whitespaces are merged in a single one
  • an element pair where the right element has a baseline shift (subscript, superscript) should be joined without a whitespace
@r-glazkov r-glazkov added the bug Something isn't working label Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant