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

Formats in the middle of sentence when faces e.g. #17

Closed
m-spitfire opened this issue Jan 23, 2023 · 3 comments · Fixed by #13
Closed

Formats in the middle of sentence when faces e.g. #17

m-spitfire opened this issue Jan 23, 2023 · 3 comments · Fixed by #13

Comments

@m-spitfire
Copy link

m-spitfire commented Jan 23, 2023

TSIA.

To reproduce (file named hir.md):

For example, the contents of individual items (e.g. modules, functions, traits, impls, etc) in the HIR are not immediately accessible in the parents.

run

readable fmt hir.md

Result:

For example, the contents of individual items (e.g.
modules, functions, traits, impls, etc) in the HIR are not immediately accessible in the parents.

Expected result:
File not to change.

Issue occurs in master commit 8e53ead and v2.2 release.

@bobheadxi
Copy link
Owner

bobheadxi commented Feb 27, 2023

Hey @m-spitfire - thanks for reporting this, it is a similar issue to one I ran into in #7 (comment). I while back I dug into trying to fix it (#13 looks like I never pushed any actual code), and I found the model readable was originally based on is not great - and I think the tool as a whole needs a completely different paradigm internally. I even took a stab at writing a grammar but it didn't work out too well 🙃

I think readable might be overthinking the problem a bit - looking at the implementation in rust-lang/rustc-dev-guide#1485 it is much simpler, and it might provide sufficient line-breaking without doing silly things like readable does

@bobheadxi
Copy link
Owner

Actually, after some years away I was able to fix this easily (at least this particular case): #13

@m-spitfire
Copy link
Author

Thanks again!

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 a pull request may close this issue.

2 participants