Skip to content

Commit 53c08ca

Browse files
committed
minor #1011 Update index.rst regex matching file extensions fix (gpetraroli)
This PR was merged into the 2.x branch. Discussion ---------- Update index.rst regex matching file extensions fix /\\.(j|t)sx?$/. It seems to be using double backslashes (\\) to escape the dot (.) character, which is not necessary. The correct way to escape the dot character in a regular expression is by using a single backslash (\), like this: /\.(j|t)sx?$/. Commits ------- f455802 Update index.rst regex matching file extensions fix
2 parents c523d3d + f455802 commit 53c08ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/React/doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ code to your ``assets/app.js`` file:
5454
// assets/app.js
5555
import { registerReactControllerComponents } from '@symfony/ux-react';
5656
57-
registerReactControllerComponents(require.context('./react/controllers', true, /\\.(j|t)sx?$/));
57+
registerReactControllerComponents(require.context('./react/controllers', true, /\.(j|t)sx?$/));
5858
5959
This will load all React components located in the ``assets/react/controllers``
6060
directory. These are known as **React controller components**: top-level

0 commit comments

Comments
 (0)