@@ -8,7 +8,6 @@ import refractorMarkup from 'refractor/lang/markup.js';
8
8
import refractorPhp from 'refractor/lang/php.js' ;
9
9
10
10
blade . displayName = 'blade' ;
11
- blade . aliases = [ 'blade_php' ] ;
12
11
13
12
export default function blade ( Prism ) {
14
13
Prism . register ( refractorMarkup ) ;
@@ -18,7 +17,6 @@ export default function blade(Prism) {
18
17
Prism . languages . blade = {
19
18
comment : / { { --( [ \s \S ] * ?) - - } } / ,
20
19
21
- // Blade directives
22
20
directive : {
23
21
pattern : / @ \w + (?: : : \w + ) ? (?: \s * \( [ \s \S ] * ?\) ) ? / ,
24
22
inside : {
@@ -28,7 +26,6 @@ export default function blade(Prism) {
28
26
} ,
29
27
} ,
30
28
31
- // Echo statements
32
29
echo : {
33
30
pattern : / \{ { 2 , 3 } [ \s \S ] * ?\} { 2 , 3 } / ,
34
31
inside : {
@@ -40,7 +37,6 @@ export default function blade(Prism) {
40
37
} ,
41
38
} ,
42
39
43
- // Raw PHP
44
40
php : {
45
41
pattern : / (?: \@ p h p [ \s \S ] * ?\@ e n d p h p | \< \? p h p [ \s \S ] * ?\? \> ) / ,
46
42
inside : {
@@ -55,27 +51,19 @@ export default function blade(Prism) {
55
51
} ,
56
52
} ,
57
53
58
- // HTML markup
59
54
markup : {
60
55
pattern : / < [ ^ ? ] \/ ? ( .* ?) > / ,
61
56
inside : Prism . languages . markup ,
62
57
} ,
63
58
64
- // Keywords for common Blade directives
65
59
keyword :
66
60
/ \b (?: @ i f | @ e l s e | @ e l s e i f | @ e n d i f | @ f o r e a c h | @ e n d f o r e a c h | @ f o r | @ e n d f o r | @ w h i l e | @ e n d w h i l e | @ u n l e s s | @ e n d u n l e s s | @ i s s e t | @ e n d i s s e t | @ e m p t y | @ e n d e m p t y | @ s w i t c h | @ c a s e | @ b r e a k | @ d e f a u l t | @ e n d s w i t c h | @ i n c l u d e | @ e x t e n d s | @ s e c t i o n | @ e n d s e c t i o n | @ y i e l d | @ s t a c k | @ p u s h | @ e n d p u s h | @ a u t h | @ g u e s t | @ e n d a u t h | @ e n d g u e s t ) \b / ,
67
61
68
- // Blade variables
69
62
variable : / \$ \w + / ,
70
63
71
- // Operators
72
64
operator : / = > | - > | \| \| | & & | ! = | = = | < = | > = | [ + \- * \/ % < > ] = ? | \? : / ,
73
65
74
- // Punctuation
75
66
punctuation : / [ \[ \] ( ) { } : ; , ] / ,
76
67
} ;
77
-
78
- // Add alias for Blade files
79
- Prism . languages . blade_php = Prism . languages . blade ;
80
68
} ) ( Prism ) ;
81
69
}
0 commit comments