> This looks like a copy-paste of `org-element-normalize-string'. > Why not simply calling `org-element-normalize-string'? I changed it at one point, but then changed it back and didn't realize that it was ultimately unchanged. Here's a patch that uses `org-element-normalize-string` instead. > Also, may we move this discussion to Org mailing list? I prefer the > discussions and development to be public (it helps future maintainers). Yes, of course. I think I just forgot to hit "reply all". On Fri, Jun 21, 2024 at 4:47 AM Ihor Radchenko wrote: > Nathan Nichols writes: > > > Subject: [PATCH] Added ability to specify :html-head as a string or > function > > ... > > +(defun org-html-normalize-str (s) > > + "Return S, or evaluate to a string ending with a single newline > character. > > +If S isn't a string or a function, return it unchanged. If S is the > empty > > +string, return it. Otherwise, return a new string with a single > > +newline character at its end." > > + (cond > > + ((not (stringp s)) s) > > + ((string= "" s) "") > > + (t (and (string-match "\\(\n[ \t]*\\)*\\'" s) > > + (replace-match "\n" nil nil s))))) > > This looks like a copy-paste of `org-element-normalize-string'. > Why not simply calling `org-element-normalize-string'? > > Also, may we move this discussion to Org mailing list? I prefer the > discussions and development to be public (it helps future maintainers). > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at >