doc
doc copied to clipboard
Remove the vim mode line.
Problem
This issue comes from https://github.com/perl6/Documentable/issues/51, it's the same here.
Solution
~Add the line where missing~ Remove the line from every file.
Hum, I'm not sure it's that useful... I'm using Comma now...
I'd actually go with globally removing the vim modelines, there are other ways of determining the filetype and not everyone uses vim.
@jonathanstowe I'm not really against removing these lines, but if memory serves me right, some editors recognizes the format to determine filetype. So, it could be useful sometimes.
Removal would make more sense when we move to .rakudoc.
I'd actually go with globally removing the vim modelines, there are other ways of determining the filetype and not everyone uses vim.
Please.
Vim users should just configure their vim so that it applies the correct style for the file type, which would be a polite and simple solution that works for every file for them, instead of adding config lines in every single file which are redundant for a great chunk of other users.
The problem is that GitHub only recognises Pod6 files if you add the vim mode line.
Are sure it's that?
Check this: (it's the same file, I only have added that line)
You can also check perl6/doc/doc, all files not rendering correctly do not have that line at the bottom.
Eugh
I wonder if it actually needs to be a vim modeline or just something that has some of the features of one. It's worth knowing this additionally because it will need to be addressed as part of the rename.
But I think the right way to address this is at the @github level. I'll try and find the repo for the renderer, and raise an issue.
Support for Pod 6 was added here https://github.com/github/linguist/pull/4083/files.
@Tyil maybe you have an idea why it would work this way? It's really weird, my understanding is that .pod6 files should just work.
Currently: https://github.com/github/linguist/blob/b4a068abf3b9ee66d9413bab5d4dc16ef7c9a71a/lib/linguist/languages.yml#L3908-L3918
Ah, I see. I uploaded these files as gists and peeked at them through github api:
- without vim mode line –
language: "Pod 6" - with vim mode line –
language: "Perl 6"
So there are two problems with it:
- RakuDoc renderer seems to be broken, at least for that particular file
- Vim mode line overrides correct language detection. Does it mean that the right vim mode line should mention rakudoc, or does it mean that it shouldn't override the correct detection?
Anyway, this should be fixed in linguist.
The problem is that GitHub only recognises Pod6 files if you add the vim mode line
~This is a github bug then. I believe we should investigate why https://github.com/github/linguist does that (https://github.com/github/linguist/blob/master/lib/linguist/languages.yml#L3915 ?) and send a patch.~
Ignore me, did not see latest comments after a power outage. But I do agree it should be addressed at github level.
@AlexDaniel linguist is used to find out the language, but a different thing is used for rendering pages. I've added a comment to the issue. The examples and heuristcs added to linguist do not have anything to do with the modeline, so the error must be somewhere else. However, the issue has been sitting there for a few months and it's not being addressed...
Looking at the API results, if the vim mode is present, it's consider a Raku file. If not, it's considering a pod6 file. This is correct:
The files are all named pod6, so the type should default to pod6. With the vim mode present, it's showing as Raku (and the ft line includes ft=perl6).
The rendering for both files appears correct (pod syntax is highlighted in the gists I tried this in) as of now.
So, we should be clear to remove the mode line in the repository.
Also, add an author test to avoid them being inadvertently added back in.