mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add FORTRAN keyword "data" to .f and .for heuristics. (#3218)
bug-185631.f sample from OpenFortranProject; BSD license.
This commit is contained in:
@@ -144,7 +144,7 @@ module Linguist
|
||||
end
|
||||
end
|
||||
|
||||
fortran_rx = /^([c*][^abd-z]| (subroutine|program|end)\s|\s*!)/i
|
||||
fortran_rx = /^([c*][^abd-z]| (subroutine|program|end|data)\s|\s*!)/i
|
||||
|
||||
disambiguate ".f" do |data|
|
||||
if /^: /.match(data)
|
||||
|
||||
6
samples/FORTRAN/bug-185631.f
Normal file
6
samples/FORTRAN/bug-185631.f
Normal file
@@ -0,0 +1,6 @@
|
||||
! Codes/HYCOM/hycom/ATLb2.00/src_2.0.01_22_one/
|
||||
real onemu, twomu
|
||||
data onemu/0.0098/
|
||||
data twomu/1./
|
||||
data threemu/0.e9/
|
||||
end
|
||||
Reference in New Issue
Block a user