-
Notifications
You must be signed in to change notification settings - Fork 54
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
Trim HTML content #68
Conversation
It's indeed extremely interesting and to be put under feature flag as you mentioned it :) |
Hi ! Any news about this @Chocobozzz ? |
Sorry for the late. I'll try to implement it this month :) |
Done, I put the option behind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed :) a few nit picks about the code style.
Also, could you please document this as an extra option in the README ? Or no one would think about it :)
After that i'll make you a contributor to get those future PRs faster !
Codecov Report
@@ Coverage Diff @@
## master #68 +/- ##
==========================================
+ Coverage 98.9% 98.92% +0.01%
==========================================
Files 5 5
Lines 366 371 +5
Branches 63 64 +1
==========================================
+ Hits 362 367 +5
Misses 4 4
Continue to review full report at Codecov.
|
I tried to add a small section, don't hesitate to tell me if you want something different |
Integrated and published under version 2.9.0 ! |
Thanks for your contribution ! |
Hi,
This is a proposal. Before fixing tests and adding this feature under a flag (because it could break some existing setups) I wanted to know if you were interested.
In HTML we can add extra spaces and line breaks (when we have long lines for example) with no effects. But easygettext extracts these extra spaces/line breaks which can confuse translators.
Example in Weblate:
This PR removes them using the https://medium.com/@patrickbrosset/when-does-white-space-matter-in-html-b90e8a7cdd33 algorithm
So:
becomes
And the image above becomes in weblate: