~subsetpark/bagatto

6f5172252df74f20d71ff897abcd5a0d0a288681 — Zach Smith 4 months ago ca7adfe asciidoc
Basic asciidoc support
2 files changed, 14 insertions(+), 0 deletions(-)

M bagatto.janet
A src/asciidoctor.janet
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 -)))