~technomancy/fennel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] use fennelview in comment special to keep tables in comments

Details
Message ID
<20210728183804.5669-1-andreyorst@gmail.com>
DKIM signature
pass
Download raw message
Patch: +1 -1
---
 src/fennel/specials.fnl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fennel/specials.fnl b/src/fennel/specials.fnl
index 8d74bd9..171b302 100644
--- a/src/fennel/specials.fnl
+++ b/src/fennel/specials.fnl
@@ -720,7 +720,7 @@ Method name doesn't have to be known at compile-time; if it is, use
(fn SPECIALS.comment [ast _ parent]
  (let [els []]
    (for [i 2 (length ast)]
      (table.insert els (pick-values 1 (: (tostring (. ast i)) :gsub "\n" " "))))
      (table.insert els (pick-values 1 (view (. ast i) {:one-line? true}))))
    (compiler.emit parent (.. "-- " (table.concat els " ")) ast)))

(doc-special :comment ["..."] "Comment which will be emitted in Lua output." true)
-- 
2.31.1
Details
Message ID
<877dh6dudz.fsf@mntre-builder>
In-Reply-To
<20210728183804.5669-1-andreyorst@gmail.com> (view parent)
DKIM signature
permerror
Download raw message
Thanks! Applied this.

-Phil
Reply to thread Export thread (mbox)