Skip to content

Commit

Permalink
enh(php) Switch highlighter to partially case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
wkania committed Dec 9, 2021
1 parent 9e33f83 commit 06493e5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/languages/php.js
Expand Up @@ -63,11 +63,11 @@ export default function(hljs) {
const NUMBER = {
className: 'number',
variants: [
{ begin: `\\b0b[01]+(?:_[01]+)*\\b` }, // Binary w/ underscore support
{ begin: `\\b0o[0-7]+(?:_[0-7]+)*\\b` }, // Octals w/ underscore support
{ begin: `\\b0x[\\da-f]+(?:_[\\da-f]+)*\\b` }, // Hex w/ underscore support
{ begin: `\\b0[bB][01]+(?:_[01]+)*\\b` }, // Binary w/ underscore support
{ begin: `\\b0[oO][0-7]+(?:_[0-7]+)*\\b` }, // Octals w/ underscore support
{ begin: `\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b` }, // Hex w/ underscore support
// Decimals w/ underscore support, with optional fragments and scientific exponent (e) suffix.
{ begin: `(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:e[+-]?\\d+)?` }
{ begin: `(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?` }
],
relevance: 0
};
Expand Down Expand Up @@ -103,7 +103,7 @@ export default function(hljs) {
'Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass'
};
return {
case_insensitive: true,
case_insensitive: false,
keywords: KEYWORDS,
contains: [
hljs.HASH_COMMENT_MODE,
Expand Down

0 comments on commit 06493e5

Please sign in to comment.