|
cf3755cb
|
2021-05-01T14:26:52
|
|
PHP: Fixed string interpolation (#2864)
|
|
e0ee93f1
|
2021-04-14T15:23:06
|
|
PHP: Added missing PHP 7.4 `fn` keyword (#2858)
|
|
7e8cd40d
|
2021-04-03T11:14:13
|
|
PHP: Fixed methods with keyword names + minor improvements (#2818)
|
|
8019e2f6
|
2021-02-19T17:41:31
|
|
PHP: Improved constant support for PHP 8.1 enums (#2770)
This improves the highlighting of PHP 8.1 enums and class constants.
|
|
f79b0eef
|
2021-02-18T20:35:36
|
|
PHP: Added support for PHP 8.1 enums (#2752)
|
|
04ef309c
|
2021-01-20T20:12:58
|
|
PHP: Class names at the start of a string are now highlighted correctly (#2731)
Some class names at the start of the input string were not detected correctly due to the way greedy matching works. This fixes the issue by splitting the `class-name` rule into two rules, one before and one after the `keyword` rule that interfered and caused the issue.
|
|
01af04ed
|
2021-01-07T02:01:16
|
|
PHP: Numeral syntax improvements (#2701)
Improves numeral literal handling in the Prism PHP component in two ways:
1. Since PHP 7.4, it is possible to use [underscore numeric separator](https://php.watch/versions/7.4/underscore_numeric_separator). Prism correctly handles this for decimal numbers, but not for binary, octal, and hex numerals although PHP supports the underscore separator for binary, octal, and hex numeric literals as well.
2. In upcoming PHP 8.1, PHP supports an [explicit octal numeral prefix `0o`/`0O`](https://php.watch/versions/8.1/explicit-octal-notation). The existing `0` prefix is not removed.
This commit updates the PHP number regex to accommodate both cases above, and expands the tests for new syntax.
|
|
37b9c9a1
|
2020-12-31T14:10:09
|
|
PHP: Fixed exponential backtracking (#2684)
|
|
e644178b
|
2020-12-28T18:19:11
|
|
Added test for polynomial backtracking (#2597)
|
|
c2f6a644
|
2020-10-25T23:42:25
|
|
Fixed multiple cases of vulnerable regexes (#2584)
|
|
df922d90
|
2020-10-16T22:20:59
|
|
PHP: Added support for PHP 8.0 features (#2591)
|
|
38808e64
|
2020-10-13T14:03:42
|
|
PHP: Added support for PHP 7.4 + other major improvements (#2566)
|
|
1761513e
|
2020-10-05T18:01:19
|
|
PHP: Added `match` keyword (PHP 8.0) (#2574)
PHP introduces a new [`match` keyword in PHP 8.0](https://php.watch/versions/8.0/match-expression).
|
|
7a554b5f
|
2020-04-16T22:27:54
|
|
Fixed several cases of exponential backtracking (#2268)
|
|
24c8f833
|
2020-01-05T19:56:14
|
|
PHP: Fixed exponential runtime of a pattern (#2157)
This fixes the exponential runtime of the pattern used to identify PHP code embedded in HTML.
|
|
ad3fa443
|
2019-10-16T11:44:14
|
|
Inlined some unnecessary rest properties (#2082)
This inlines a few unnecessary `rest` properties.
|
|
289ddd9b
|
2019-02-28T21:56:01
|
|
PHP: Fixed closing tag issue (#1652)
This fixes that PHP's closing tag (`?>`) was detected inside strings and comments.
|
|
439e3bd7
|
2019-01-11T00:54:01
|
|
Made false, true, and null constants in PHP (#1694)
- This adds the `constant` alias to `false` and `true`.
- `null` is no longer `keyword` but a `constant`.
|
|
55fb0f8e
|
2019-01-03T17:22:02
|
|
Update PHP keywords (#1690)
This removes PHP 4 specific keywords and adds new PHP keywords.
Keywords previously classified as functions are now classified as keywords.
|
|
f1026b4b
|
2019-01-03T01:41:36
|
|
Improve recognition of constants in PHP (#1688)
The pattern for PHP constants now have to be a valid identifier and recognizes single-letter names.
|
|
9dfec340
|
2018-08-18T22:04:51
|
|
`insertBefore` now correctly updates references (#1531)
Removes some workarounds for misplacing the reference when using `insertBefore`.
|
|
5f9c078a
|
2018-03-25T13:46:42
|
|
Make ERB, Handlebars, PHP and Smarty highlight properly in NodeJS (#1367)
|
|
de8ebe20
|
2018-03-03T21:42:51
|
|
PHP: Code style
|
|
ad25d221
|
2018-03-03T21:41:19
|
|
PHP: Fix shell-comment failure now that strings are greedy
|
|
5d7223c9
|
2018-03-03T21:39:51
|
|
PHP: Add support for Heredoc and Nowdoc strings
|
|
9f1f8d67
|
2018-03-03T20:53:08
|
|
PHP: Add support for string interpolation inside double-quoted strings. Fix #1146
|
|
9a542a00
|
2017-11-28T19:41:58
|
|
PHP: Add support for multi-line strings. Fix #1233
|
|
5235f18e
|
2017-10-22T15:12:42
|
|
PHP: Don't use captures if not needed
|
|
36bc560e
|
2017-05-13T09:34:37
|
|
Check for possible pre-existing marker strings in PHP
|
|
3ce74880
|
2017-03-30T18:39:16
|
|
Add support for the <?= delimiter in PHP
|
|
84107fab
|
2017-02-10T17:44:45
|
|
Use different replacement marker for PHP, because curly braces are
highlighted as punctuation in JavaScript and CSS.
|
|
0a00d7f7
|
2017-02-10T17:10:19
|
|
Fix the PHP language
This patch is an attempt to fix the PHP language, when it is combined
with markup.
The problem is, that markup has a higher priority than all other tokens.
This leads to weird errors, where HTML tags are highlighted inside of
comments #197. One solution to this was to set the `greedy` flag for the
comment token, but this leads to far worse errors like #1097.
This patch should fix both issues #197 and #1097, by switching the
grammar to markup on the fly. One potential problem is, that it relies
on the `<?php` tag to detect if markup is present. So if a PHP file
contains only markup and no PHP code at all, the result will look
broken.
|
|
8aa2cc4a
|
2017-05-08T13:56:50
|
|
Replace [\w\W] with [\s\S] and [0-9] with \d in regexes (#1107)
* Replace [\w\W] with [^] and [0-9] with \d in regexes
* Replace [\s\S] with [^]
* Replace [^] with [\s\S]
|
|
86aa3d21
|
2016-09-01T23:43:11
|
|
Revert #998 + run normalize-whitespace and remove-initial-line-feed plugins in the before-sanity-check hook. Fix #1018 (see issue for discussion)
|
|
d8fefde6
|
2016-07-12T09:09:52
|
|
Don't restore env.code from backupCode in Handlebars, PHP and Smarty components
|
|
318aab39
|
2016-07-05T19:00:52
|
|
Make PHP comments greedy. Fix #197
|
|
895bf46b
|
2015-09-20T16:25:21
|
|
Properly escape special replacement patterns ($) in Handlebars, PHP and Smarty. Fix #772
|
|
f9d94520
|
2015-08-29T23:16:25
|
|
PHP: Simplified patterns
|
|
b1fd5bdc
|
2015-03-10T08:27:53
|
|
Removed unused global flag in all grammars
|
|
00955466
|
2015-01-29T07:49:18
|
|
PHP : Handle shell-like comment after strings because they are less common than strings containing hashes
|
|
ec2540af
|
2014-08-23T16:37:01
|
|
Fixed 'before-insert' hook
Fixed 'before-insert' hook: now checks if language is PHP before assigning env.code to env.backupCode.
Only "language-php" defines env.backupCode: without this condition, env.Code would be undefined for any other language than PHP after this hook is called. It would then lead to wrong behaviours (eg. Line Numbers plugin would not show lines).
|
|
312e989c
|
2014-08-19T12:01:00
|
|
Fix line-numbers for PHP in markup
The problem is, that inline php code can be anywhere inside of a HTML
element. To properly highlight this the php language implementation
temporarily replaces all inline php code in `env.code` with something
like `{{PHP0}}`. After the markup highlighting is finished it replaces
it again with the real code, but it leaves `env.code` corrupted.
Since the line-numbers plugin uses `env.code` to count the number of
lines, the result will be broken.
So to fix this, it must be ensured, that `env.code` is restored before
the line-numbers plugin uses it.
|
|
e437402f
|
2014-05-24T12:12:28
|
|
Remove entities [#258]
|
|
48cbb067
|
2014-04-25T11:54:39
|
|
support for PHP's #-style comments
although it fails to detect when a # is within a string, just like it does for // though when // isn't preceded by a :
but such are the limits of parsing code with regexp :(
|
|
a48fdb8f
|
2013-12-29T00:25:45
|
|
Remove duplicate keywords in PHP
There are some duplicate keyword in PHP keywords definition:
* extends
* static
* use
|
|
685b1652
|
2013-07-13T12:24:13
|
|
Use all markup patterns instead of just tag within PHP blocks [Issue #134]
|
|
3f35ff9c
|
2013-07-03T12:21:50
|
|
Added PHP extras with additional patterns
|
|
50485867
|
2013-07-03T02:22:27
|
|
Added min versions
|
|
5c7d8061
|
2013-07-03T02:09:37
|
|
Polish fixes according to test cases
|
|
08d8f5a2
|
2013-07-02T18:39:04
|
|
Comment out patterns to move to php-extras
|
|
2dc55342
|
2013-07-02T18:36:53
|
|
Use global match for hook
|
|
0c8c1789
|
2013-07-02T18:18:07
|
|
Quick fixes
Removed PHP from examples
|
|
a2db2b5c
|
2013-07-02T16:54:46
|
|
Added legit markup support
|
|
52b05010
|
2013-06-03T18:14:02
|
|
Removed markup parsing
|
|
e962299c
|
2013-05-18T17:29:21
|
|
Updated PHP patterns
Fixed PHP + Markup
|
|
b4c67349
|
2013-05-17T19:21:25
|
|
Readded word boundaries
|
|
3129ed87
|
2013-05-17T16:57:08
|
|
More example testing
|
|
45a54837
|
2013-05-16T21:08:06
|
|
Moved function to clike
|
|
b1003de3
|
2013-05-16T12:19:58
|
|
More improvements and testing
|
|
15c80635
|
2013-05-14T12:03:58
|
|
Added class-name to clike
Added PHP support
|