[Top][All Lists]

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

id attributes for header elements

From: Per Bothner
Subject: id attributes for header elements
Date: Sat, 25 Dec 2021 14:10:29 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

(This is related to the "control over sectioning and splitting: thread,
as it may make it easier to provide a clean solution.)

Currently, a header element generates an empty <span id="...> element.

For example:

@subheading Electron

generates (assuming no conflicting "Electron" anchor or node):

<span id="Electron"></span><h4 class="subheading">Electron</h4>


@subheading Electron


<span id="Electron"></span><span id="Electron-1"></span><h4 

Two requests:
(1) Don't generates the implicit id="Electron-1" when it immediately follows
an explicit id="Electron".
(2) Add the id attribute to the <h4> element rather than generate an empty 
<span> node.

Thus I'd like to see, for both inputs above:

<h4 id="Electron" class="subheading">Electron</h4>

I think this is both cleaner and it would make for easier post-processing,
such as by JavaScript or XSLT.
        --Per Bothner
per@bothner.com   http://per.bothner.com/

reply via email to

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