We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f34f3a commit 2c347a4Copy full SHA for 2c347a4
packages/helper-grammar-regex-collection/index.js
@@ -7,7 +7,7 @@ const TYPESCRIPT_REFERENCE = /\/{3}\s?<reference path=['"]([^'"\s]+)['"]/g;
7
const DOCKER_FROM = /FROM\s([^\n]*)/g;
8
const VIM_PLUGIN = /(?:(?:(?:Neo)?Bundle(?:Lazy|Fetch)?)|Plug(?:in)?)\s['"]([^'"\s]+)['"]/g;
9
const RUST_CRATE = /(?:extern crate|use) ([^:; ]+)/g;
10
-const PYTHON_IMPORT = /(?:(?:\n|^)\s*import|from)\s([^\s]*)/g;
+const PYTHON_IMPORT = /^\s*(?:import|from)\s([^\s]*)/gm;
11
12
export {
13
REQUIRE,
packages/helper-grammar-regex-collection/test.js
@@ -174,6 +174,7 @@ const fixtures = {
174
invalid: [
175
'\simport foo',
176
'\simport\nfoo',
177
+ '# from the',
178
],
179
},
180
};
0 commit comments