|
From: | Nathan Nichols |
Subject: | Re: [PATCH] Ability to specify :html-head as a function |
Date: | Fri, 21 Jun 2024 15:21:05 -0400 |
Nathan Nichols <nathannichols454@gmail.com> 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 <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
0001-Added-ability-to-specify-html-head-as-a-string-or-fu.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |