Skip to content

Commit

Permalink
Align prototype clojure source namespace with Fabricate convention
Browse files Browse the repository at this point in the history
  • Loading branch information
respatialized committed Dec 11, 2024
1 parent acbc713 commit 7611938
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns site.fabricate.prototype.document.clojure
(ns site.fabricate.prototype.source.clojure
"Fabricate namespace defining methods for turning Clojure namespaces into Hiccup documents"
(:require [hiccup2.core :as hiccup]
[rewrite-clj.parser :as parser]
Expand All @@ -23,6 +23,7 @@
;; server-side syntax highlighting

(def form-map-schema
"Schema describing a simplified way of storing Clojure forms and their potential results."
(m/schema [:map
[:clojure/source
{:description "Source of the expression as a string"} :string]
Expand All @@ -36,6 +37,7 @@
{:description "Results of evaluation" :optional true} :any]]))

(defn node->map
"Convert the given rewrite-clj node into a form map."
[n m]
(let [src-info (reduce-kv (fn [mm k v]
(assoc mm (keyword "clojure.source" (name k)) v))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns site.fabricate.prototype.document.clojure-test
(ns site.fabricate.prototype.source.clojure-test
(:require [clojure.test :as t]
[babashka.fs :as fs]
[malli.core :as m]
Expand Down

0 comments on commit 7611938

Please sign in to comment.