diff --git a/lua/import/languages.lua b/lua/import/languages.lua index 5da34f9..2ca6097 100644 --- a/lua/import/languages.lua +++ b/lua/import/languages.lua @@ -10,7 +10,7 @@ local languages = { extensions = { "java" }, }, { - regex = [[(?m)^(?:from[ ]+(\S+)[ ]+)?import[ ]+(\S+)[ ]*$]], + regex = [[(?m)^(?:from\s+(\S+)\s+)?import\s+([^#\n]+)]], filetypes = { "python" }, extensions = { "py" }, },