8.18
gemtext: A text/gemini parser for Racket
| (require gemtext) | package: gemtext | 
text/gemini is the markup language used by the Gemini protocol.
1 Datatypes
struct
(struct gmi-link (url text) #:extra-constructor-name make-gmi-link #:transparent) url : string? text : string? 
struct
(struct gmi-heading (level text) #:extra-constructor-name make-gmi-heading #:transparent) level : exact-positive-integer? text : string? 
struct
(struct gmi-list (items) #:extra-constructor-name make-gmi-list #:transparent) items : (listof string?) 
struct
(struct gmi-blockquote (body) #:extra-constructor-name make-gmi-blockquote #:transparent) body : string? 
struct
(struct gmi-pre (body alt) #:extra-constructor-name make-gmi-pre #:transparent) body : (listof string?) alt : string? 
procedure
(gmi-datum? v) → boolean?
v : any/c 
Defined as:
(define (gmi-datum? v) (or (string? v) (gmi-link? v) (gmi-heading? v) (gmi-list? v) (gmi-blockquote? v) (gmi-pre? v))) 
2 Parsing
procedure
(string->gmi v) → (listof gmi-datum?)
v : string? 
Parse a string into a list of text/gemini elements.