From c0a20d29bdde5c2abc0debb44bdd2e3c64d83043 Mon Sep 17 00:00:00 2001 From: Phil Estival Date: Fri, 17 Jan 2025 03:48:04 +0100 Subject: [PATCH 08/11] ob-sql: Fix `org-babel-expand-body' returning extra \n * lisp/ob-sql.el: empty prologue or epilogue or expanded variables are no longer replaced by a newline. --- lisp/ob-sql.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el index d407cd7d3..f9a987435 100644 --- a/lisp/ob-sql.el +++ b/lisp/ob-sql.el @@ -150,11 +150,11 @@ (let ((prologue (cdr (assq :prologue params))) (epilogue (cdr (assq :epilogue params)))) (mapconcat 'identity - (list + (delq nil (list prologue (org-babel-sql-expand-vars body (org-babel--get-vars params)) - epilogue) + epilogue)) "\n"))) (defun org-babel-edit-prep:sql (info) -- 2.39.5