From 12f823ba3c18d036ecfa8944775324842c3f3b55 Mon Sep 17 00:00:00 2001 From: panjan Date: Sun, 4 Sep 2016 00:20:58 +0200 Subject: [PATCH] react: improved react file recognition --- layers/+frameworks/react/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layers/+frameworks/react/packages.el b/layers/+frameworks/react/packages.el index 896f55c1b..af97d2fb7 100644 --- a/layers/+frameworks/react/packages.el +++ b/layers/+frameworks/react/packages.el @@ -65,5 +65,5 @@ (add-to-list 'auto-mode-alist '("\\index.android.js\\'" . react-mode)) (add-to-list 'auto-mode-alist '("\\index.ios.js\\'" . react-mode)) (add-to-list 'magic-mode-alist '("/\\*\\* @jsx React\\.DOM \\*/" . react-mode)) - (add-to-list 'magic-mode-alist '("^import React" . react-mode)) + (add-to-list 'magic-mode-alist '("import\s+[^\s]+\s+from\s+['\"]react['\"]" . react-mode)) (add-hook 'react-mode-hook 'spacemacs//setup-react-mode))