Skip to content

Commit

Permalink
Merge pull request #77 from michaelstephendavies/master
Browse files Browse the repository at this point in the history
Correctly parse imports with spaces before ";"
  • Loading branch information
quarnster committed Feb 23, 2014
2 parents 47a1d7b + 2143e08 commit 7a05b91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sublimejava.py
Expand Up @@ -67,7 +67,7 @@ def show_error(self, msg):
sublime.error_message(msg + "\n\nDisable visual error message dialogues with setting:\nsublimejava_no_visual_errors: true")

def get_packages(self, data, thispackage, type):
packages = re.findall(r"(?:^|\n)[ \t]*import[ \t]+(.*);", data)
packages = re.findall(r"(?:^|\n)[ \t]*import[ \t]+(.*?)[ \t]*;", data)
packages.append("java.lang.*")
packages.append("") # for int, boolean, etc
for package in packages:
Expand Down

0 comments on commit 7a05b91

Please sign in to comment.