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

fix(rust) emoji supported in single quote strings #4156

Merged
merged 4 commits into from
Dec 14, 2024

Conversation

joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Oct 31, 2024

Changes

Resolves #3933. Uses begin/end to wrap strings instead of a regex that tries to match the whole string - which we do not recommend - and this is why. Now emoji work "for free" because they are just more text inside an existing string.

Checklist

  • Added markup tests, or they don't apply here because...
  • Updated the changelog at CHANGES.md

Copy link

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

5 files changed

Total change +51 B

View Changes
file base pr diff
es/core.min.js 8.18 KB 8.18 KB +1 B
es/highlight.min.js 8.18 KB 8.18 KB +1 B
es/languages/rust.min.js 1.49 KB 1.51 KB +21 B
highlight.min.js 8.22 KB 8.22 KB +1 B
languages/rust.min.js 1.49 KB 1.52 KB +27 B

Copy link

github-actions bot commented Nov 5, 2024

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

3 files changed

Total change +49 B

View Changes
file base pr diff
es/languages/rust.min.js 1.49 KB 1.51 KB +21 B
highlight.min.js 8.22 KB 8.22 KB +1 B
languages/rust.min.js 1.49 KB 1.52 KB +27 B

Copy link

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

5 files changed

Total change +45 B

View Changes
file base pr diff
es/core.min.js 8.19 KB 8.19 KB -1 B
es/highlight.min.js 8.19 KB 8.19 KB -1 B
es/languages/rust.min.js 1.49 KB 1.51 KB +21 B
highlight.min.js 8.23 KB 8.23 KB -1 B
languages/rust.min.js 1.49 KB 1.52 KB +27 B

@joshgoebel joshgoebel force-pushed the issue-3933-fix-emoji-in-single-quoted-strings-rust branch from 3c99ed7 to e8a26b4 Compare December 14, 2024 15:16
@joshgoebel joshgoebel merged commit a667cde into main Dec 14, 2024
20 checks passed
Copy link

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

3 files changed

Total change +49 B

View Changes
file base pr diff
es/languages/rust.min.js 1.49 KB 1.51 KB +21 B
highlight.min.js 8.23 KB 8.23 KB +1 B
languages/rust.min.js 1.49 KB 1.52 KB +27 B

@steffahn
Copy link

steffahn commented Dec 20, 2024

I’m not quite familiar with grammar format here, but it turns out this change seems to be very breaking for a lot of Rust code:

Screenshot_20241220_070444

Screenshot_20241220_070504

code example from Rust by Example

@steffahn
Copy link

11.11.0 is completely unusable like this, I guess this needs a revert and point release?

@joshgoebel
Copy link
Member Author

Thanks for the link to the example test. Let me add that as a test case. I think I see what went wrong here.

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.

(rust) quotes around a char emoji are not colored properly
3 participants