-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fixed broken code highlight on Safari of iOS 15.7.8 #2972
base: main
Are you sure you want to change the base?
Conversation
So it's a bug in webkit engine of iOS 15.7.8, I tried Chrome on iOS, same issue as the screenshot above, the trailing "*/" is rendered as "//" and the whole code snippet is rendered as comment. Although it's not fault of scala docs, I suggest merging this patch, iOS 17.2.1 can't be installed on my poor old iPhone 7P: https://support.apple.com/guide/iphone/models-compatible-with-ios-17-iphe3fa5df43/ios |
On iOS, the "type `A` */" is rendered as "type `A` //", it's probably a bug in webkit engine of iOS 15.7.8, newer iOS doesn't have this issue, see scala#2972 (comment) I'm not able to find the root cause, thus change to inline comment to bypass the issue for my old iPhone 7 Plus.
f9ff3ee
to
00fab29
Compare
Any more comment? |
there are 175 of occurrences of |
I read tour of scala and scala 3 book in English, found that only strange code highlight, I wasn’t able to find the root cause, I guess it’s an incompatibility of Safari on iOS 15.7.8 with highligh.js on that special code snippet. BTW, when I copy the wrongly rendered text, it’s really converted into “//“ that means wrong Scala syntax. Very weird issue, this PR is just a workaround. |
On iOS, the "type
A
*/" is rendered as "typeA
//", seems highlight.js is incompatible with iOS Safari, wrongly replaces "*/" with "//".I'm not able to find the root cause, thus change to inline comment to bypass the issue.