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

Fixing incorrect detection of the NewLisp language #2319

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/linguist/heuristics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,15 @@ def call(data)
end
end

disambiguate "Text", "NewLisp" do |data|
if /^\s*\(define /.match(data)
Language["NewLisp"]
else
Language["Text"]
end
end


disambiguate "TypeScript", "XML" do |data|
if data.include?("<TS ")
Language["XML"]
Expand Down
1 change: 1 addition & 0 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3164,6 +3164,7 @@ Text:
extensions:
- .txt
- .fr
- .nl
tm_scope: none
ace_mode: text

Expand Down
2 changes: 2 additions & 0 deletions samples/Text/corpus_1000.nl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tot slot is er nog het gebrek aan transparantie .
wie de verantwoordelijkheid draagt , wie de eigenaren zijn en wie de eigenlijke beslissingen neemt wordt tot elke prijs aan het oog onttrokken .