M bagatto.janet => bagatto.janet +8 -0
@@ 9,6 9,7 @@
(import src/core)
(import src/writers)
(import src/threads)
+(import src/asciidoctor)
#
# API
@@ 406,6 407,13 @@
[md &keys {:smart smart}]
(multimarkdown/snippet md smart))
+(defn asciidoc->html
+ ```
+ Render an asciidoc string using asciidoctor.
+ ```
+ [ad]
+ (asciidoctor/snippet ad))
+
(defn format
```
A simple wrapper around `string/format` to ease development. If one
A src/asciidoctor.janet => src/asciidoctor.janet +6 -0
@@ 0,0 1,6 @@
+(import sh)
+
+(defn snippet
+ [ad]
+ (->>
+ (sh/$< echo ,(string ad) | asciidoctor -s -)))