Skip to content

Commit a1cb6ba

Browse files
Replace tabs with spaces in source document and generated .el file
1 parent addda61 commit a1cb6ba

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

ox-html-stable-ids.el

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ nil."
5959
Raise an error if the ID was used in the document before."
6060
(if org-html-stable-ids
6161
(let ((cache (plist-get info :internal-references))
62-
(id (org-html-stable-ids--extract-id datum)))
63-
(or (car (rassq datum cache))
64-
(if (assoc id cache)
65-
(user-error "Duplicate ID: %s" id)
66-
(when id
67-
(push (cons id datum) cache)
68-
(plist-put info :internal-references cache)
69-
id))))
62+
(id (org-html-stable-ids--extract-id datum)))
63+
(or (car (rassq datum cache))
64+
(if (assoc id cache)
65+
(user-error "Duplicate ID: %s" id)
66+
(when id
67+
(push (cons id datum) cache)
68+
(plist-put info :internal-references cache)
69+
id))))
7070
(funcall orig-fun datum info)))
7171

7272
(defun org-html-stable-ids--reference (datum info &optional named-only)

ox-html-stable-ids.org

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ First, the ~org-html-stable-ids--extract-id~ helper function takes a headline an
8686
(org-element-property :CUSTOM_ID datum)
8787
(let ((value (org-element-property :raw-value datum)))
8888
(when value
89-
(org-html-stable-ids--to-kebab-case value)))))
89+
(org-html-stable-ids--to-kebab-case value)))))
9090
#+end_src
9191

9292
If the headline has a ~:CUSTOM_ID~ property, that's immediately returned.
@@ -123,15 +123,15 @@ If a generated ID matches one that's already in the cache, an error is returned,
123123

124124
Raise an error if the ID was used in the document before."
125125
(if org-html-stable-ids
126-
(let ((cache (plist-get info :internal-references))
127-
(id (org-html-stable-ids--extract-id datum)))
128-
(or (car (rassq datum cache))
129-
(if (assoc id cache)
130-
(user-error "Duplicate ID: %s" id)
131-
(when id
132-
(push (cons id datum) cache)
133-
(plist-put info :internal-references cache)
134-
id))))
126+
(let ((cache (plist-get info :internal-references))
127+
(id (org-html-stable-ids--extract-id datum)))
128+
(or (car (rassq datum cache))
129+
(if (assoc id cache)
130+
(user-error "Duplicate ID: %s" id)
131+
(when id
132+
(push (cons id datum) cache)
133+
(plist-put info :internal-references cache)
134+
id))))
135135
(funcall orig-fun datum info)))
136136
#+end_src
137137

0 commit comments

Comments
 (0)