Support » Plugin: Pastacode » Pastacode Introducing Extra Line Feeds

  • Resolved michaelnorth

    (@michaelnorth)


    PastaCode introduces arbitrary line feeds that do not exist in the original code. There should be no spacing between the lines in this live example: Pastacode Demo

    My demo page also shows the same code displayed by another plugin – it matches the original exactly. I’d prefer to use Pastacode if this bug can be fixed. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Willy Bahuaud

    (@willybahuaud)

    Do you have empty lines when editing your code into Pastacode ?
    If you switch into html view, does the shortcode contain any empty lines ?

    faeldray

    (@faeldray)

    I’m having this problem as well. It seems that every time I save the draft/save updates, extra space is added between certain lines. It adds more and more each time until the code is ridiculously long. If I’m in HTML view and I open the Pastacode editor, those lines appear there as well.

    It only seems to occur when using the manual option. When I added the same code to Pastebin and links to that instead, the extra lines do not appear with each save.

    michaelnorth

    (@michaelnorth)

    Hi Willy, sorry for the delay, I somehow missed your update.

    I just re-tested PastaCode vs. Prism. Just as before, when I paste my code (which does not include any extra lines) into PastaCode using Manual mode, Pastacode immediately introduces many extra line feeds which are visible in the Text mode of the WordPress editor. Also, if I then try to edit my code in the Pastacode editor, the extra lines are obvious. My original code is 25 lines. In Pastacode, there are 99 lines — mostly blanks of course. The only way to fix the issue is to manually delete the extra lines in the text editor, which I’m NOT going to do 😉

    See screenshot: https://www.dropbox.com/s/0lc9r1zgzu4a1a1/pastacode-09-05-2015-01.png?dl=0

    With Prism, the code displays properly (exactly 25 lines) in the visual editor, the text editor, and on the WordPress page.

    Clearly, something’s wrong with PastaCode’s manual mode.

    I’d like to use Pastacode because of the customization options, please look into this. I have not tried @faeldrays solution Pastebin solution, but that really should not be necessary.

    michaelnorth

    (@michaelnorth)

    I just spent 15 minutes posting a follow-up message to answer your questions, but not I don’t see it here. The seems to be a real problem with this forum software, same experience yesterday. Extremely slow to update, not really sure if post published, etc. Developers should complain to WordPress.org — it’s a crappy support experience.

    michaelnorth

    (@michaelnorth)

    michaelnorth

    (@michaelnorth)

    I tested everything again. In manual mode Pastacode is introducing many new linefeeds. My original code is 25 lines, Pastacode displays it as 99 lines. If I attempt to edit the code within Pastacode itself, the extra lines are obvious. The only fix is to manually delete the extra lines in Text mode, or in the Pastacode editor. The Prism plugin works as advertised, displays exactly 25 lines in text mode, visual mode, and the WordPress page, but it lacks features I would like to have. Here’s a screenshot showing the extra lines: https://www.dropbox.com/s/0lc9r1zgzu4a1a1/pastacode-09-05-2015-01.png?dl=0

    Plugin Author Willy Bahuaud

    (@willybahuaud)

    Hello,

    I worked a lot on the new release to fix that bug. It seem WordPress view API doesn’t allow to set html as shortcode content. So now, manual code content is serialized into a shortcode attribute. Old shortcodes will be updated automaticlly 🙂

    Let me know if you encouter any problem upgrading to the new version.
    (maybe you should save your database before).

    Have a nice day!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Pastacode Introducing Extra Line Feeds’ is closed to new replies.