Skip to content

Commit

Permalink
Fix eval and replace for nfnl
Browse files Browse the repository at this point in the history
  • Loading branch information
Olical committed Mar 1, 2025
1 parent 87928f0 commit 9ef6528
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 5 additions & 3 deletions fnl/conjure/client/fennel/nfnl.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
(local repl (autoload :conjure.nfnl.repl))
(local fs (autoload :conjure.nfnl.fs))

;; TODO Eval and replace isn't working.

(local M
(define :conjure.client.fennel.nfnl
{:comment-node? ts.lisp-comment-node?
Expand Down Expand Up @@ -88,7 +86,11 @@
(tset package.loaded mod-path (core.merge! mod (core.last results)))))

(when (not (core.empty? result-strs))
(log.append (text.split-lines (str.join "\n" result-strs))))))
(let [result (str.join "\n" result-strs)]
(when opts.on-result
(opts.on-result result))

(log.append (text.split-lines result))))))

(fn M.eval-file [opts]
"Client function, called by Conjure when evaluating a file from disk."
Expand Down
7 changes: 6 additions & 1 deletion lua/conjure/client/fennel/nfnl.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9ef6528

Please sign in to comment.