I'm using Wordpress 5.1 and Gutenberg block editor. I'm trying to show some Java code with the plugin SyntaxHighlighter Evolved. When editing a post I use the block 'Custom HTML' then add the code
[code language="java"]
List<Integer> myList = new ArrayList<>();
[/code]
Then I save the post and the Java code will appear correctly with syntax highlighting applied to it. It will look like this
This is the result that I wanted. But a problem happens when I edit the post again, in the Wordpress editing the Custom HTML block changes to the following
[code language="java"]
List<Integer> myList = new ArrayList<>();
[/code]
The < and > signs have been replaced by < and > and the code on the website becomes
Does anyone know how to fix this? thanks