github / markup

Determines which markup library to use to render a content file (e.g. README) on GitHub
MIT License
5.87k stars 3.39k forks source link

reST: linguist-language override is ignored #1102

Open pjeby opened 7 years ago

pjeby commented 7 years ago

This is similar to #578, but with two key differences:

Despite adding a .gitattributes of:

*.txt linguist-language=reStructuredText

The .txt files are rendered as syntax-highlighted plain text, rather than processed as markup. Ideally, markup would respect the .gitattributes, as I'm trying to migrate some older projects to Github and I don't want to pollute the commit history and disturb the codebase (the .txt files are used to generate tests and docs, so renaming them would require possibly-breaking code changes).

A sample repo with the issue can be seen here -- the .gitattributes should make this .txt file reST, but it is rendered as plain text, syntax-highlighted as reST, rather than as reST markup.

TGNThump commented 4 years ago

+1 on this, having the markup renderer respect linguist-language overides would be super helpful for me.

JLLeitschuh commented 1 year ago

Just ran into this and the linguist team pointed me to this repo as the source of the problem: https://github.com/github/linguist/issues/6331

yermulnik commented 1 year ago

Given this issue has been existing for more than 6 yrs, I'm adding my vote to it as a comment along with up-voting initial message with 👍🏻