Brilliant plugin! One small question. I write using markdown and the official WordPress tooling changes:
`php $a = 1; </code>
`
Into:
<pre><code class="language-php">
$a = 1;
</code></pre>
Is there any way to get the preg_replace_callback
to detect that?
From what i can see it just works just with the_content, but can’t get it to work with ACF text/wysiwyg fields, any way to make it compatible?
]]>When using numbered lines, an empty line is added through the line in the Firefox.
Example from plugin page on your site: https://i.imgur.com/S4Msp9V.png
[Suggestion]
Noticed in your plugin on line 307:
$geshi->set_header_type(GESHI_HEADER_PRE_VALID);
It would be great to add special attribute to the <pre>
tag, for example <pre header="div">
, which would set the type of code container to GESHI_HEADER_DIV.
In this case, the code is copied normally.
The Gutenberg editor has a problem with the “&” character which it converts into “amp;” Is there any workaround with your plugin? Thanks!
]]>Hi,
Will there be an update to fix PHP 7.2 incompatibilities?
Be well,
AJ
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; GeSHi has a deprecated constructor in /home/USERNAME/public_html/wp-content/plugins/wp-geshi-highlight/geshi/geshi.php on line 259
]]>Code over a certain length (seems around 2300 characters) causes no code output (just a ).
I found this in the plugin code:
Snippet search&replace is based on PHP’s
preg_replace_callback()
.
“The pcre.backtrack_limit option (added in PHP 5.2) can trigger a NULL
return, with no errors.”
https://www.php.net/manual/de/function.preg-replace-callback.php#98721
https://www.php.net/manual/de/function.preg-replace-callback.php#100303
That is, for very long code snippets, it might happen that this function
does not find/replace anything. These snippets will not get highlighted.
I have never observed this, but please let me know when you run into it.
Increasing pcre.backtrack_limit to ten million has no effect.
I recently upgraded to PHP 7.1.0-dev (not sure if the issue was occurring before then.
]]>WP-GeSHi-Highlight support bbPress posts?
Thanks,
Best regards,
Jose A.
What would be the best way to apply syntax highlighting to the content of a custom field?
I am using Advanced Custom Fields to output some text from a textarea including some code blocks.
I am running the output of the custom field through ‘the_content’ filter, however the pre blocks are not being syntax highlighted.
Thanks,
Matt
]]>Hey there! Great plugin but somehow the css wont be served by my cdn (url is not beeing rewritten). I’m using W3 Total Cache plugin and Amazon Cloudfront. This works with all other plugins but not with this one… Any ideas?
Thanks!