Skip to content

Commit 0d80398

Browse files
committed
more correct __halt_compiler();
1 parent 7691a38 commit 0d80398

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/languages/php.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,21 @@ export default function(hljs) {
288288
]
289289
}
290290
),
291-
hljs.COMMENT(
292-
'__halt_compiler.+?;',
293-
null,
294-
{
295-
endsWithParent: true,
296-
keywords: '__halt_compiler'
291+
{
292+
match: /__halt_compiler\(\);/,
293+
keywords: '__halt_compiler',
294+
starts: {
295+
scope: "comment",
296+
end: hljs.MATCH_NOTHING_RE,
297+
contains: [
298+
{
299+
match: /\?>/,
300+
scope: "meta",
301+
endsParent: true
302+
}
303+
]
297304
}
298-
),
305+
},
299306
PREPROCESSOR,
300307
{
301308
className: 'variable.language',

0 commit comments

Comments
 (0)