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

feat: better handling for content block #23

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Enter-tainer
Copy link
Owner

No description provided.

@Enter-tainer Enter-tainer force-pushed the attempt-better-content-block branch 2 times, most recently from 332caa9 to eec5479 Compare March 24, 2024 05:32
@Enter-tainer Enter-tainer marked this pull request as ready for review March 24, 2024 05:32
Copy link

codecov bot commented Mar 24, 2024

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).

❗ 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 ⚠️
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     

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

@Enter-tainer Enter-tainer force-pushed the attempt-better-content-block branch 2 times, most recently from c1f0faf to 2a7d9d4 Compare March 24, 2024 06:06
@Enter-tainer
Copy link
Owner Author

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 Enter-tainer marked this pull request as draft March 24, 2024 13:13
@WannesMalfait
Copy link

Will this patch turn

[
word]

into

[
  word
]

@Enter-tainer
Copy link
Owner Author

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"

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