Using the parent section id in section link

Posted by costin on
URL: https://discuss.asciidoctor.org/Using-the-parent-section-id-in-section-link-tp463.html

Hi,

I've noticed that sections without a declared id have their links generated based on the title and, in case of duplicates, add a counter to them:

Example:
== A
=== B
== X
=== B

results in links "_B" for (A/B) and "_B_2" (for X/B).

Is it possible to change this strategy so that the parent section id is used instead? So for the given example, the links would be: _A_B and _X_B ?

Thanks,
Costin