Skip to content

Commit

Permalink
Fixes Error during parsing #207
Browse files Browse the repository at this point in the history
The regex for submodule parent names was too greedy only
matching patterns at the start of the string.
  • Loading branch information
gnikit committed Dec 20, 2021
1 parent 6de6684 commit a0f516e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELONG

## 1.14.2

### Fixes

* Fixes error while parsing submodule parent name with spaces
([#207](https://github.com/hansec/fortran-language-server/issues/207))

## 1.14.1

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion fortls/parse_fortran.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ def read_submod_def(line):
else:
trailing_line = ""
#
name_match = WORD_REGEX.match(trailing_line)
name_match = WORD_REGEX.search(trailing_line)
if name_match is not None:
name = name_match.group(0).lower()
return "smod", SMOD_info(name, parent_name)
Expand Down

0 comments on commit a0f516e

Please sign in to comment.