crayon-syntax-highlighter
crayon-syntax-highlighter copied to clipboard
Fix compatibility with PHP 7.3
The regex fails to parse in PHP 7.3, which broke the page in later functions.
PHP Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /var/www/felixcat/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340
@felixonmars - don't suppose you have Crayon working with WP 5.0?
Indeed, I am running Crayon with WP 5.0 under PHP 7.3.
Interesting!
I’m still on PHP 7.2 at the mo but running WP 5.0!
How are declaring language options in the blocks? I only realised through fiddling this evening that when I add a code block, it is formatted by Crayon on the front-end, but I’ve not yet found a way to declare which language I’m writing!
On Tue, 11 Dec 2018 at 19:03, Felix Yan [email protected] wrote:
Indeed, I am running Crayon with WP 5.0 under PHP 7.3.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/aramk/crayon-syntax-highlighter/pull/451#issuecomment-446321386, or mute the thread https://github.com/notifications/unsubscribe-auth/Apt9Ah5CgTQM-5m6h3D8tAGomZBNzFbyks5u4AFtgaJpZM4ZKSDA .
I've been using <pre lang="python">
or <pre class="lang:python">
for that.
Brilliant! Are you just wrapping it manually by "Edit block as HTML"?
Yes.
perfect ,!
Is this ever gonna be released? I spent a lot of time today to figure out the same issue before finding this.