From 7d1fbbb347c0f35b92590ed799501e8ba7115156 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Thu, 2 Nov 2023 08:21:45 -0700
Subject: [PATCH] Make --wrap=none work with djot-writer.lua.

Closes #13.
---
 djot-writer.lua | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/djot-writer.lua b/djot-writer.lua
index bf3e041..9dc5943 100644
--- a/djot-writer.lua
+++ b/djot-writer.lua
@@ -445,5 +445,10 @@ function Writer (doc, opts)
     local note = hang(blocks(footnotes[i], blankline), 4, concat{format("[^%d]:",i),space})
     table.insert(notes, note)
   end
-  return layout.render(concat{d, blankline, concat(notes, blankline)}, opts.columns)
+  local formatted = concat{d, blankline, concat(notes, blankline)}
+  if PANDOC_WRITER_OPTIONS.wrap_text == "wrap-none" then
+    return layout.render(formatted)
+  else
+    return layout.render(formatted, opts.columns)
+  end
 end
-- 
2.47.3

