-
-
Notifications
You must be signed in to change notification settings - Fork 59
Fix text not serializing correctly when having utf8 boundaries #170
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
Conversation
Hi there, Any chance to merge it? |
I'm just waiting on the maintainers to review and merge this. |
I missed/forgot about this. Will get to it soon! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue where text was not serialized correctly when encountering UTF-8 boundaries. It adds a new test to verify proper handling of UTF-8 characters and updates state management to correctly handle multi-byte character slicing.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
mdast_util_to_markdown/tests/roundtrip.rs | Added a new test ensuring correct serialization of UTF-8 text. |
mdast_util_to_markdown/src/state.rs | Updated character slicing to correctly extract the last UTF-8 character. |
"should support utf8 in boundries when serializing" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: please change 'boundries' to 'boundaries' for clarity.
"should support utf8 in boundries when serializing" | |
); | |
"should support utf8 in boundaries when serializing" |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
I just found another case which is not resolved with suggested fix: let doc = "я_𝄞";
assert_eq!(to(&from(doc, &Default::default()).unwrap()).unwrap(), doc);
|
Found them, thanks! :) |
Fixes #169