urvanov-ru / crayon-syntax-highlighter

Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, local file or post text.
https://wordpress.org/plugins/urvanov-syntax-highlighter/
GNU General Public License v3.0
60 stars 11 forks source link

do_shortcode does not parse the shortcode entirely #7

Open CoderBlue opened 4 years ago

CoderBlue commented 4 years ago

When I parse the the_content with Wordpress do_shortcode the shortcode is not parsed properly

For instance if I do this in a template:

$content = do_shortcode(get_the_content());
echo $content; 

I get something like this:

"Lorem ipsum dolor sit amet, nec an eius constituam: [crayon-5e4e04657b393697127747/] assentior, quis maluisset his an"

urvanov-ru commented 4 years ago

I don't sure about using of do_shortcode. But if you use the_content();, then it works well. Maybe it does some other thing. Did this thing work in Crayon?

portalzine commented 4 years ago

Same issue here. Does not do that with the original plugin. Was just trying this out, as I am still running my own tweaked version of the Crayon Highlighter.

urvanov-ru commented 4 years ago

@portalzine Can you show me your version? Maybe I can grap it. Or you can create a merge request for my version.

urvanov-ru commented 3 years ago

@CoderBlue Are you using old tags like [crayon attributes] some code [/crayon] or you insert your code with tag editor in ui with HTML <pre>?

urvanov-ru commented 3 years ago

@portalzine same question for you too...