add comment
Signed-off-by: Superkooka <aymeric.gueracague@gmail.com>
This commit is contained in:
parent
e77693ea96
commit
9d01f74cd5
|
|
@ -1,12 +1,14 @@
|
|||
#!/usr/bin/env janet
|
||||
|
||||
(defn read-from-file [file-path]
|
||||
"Read a file from string filepath"
|
||||
(let [f (file/open file-path :r)
|
||||
content (file/read f :all)]
|
||||
(file/close f)
|
||||
content))
|
||||
|
||||
(defn htmlspecialchars
|
||||
"Convert html special chars from a string"
|
||||
[value]
|
||||
(string/replace-all "\"" """
|
||||
(string/replace-all "'" "'"
|
||||
|
|
@ -61,6 +63,7 @@
|
|||
:main (some (* :block (? :end-of-line)))})
|
||||
|
||||
(defn ast-to-html
|
||||
"Convert an AST to html"
|
||||
[ast]
|
||||
(string/join
|
||||
(map
|
||||
|
|
|
|||
Loading…
Reference in New Issue