lang/javascript: don't look for import preact
Incorrect way to import preact.
This commit is contained in:
parent
26eb33e36e
commit
5c49d9c7c0
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@
|
||||||
"Detect React or preact imports early in the file."
|
"Detect React or preact imports early in the file."
|
||||||
(and buffer-file-name
|
(and buffer-file-name
|
||||||
(string= (file-name-extension buffer-file-name) "js")
|
(string= (file-name-extension buffer-file-name) "js")
|
||||||
(re-search-forward "\\(^\\s-*import +\\(?:pr\\|R\\)eact\\|\\( from \\|require(\\)[\"']p?react\\)"
|
(re-search-forward "\\(^\\s-*import +React\\|\\( from \\|require(\\)[\"']p?react\\)"
|
||||||
magic-mode-regexp-match-limit t)
|
magic-mode-regexp-match-limit t)
|
||||||
(progn (goto-char (match-beginning 1))
|
(progn (goto-char (match-beginning 1))
|
||||||
(not (sp-point-in-string-or-comment)))))
|
(not (sp-point-in-string-or-comment)))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue