diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el index 136ed39ed..c8479e36d 100644 --- a/lisp/ob-exp.el +++ b/lisp/ob-exp.el @@ -183,27 +183,24 @@ this template." info (org-babel-exp-get-export-buffer)) (nth 1 info))) (goto-char beg-el) - (unless (save-excursion (goto-char (point-at-bol)) - (looking-at "^#\\+")) - (let ((replacement (org-babel-exp-do-export - info 'inline))) - (if (equal replacement "") - ;; Replacement code is empty: completely - ;; remove inline src block, including extra - ;; white space that might have been created - ;; when inserting results. - (delete-region beg-el - (progn (goto-char end-el) - (skip-chars-forward " \t") - (point))) - ;; Otherwise: remove inline src block but - ;; preserve following white spaces. Then - ;; insert value. + (let ((replacement (org-babel-exp-do-export info 'inline))) + (if (equal replacement "") + ;; Replacement code is empty: completely + ;; remove inline src block, including extra + ;; white space that might have been created + ;; when inserting results. (delete-region beg-el (progn (goto-char end-el) - (skip-chars-backward " \t") + (skip-chars-forward " \t") (point))) - (insert replacement)))))) + ;; Otherwise: remove inline src block but + ;; preserve following white spaces. Then + ;; insert value. + (delete-region beg-el + (progn (goto-char end-el) + (skip-chars-backward " \t") + (point))) + (insert replacement))))) ((babel-call inline-babel-call) (let* ((lob-info (org-babel-lob-get-info)) (results diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 5fd1865ad..14b31b27b 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1535,23 +1535,26 @@ INFO is a plist used as a communication channel." (org-html-close-tag "meta" " name=\"generator\" content=\"Org-mode\"" info) "\n" (and (org-string-nw-p author) - (org-html-close-tag "meta" - (format " name=\"author\" content=\"%s\"" - (funcall protect-string author)) - info) - "\n") + (concat + (org-html-close-tag "meta" + (format " name=\"author\" content=\"%s\"" + (funcall protect-string author)) + info) + "\n")) (and (org-string-nw-p description) - (org-html-close-tag "meta" - (format " name=\"description\" content=\"%s\"\n" - (funcall protect-string description)) - info) - "\n") + (concat + (org-html-close-tag "meta" + (format " name=\"description\" content=\"%s\"\n" + (funcall protect-string description)) + info) + "\n")) (and (org-string-nw-p keywords) - (org-html-close-tag "meta" - (format " name=\"keywords\" content=\"%s\"" - (funcall protect-string keywords)) - info) - "\n")))) + (concat + (org-html-close-tag "meta" + (format " name=\"keywords\" content=\"%s\"" + (funcall protect-string keywords)) + info) + "\n"))))) (defun org-html--build-head (info) "Return information for the .. of the HTML output.