Easy migration path to this plugin from ‘Code Syntax Block’
-
Is there an easy migration path from mkaz’s Code Syntax Block plugin to yours? Code blocks are broken since I disabled ‘Code Syntax Block’ and need to be converted. I don’t want to edit hundreds of posts manually with possibly even more code blocks.. ??
What I have now is, for example
<!-- wp:code --> <pre class="wp-block-code"><code lang="powershell" class="language-powershell">Get-SmbServerConfiguration | Select EnableSMB1Protocol</code></pre> <!-- /wp:code -->
And this needs to be converted into:
<!-- wp:code {"language":"powershell"} --> <pre class="wp-block-code"><code>Get-SmbServerConfiguration | Select EnableSMB1Protocol</code></pre> <!-- /wp:code -->
BTW: I tried to use John Godley’s Search Regex plugin, but that broke more than it fixed… A kind of working regexp is:
s/<!-- wp:code -->\n<pre class="wp-block-code"><code lang="\(.*\)" class="language-.*">/<!-- wp:code {"language":"\1"} -->\r<pre class="wp-block-code"><code>/
But I like a more fail-safe migration path ?? I’ll update this support question if I find a solution in the meantime.
- The topic ‘Easy migration path to this plugin from ‘Code Syntax Block’’ is closed to new replies.