Support » Plugin: Code Prettify » Puts everything into a single line

  • Resolved captzeanie2016

    (@captzeanie2016)


    Hi,

    I was looking for a way to highlight posted code in pages/posts. I have installed this and it works great in highlighting but it puts all the text between the pre tags into a single line.

    instead of having it like this
    a = a +1;
    b = a + 4;
    c = a + b;
    if ((q1 == true) || (q2 == true)) {
    // Do work here
    }

    it is displayed as
    a = a +1; b = a + 4; c = a + b; if ((q1 == true) || (q2 == true)) { // Do work here }

    Is the way to sort this? or should I use a different plugin in which case does anyone have a recommendation

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kaspars

    (@kasparsd)

    @captzeanie2016 Are you using the standard Gutenberg code block for adding the code snippet? All code should be inside <pre><code></code></pre> blocks which the code block does by default.

    I’m using the plugin on my own blog and it works correctly — see this post for example.

    captzeanie2016

    (@captzeanie2016)

    Been playing this that for ages so thanks for the replky Kaspars

    It’s all within pre and code tags.

    See here and take a log at the source to see.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.