diff --git a/lexers/fortran_fixed.go b/lexers/fortran_fixed.go index d93ac1eb6..aa93ce07a 100644 --- a/lexers/fortran_fixed.go +++ b/lexers/fortran_fixed.go @@ -19,18 +19,18 @@ var FortranFixed = Register(MustNewLexer( "root": { {`[C*].*\n`, Comment, nil}, {`#.*\n`, CommentPreproc, nil}, - {`[\t ]*!.*\n`, Comment, nil}, + {` {0,4}!.*\n`, Comment, nil}, {`(.{5})`, NameLabel, Push("cont-char")}, {`.*\n`, Using("Fortran"), nil}, }, "cont-char": { - {` `, Text, Push("code")}, - {`0`, Comment, Push("code")}, + {` `, TextWhitespace, Push("code")}, {`.`, GenericStrong, Push("code")}, }, "code": { - {`(.{66})(.*)(\n)`, ByGroups(Using("Fortran"), Comment, Text), Push("root")}, - {`.*\n`, Using("Fortran"), Push("root")}, + {`(.{66})(.*)(\n)`, ByGroups(Using("Fortran"), Comment, TextWhitespace), Push("root")}, + {`(.*)(!.*)(\n)`, ByGroups(Using("Fortran"), Comment, TextWhitespace), Push("root")}, + {`(.*)(\n)`, ByGroups(Using("Fortran"), TextWhitespace), Push("root")}, Default(Push("root")), }, }