File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3021,19 +3021,19 @@ protected function compileComponents($value)
30213021 * @return string
30223022 */
30233023 $ callback = function ($ match ) {
3024- if (static ::contains ($ match [0 ], 'x- ' )) {
3024+ if (isset ( $ match [ 4 ]) && static ::contains ($ match [0 ], 'x- ' )) {
30253025 $ match [4 ] = $ this ->compileComponents ($ match [4 ]);
30263026 }
30273027 $ paramsCompiled = $ this ->parseParams ($ match [2 ]);
30283028 $ str = "('components. " . $ match [1 ] . "', " . $ paramsCompiled . ") " ;
3029- return self ::compileComponent ($ str ) . $ match [4 ] . self ::compileEndComponent ();
3029+ return self ::compileComponent ($ str ) . ( $ match [4 ] ?? '' ) . self ::compileEndComponent ();
30303030 };
30313031 return preg_replace_callback ('/<x-([a-z0-9.-]+)(\s[^>]*)?(>((?:(?!<\/x-\1>).)*)<\/x-\1>|\/>)/ms ' , $ callback , $ value );
30323032 }
30333033
30343034 protected function parseParams ($ params ): string
30353035 {
3036- preg_match_all ('/([a-z-0 -9:]*?)\s*?=\s*?(.+?)(\s|$)/ms ' , $ params , $ matches );
3036+ preg_match_all ('/([a-zA-Z0 -9:- ]*?)\s*?=\s*?(.+?)(\s|$)/ms ' , $ params , $ matches );
30373037 $ paramsCompiled = [];
30383038 foreach ($ matches [1 ] as $ i => $ key ) {
30393039 $ value = str_replace ('" ' , '' , $ matches [2 ][$ i ]);
You can’t perform that action at this time.
0 commit comments