It should however look like this and does also in other themes and page builders:
I went through the plugin and I think I found the issue.
The file luckywp-table-of-contents/front/views/items.php seems to be the issue. The file looks like this:
And somehow the new lines in line 15 to 20 are translated to <br> when rendering the HTML.
When I remove the new lines in the file as shown here, it works, no additional <br> are created:
As this error only seems to appear in Bricks, I’m not sure if there is a setting that I have to change.
I already looked, but I didn’t see anything.
thank you for the feedback.
So the issue is that in general the html including new line will be rendered.
That’s actually a good question. I’m just a user, so I don’t fully understand how it works.
While looking how to fix the result, I’ve seen that there is an “integration” folder. In there it seems it has kind of configuration file for many page builders. There is a BeaverBuilder.php, Oxygen.php, a whole folder for Elementor, etc.
So it might be, that these integration files take care of that.
For example here the Oxygen.php file. But as I said, I don’t understand what it’s doing:
<?php
namespace luckywp\tableOfContents\integrations;
use luckywp\tableOfContents\core\base\BaseObject;
use luckywp\tableOfContents\core\Core;
class Oxygen extends BaseObject
{
public function init()
{
add_action('ct_builder_start', function () {
Core::$plugin->onTheContentTrue('');
}, 1);
add_action('ct_builder_start', function () {
global $template_content;
$template_content = Core::$plugin->shortcode->theContent($template_content);
Core::$plugin->onTheContentFalse('');
}, 9999);
}
}
Do you think it would make sense to add an integration for Bricks?
Otherwise I can post the same question in the LuckyWP forum, it seems to be more of an issue of the plugin than Bricks.
it’s a table of contents plugin. So at the beginning of an article it will show the table of contents that is created by the used h-tags.
I tried it with Twenty Twenty-Five and actually it’s displayed correctly there:
I also started a post in the LuckWP forum. It seems like Bricks is really the cause: Looks like Bricks Builder replace new lines to **<br>** . LuckyWP ToC don’t add this tags.
Can you take a look into this? For me it really seems to be a bug in Bricksbuilder as Twenty Twenty-Five and my old Theme could display it correctly and also LuckyWP says they don’t change the HTML.
Does this happen on all posts? Because I tested this plugin locally now, and I can’t reproduce the issue.
Can you check that you don’t have any unclosed tags on your page, or maybe if you disable all templates, expect the ones that are absolutely needed?