Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with PHP 7.3 #451

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

felixonmars
Copy link

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

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
```
@willstocks
Copy link

@felixonmars - don't suppose you have Crayon working with WP 5.0?

@felixonmars
Copy link
Author

Indeed, I am running Crayon with WP 5.0 under PHP 7.3.

@willstocks
Copy link

willstocks commented Dec 12, 2018 via email

@felixonmars
Copy link
Author

I've been using <pre lang="python"> or <pre class="lang:python"> for that.

@willstocks
Copy link

Brilliant! Are you just wrapping it manually by "Edit block as HTML"?

@felixonmars
Copy link
Author

Yes.

@bollwarm
Copy link

perfect ,!

@gilvegliach
Copy link

Is this ever gonna be released? I spent a lot of time today to figure out the same issue before finding this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants