Skip to content

Commit 150ab8d

Browse files
Ayushi ShivhareAyushi Shivhare
authored andcommitted
Fix include regex and test for slash paths
1 parent b998e04 commit 150ab8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fortls/regex_patterns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class FortranRegularExpressions:
130130
I,
131131
)
132132
PP_DEF_TEST: Pattern = compile(r"(![ ]*)?defined[ ]*\([ ]*(\w*)[ ]*\)$", I)
133-
PP_INCLUDE: Pattern = compile(r"[ ]*#[ ]*include[ ]*([\"\w\./]*)", I)
133+
PP_INCLUDE: Pattern = compile(r"[ ]*#[ ]*include[ ]*[\"']([\w\./]+)[\"']", I)
134134
PP_ANY: Pattern = compile(r"^[ ]*#:?[ ]*(\w+)")
135135
# Context matching rules
136136
CALL: Pattern = compile(r"[ ]*CALL[ ]+[\w%]*$", I)

0 commit comments

Comments
 (0)