typstyle icon indicating copy to clipboard operation
typstyle copied to clipboard

feat: better handling for content block

Open Enter-tainer opened this issue 1 year ago • 4 comments

Enter-tainer avatar Mar 24 '24 05:03 Enter-tainer

Codecov Report

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

Project coverage is 85.39%. Comparing base (0d96c96) to head (0f79437).

:exclamation: Current head 0f79437 differs from pull request most recent head 85caeb0. Consider uploading reports for the commit 85caeb0 to get more accurate results

Files Patch % Lines
src/pretty/markup.rs 87.87% 8 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #23      +/-   ##
==========================================
- Coverage   85.56%   85.39%   -0.18%     
==========================================
  Files           6        7       +1     
  Lines         977      993      +16     
==========================================
+ Hits          836      848      +12     
- Misses        141      145       +4     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 24 '24 05:03 codecov[bot]

idea: when processing content blocks, split contents to prefix/postfix spaces and lines. If a content block has prefix & postfix spaces, we can decide whether to use

[ a ] or [
  a
]

. Otherwise we should keep it untouched

Enter-tainer avatar Mar 24 '24 13:03 Enter-tainer

Will this patch turn

[
word]

into

[
  word
]

WannesMalfait avatar Mar 29 '24 11:03 WannesMalfait

Will this patch turn

[
word]

into

[
  word
]

maybe. but this is wrong. because this adds an extra space at the end of word. ideally we should distinguish between "inline block" and "multiline block"

Enter-tainer avatar Mar 29 '24 11:03 Enter-tainer