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

Add support for ANSI styled text #77

Merged
merged 16 commits into from
May 26, 2024
Merged

Add support for ANSI styled text #77

merged 16 commits into from
May 26, 2024

Conversation

DavidGregory084
Copy link
Member

@DavidGregory084 DavidGregory084 commented May 19, 2024

Fixes #76

TODO:

  • Decide whether to add rendering options to omit ANSI codes
  • Decide whether to attempt some kind of ANSI feature detection Nope too complicated
  • Add Doc tests for more complex usage of DisplayStyles
  • Add tests for Attrs
  • Add Javadocs to new code
  • Implement Object methods properly for new Doc subtypes
  • Find a more efficient way to deal with the Attrs stack (see e.g. Haoyi's post about micro-optimizing fansi)

@DavidGregory084 DavidGregory084 marked this pull request as draft May 19, 2024 19:29
@codecov-commenter
Copy link

codecov-commenter commented May 19, 2024

Codecov Report

Attention: Patch coverage is 96.90722% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 97.78%. Comparing base (fb37e2e) to head (03e0083).

Files Patch % Lines
...va/com/opencastsoftware/prettier4j/ansi/Attrs.java 92.59% 1 Missing and 5 partials ⚠️
...main/java/com/opencastsoftware/prettier4j/Doc.java 94.18% 4 Missing and 1 partial ⚠️
...a/com/opencastsoftware/prettier4j/ansi/Styles.java 98.80% 0 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #77      +/-   ##
============================================
- Coverage     98.15%   97.78%   -0.38%     
- Complexity       51      211     +160     
============================================
  Files             1       10       +9     
  Lines           271      632     +361     
  Branches         63      109      +46     
============================================
+ Hits            266      618     +352     
- Misses            1        6       +5     
- Partials          4        8       +4     

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

@DavidGregory084 DavidGregory084 force-pushed the ansi-styled-text branch 2 times, most recently from eda347f to 8fe62b4 Compare May 22, 2024 21:10
@DavidGregory084 DavidGregory084 marked this pull request as ready for review May 23, 2024 23:35
@DavidGregory084 DavidGregory084 changed the title WIP: Add support for ANSI styled text Add support for ANSI styled text May 23, 2024
@DavidGregory084 DavidGregory084 merged commit 5b8936b into main May 26, 2024
2 checks passed
@DavidGregory084 DavidGregory084 deleted the ansi-styled-text branch May 31, 2024 23:11
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.

Add ANSI styling
2 participants