Site logo

Archived topic

Generatepress trimming newlines for Code under Tabbed Content(Ultimate Blocks)

5 replies · Started by __smart___boyy__ on May 10, 2020

Viewing posts 1–6 of 6

Hi,

I am using Ultimate Blocks plugin to have a tabbed content. I am posting code examples in different languages under the tabbed content. When I purchased and activated generatepress it trimmed all newlines for the code blocks and my codes are showing inline, hence ugly and not readable.
For example if you visit my blog and scroll to the part where I am displaying Java/Python tabs and displaying code blocks inside them. You can see all code is being displayed in a single line -
https://cosmocode.io/java-selenium-tricks-to-locate-elements-like-experts-in-selenium-part-1/

Please help.

Hi there,

What happens if you add the Code Block directly to the editor ie. not inside a the Tabs Block ?

If I add the Code Block directly to the editor it works well, David. However, with my previous themes, I never had any issue with tabbed content before. So I am hoping you'll find something for me.

The problem is related to how the Tabs plugin is 'handling' the content of the Code Block.

If it were a simple CSS fix i could help but the problem is how the editor parses the blocks content. You would need to raise it with the Plugin Author.

Thanks for the reply. I am afraid if there is an issue with the ‘handling’ of the content of the Code Block by the tabs plugin, how come I never had any issues with any of my previous themes. I am sure before generatepress I tried 8-10 different themes with the same tabs plugin. The issue started only when I moved to generatepress.

I have over 50 articles, each using code examples at multiple places in the blog. I do not want to go through the pain. Please ask any of your developers to suggest some workaround.

Have you checked with the plugin support to see if they are able to see any issues?

This archived topic is closed to new replies.