@@ -51,7 +51,7 @@ |
||
51 | 51 | new Rule(new RegexMatcher('/(\$\w+)/i'), ['context' => ['*none', '*string.double']]), |
52 | 52 | 'special' => new Rule(new RegexMatcher('/(\$[#@_])/i'), ['context' => ['*none', '*string.double']]), |
53 | 53 | 'argument' => new Rule(new RegexMatcher('/(\$\d+)/i'), ['context' => ['*none', '*string.double']]), |
54 | - new Rule(new RegexMatcher('/\$\{(\w+)(.*?)\}/i', [ 1 => Token::NAME, 2 => 'string' ]), ['context' => ['*none', '*string.double']]) |
|
54 | + new Rule(new RegexMatcher('/\$\{(\w+)(.*?)\}/i', [1 => Token::NAME, 2 => 'string']), ['context' => ['*none', '*string.double']]) |
|
55 | 55 | ], |
56 | 56 | |
57 | 57 | 'number' => new Rule(new RegexMatcher('/(-?(?:0[0-7]+|0[xX][0-9a-fA-F]+|0b[01]+|\d+))/')), |
@@ -26,7 +26,7 @@ |
||
26 | 26 | htmlspecialchars(substr($source, $last, $token->pos - $last)) |
27 | 27 | ); |
28 | 28 | |
29 | - if($token->isStart()) { |
|
29 | + if ($token->isStart()) { |
|
30 | 30 | $result .= $stack[] = $this->getOpenTag($token); |
31 | 31 | } else { |
32 | 32 | array_pop($stack); |
@@ -41,7 +41,7 @@ |
||
41 | 41 | new Rule(new RegexMatcher('/(\\\\\[.*?\\\\\])/s')), |
42 | 42 | new Rule( |
43 | 43 | new RegexMatcher( |
44 | - '/\\\begin{((?:' . implode('|', self::$mathEnvironments) . ')\*?)}(.*?)\\\end{\1}/s', |
|
44 | + '/\\\begin{((?:'.implode('|', self::$mathEnvironments).')\*?)}(.*?)\\\end{\1}/s', |
|
45 | 45 | [2 => Token::NAME] |
46 | 46 | ) |
47 | 47 | ) |