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

reST: linguist-language override is ignored #1102

Open
pjeby opened this issue Sep 5, 2017 · 7 comments
Open

reST: linguist-language override is ignored #1102

pjeby opened this issue Sep 5, 2017 · 7 comments

Comments

@pjeby
Copy link

pjeby commented Sep 5, 2017

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

  • The language that doesn't work is restructuredText, not markdown
  • The files have a .txt extension, rather than no extension

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.

@pjeby pjeby changed the title reST: modelines and linguist-language overrides are ignored reST: linguist-language override is ignored Oct 25, 2017
@TGNThump
Copy link

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

@JLLeitschuh
Copy link

Just ran into this and the linguist team pointed me to this repo as the source of the problem: github-linguist/linguist#6331

@yermulnik
Copy link

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 👍🏻

Copy link

github-actions bot commented Dec 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Dec 7, 2024
@yermulnik
Copy link

😢

@github-actions github-actions bot removed the Stale label Dec 8, 2024
Copy link

github-actions bot commented Feb 6, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Feb 6, 2025
@yermulnik
Copy link

@github-actions github-actions bot removed the Stale label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants