You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,9 +37,15 @@ Ox-html-stable-ids is disabled by default, even after requiring and enabling the
37
37
38
38
The function that generates headlines in Org's HTML exporer (`org-html-headline`) calls a function called `org-export-get-reference` to generate a unique reference for the headline. Ox-html-stable-ids adds an advice to overrides that function to return stable IDs, based on the headline's contents, instead.<sup><aid="fnr.adam-porter"class="footref"href="#fn.adam-porter"role="doc-backlink">1</a></sup>
39
39
40
-
First, the `org-html-stable-ids--extract-id` helper function takes a headline and returns a stable ID:
40
+
First, the `org-html-stable-ids--extract-id` helper function takes an element and returns a stable ID:
If the headline has a `:CUSTOM_ID` property, that's immediately returned. If not, the ID is created by taking the headline's contents and converting them to "kebab case".
62
+
If the element has a `:CUSTOM_ID` property, that's immediately returned. If not, element's contents are used through the `org-html-stable-ids--extract-value` function. To create te ID, the value is then converted to "kebab case".
57
63
58
-
<divclass="aside"id="orgb17faff">
64
+
<divclass="aside"id="org8238144">
59
65
<p>
60
66
61
67
</p>
@@ -70,7 +76,7 @@ An implementation in Emacs Lisp uses a regular expression to replace everything
0 commit comments