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

Windows-style line endings are sometimes highlighted as errors #32

Open
Arcensoth opened this issue Dec 20, 2019 · 0 comments · May be fixed by #54
Open

Windows-style line endings are sometimes highlighted as errors #32

Arcensoth opened this issue Dec 20, 2019 · 0 comments · May be fixed by #54
Assignees
Labels
bug Something isn't working

Comments

@Arcensoth
Copy link
Owner

Arcensoth commented Dec 20, 2019

This issue became apparent in #16 but was deferred until more information was available.

Here are the relevant details from the discussion in that report:

At some point - probably as a side-effect of an earlier fix - I must have fixed the trailing arguments being highlighted as errors, but the ^M is a slightly different red and I don't think it's a problem with the syntax highlighter. Here's some research:

It looks like people might be committing files with CRLF and then GitHub decides to force-highlight the carriage returns.

We'll see how the next Linguist update handles the affected files and re-open if it's clear there's more to be done here.

An update, for posterity:

GitHub Linguist has been updated, and is now running v0.13.0 of language-mcfunction.

As expected, the trailing arguments are being highlighted properly but the ^M characters remain:

https://github.com/Gamemode4Dev/GM4_Datapacks/blob/master/gm4_phantom_scarecrows/data/phantom_scarecrows/functions/main.mcfunction#L2

Like I mentioned in my last comment, I'm not confident that this is a problem with the grammar itself but instead that people are committing carriage returns to mcfunction files. It may be the grammar's fault that these characters are being highlighted, but after some testing (via github-lightshow) I was unable to remove these characters by any means.

Until I have more definitive information about the problem and/or people reporting it, I'm going to work under the assumption that this is out of the grammar's control.

I'm still unsure exactly what's causing this problem, but it any case it can probably be fixed with some effort.

@Arcensoth Arcensoth added the bug Something isn't working label Dec 20, 2019
@Arcensoth Arcensoth self-assigned this Dec 20, 2019
@Arcensoth Arcensoth linked a pull request Sep 25, 2021 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant