It looks like my original patch was never integrated. The code below makes tangling multi-line variable work by using Lua's multi-line string syntax ([=[ ... ]=]) instead of the python-like but invalid """.
Likewise, it doesn't change the single line behavior.
Testing is pretty straightforward: pass a multi-line variable in as a header argument, tangle the file and try to load it. Before == syntax error and after == code loads and runs.
Thx.
--Brad
diff --git a/lisp/ob-lua.el b/lisp/ob-lua.el
index 6b438b4f9..70d328ecf 100644
--- a/lisp/ob-lua.el
+++ b/lisp/ob-lua.el
@@ -148,7 +148,7 @@ specifying a variable of the same value."
(if (eq var 'hline)
org-babel-lua-hline-to
(format
- (if (and (stringp var) (string-match "[\n\r]" var)) "\"\"%S\"\"" "%S")
+ (if (and (stringp var) (string-match "[\n\r]" var)) "[=[%s]=]" "%S")
(if (stringp var) (substring-no-properties var) var)))))
(defun org-babel-lua-table-or-string (results)