75c3b6b2e8
The third part of the Fortran xfuncname regex wants to match the beginning of a subroutine or function, so it allows for all characters except `'`, `"` or whitespace before the keyword 'function' or 'subroutine'. This is meant to match the 'recursive', 'elemental' or 'pure' keywords, as well as function return types, and to prevent matches inside strings. However, the negated set does not contain the `!` comment character, so a line with an end-of-line comment containing the keyword 'function' or 'subroutine' followed by another word is mistakenly chosen as a hunk header. Improve the regex by adding `!` to the negated set. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 lines
212 B
Plaintext
15 lines
212 B
Plaintext
module a
|
|
|
|
contains
|
|
|
|
subroutine RIGHT (funcA, funcB)
|
|
|
|
real funcA ! grid function a
|
|
real funcB ! grid function b
|
|
|
|
real ChangeMe
|
|
|
|
end subroutine RIGHT
|
|
|
|
end module a
|