emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding a class to the auto-inserted <br> elements


From: Daniel Radetsky
Subject: Adding a class to the auto-inserted <br> elements
Date: Sun, 25 Aug 2024 16:23:49 -0700

So I was exporting an Org doc to html the other day, and I was trying to follow this guide to make the list elements appear as a comma-separated list

https://markheath.net/post/css-comma-separated-list

It didn't work, and I discovered this was because Org adds a <br> element to the <li> element if the <li> element is created from an Org headline element. The easiest way to fix this and allow the aforementioned guide to work is by ensuring that all those <br> elements have `display: none` set via CSS. To make this easier and/or reduce the risk of accidentally removing other elements, we can add a class name to those <br>'s the way we do to other elements.

I have included an example change. This is just the simplest possible solution. Obviously if someone thinks a more complicated/featureful solution is required, we can do more stuff.

--dmr

Attachment: 0001-lisp-ox-html.el-Add-class-to-auto-inserted-br-tag.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]