Closed SimplyDanny closed 10 months ago
Looks like with this file you are encountering a combination of https://github.com/jtbandes/swift-tmlanguage/issues/13 & https://github.com/jtbandes/swift-tmlanguage/issues/7
Looks like with this file you are encountering a combination of https://github.com/jtbandes/swift-tmlanguage/issues/13 & https://github.com/jtbandes/swift-tmlanguage/issues/7
Yes, it seems like. This is especially a serious problem for SwiftLint where almost all files contain string blocks in one or the other way.
I'll try to resolve these soon but unfortunately I don't have a way of testing GitHub's highlighting aside from waiting for the next release (https://github.com/github-linguist/linguist/pull/6603#issuecomment-1854708886).
Closing as syntax highlighting issues should be opened on the upstream repos as per the troubleshooting doc.
Closing as syntax highlighting issues should be opened on the upstream repos as per the troubleshooting doc.
Fair enough. However, I opened the issue here because I propose to revert the change until the problems are fixed. It's really annoying to work on code reviews at the moment.
As a temporary suggestion, if you are able to use the VS Code's GitHub integration to do code reviews, you might have a better experience as VS Code is able to use the same grammar without experiencing the errors.
+1 to reverting until problems are fixed, it's been really hard to read code for the past little bit
Another +1 to fixing or reverting this soon. It makes diffs like this pretty hard to understand:
The latest discussion on the potential issue with GitHub's highlighter has been happening on https://github.com/github-linguist/linguist/pull/6603, but @lildude I wonder if we should reopen this issue (or create a new one) to have a more discoverable place for discussion than on a merged PR?
Guys, really ... it has been over a month now that the highlighting is broken. I appreciate all your work and I very well know that a fix usually is not ready within a few minutes/hours/days. However, a simple revert to the previous state of the highlighter would have been perfectly sufficient to allow people to work with Swift code on GitHub again. Honestly, (re)viewing Swift code at the moment is simply impossible and has been for over a month.
I kindly ask you again to roll back the grammar change! 🙏
I kindly ask you again to roll back the grammar change! 🙏
This is out of my control as is not a problem with the grammar... it's a problem with the highlighting engine which coincided with the last release. Rolling back the release will make no difference. The team responsible for the highlighting engine is aware of the issue and looking into it.
Feel free to open a support ticket referencing https://github.com/github-linguist/linguist/issues/6668 if you want to add more to the known issue for passing on to the relevant team.
With the v7.28.0 release, the syntax highlighting for Swift code makes some files unreadable. See this file in the SwiftLint repository as an example.
Many parts get a red background color in dark mode, which makes it very hard to work with them, especially when the confusing highlighting takes action in code reviews where only a small (red) part is visible. My current solution is to review the changes locally which is uncomfortable.
If a quick fix cannot be found, I'd vote for a rollback to the previous Swift grammar.
FYI: @jtbandes