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

HTML codec: Support indentation decoding #347

Merged
merged 1 commit into from
May 11, 2024

Conversation

amantoux
Copy link
Member

@amantoux amantoux commented May 9, 2024

Only one level supported

Closes #295

@amantoux amantoux requested a review from Amir-P May 9, 2024 16:54
Copy link

codecov bot commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.88%. Comparing base (eb7b3ca) to head (e8e1dfa).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #347      +/-   ##
==========================================
+ Coverage   87.86%   87.88%   +0.01%     
==========================================
  Files          64       64              
  Lines       10336    10347      +11     
==========================================
+ Hits         9082     9093      +11     
  Misses       1254     1254              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Amir-P Amir-P left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM for now. Just wondering how we can adapt it for RTL cases?

@amantoux
Copy link
Member Author

wondering how we can adapt it for RTL cases?

You mean, if we can detect that text direction is rtl and use padding-right instead of left?

@amantoux amantoux merged commit 67db8d1 into master May 11, 2024
4 checks passed
@amantoux amantoux deleted the fix/ignore_indentation_when_decoding_html branch May 11, 2024 07:28
@Amir-P
Copy link
Member

Amir-P commented May 11, 2024

wondering how we can adapt it for RTL cases?

You mean, if we can detect that text direction is rtl and use padding-right instead of left?

Honestly, I have no idea right now. That might not be enough since the language of text doesn't determine the directionality of elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ParchmentHtmlCodec().decode can't convert indent
2 participants