Skip to content

Conversation

kmvanbrunt
Copy link
Member

Fixed a few issues related to converting strings to Text before rendering.
Previously we converted all non-Rich objects to a Text object. Now we only convert strings which contain ANSI styles.

Rich only looks for markup, emojis, and highlighting in strings. Therefore we were losing this capability since they had been converted to Text objects. Additionally, we lost pretty printing on objects like dictionaries because they also had been converted to Text by our code.

Finally, I fixed an issue with incorrect display widths of styled_strings in CompletionItems descriptions.

Copy link

codecov bot commented Aug 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.77%. Comparing base (c1af802) to head (93898d5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1489   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files          23       23           
  Lines        4911     4917    +6     
=======================================
+ Hits         4851     4857    +6     
  Misses         60       60           
Flag Coverage Δ
unittests 98.77% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

tleonhardt
tleonhardt previously approved these changes Aug 26, 2025
@kmvanbrunt kmvanbrunt merged commit e9938c2 into main Aug 26, 2025
30 checks passed
@kmvanbrunt kmvanbrunt deleted the styled_string_conversion branch August 26, 2025 02:01
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.

2 participants