zone.lisp: Support multi-line TXT records.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 3 Apr 2014 16:20:25 +0000 (17:20 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 3 Apr 2014 16:27:52 +0000 (17:27 +0100)
zone.lisp

index 8124b28..909f755 100644 (file)
--- a/zone.lisp
+++ b/zone.lisp
@@ -895,6 +895,8 @@ $TTL ~2@*~D~2%"
   (:method ((type (eql :srv)) data)
     (destructuring-bind (prio weight port host) data
       (list "~2D ~5D ~5D ~A" prio weight port (bind-hostname host))))
-  (:method ((type (eql :txt)) data) (list "~S" (stringify data))))
+  (:method ((type (eql :txt)) data)
+    (cons "~#[\"\"~;~S~:;(~@{~%~8T~S~} )~]"
+         (mapcar #'stringify (listify data)))))
 
 ;;;----- That's all, folks --------------------------------------------------