Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.8pit.net/skribilo-mdoc.git
1;; This file provides a package for describing man pages using 2;; Skribilo. While currently, markup writers for the defined 3;; markup are only implemented for the mdoc engine, these 4;; markups could also be used with different engines. For example, 5;; with an engine implementing the legacy man(7) markup. 6;; 7;; See https://man.openbsd.org/man.7 8 9(define-module (skribilo package man)10 #:use-module (skribilo utils keywords)11 #:use-module (skribilo utils syntax)12 #:use-module (skribilo lib)13 #:use-module (skribilo ast)14 #:use-module (skribilo engine))1516(skribilo-module-syntax)1718;; Markup for inserting the name of the current man page.19(define-markup (man-name :rest ignored)20 (new markup21 (loc &invocation-location)22 (markup 'man-name)))2324(define-markup (man-flags :rest flags)25 (new markup26 (markup 'man-flags)27 (loc &invocation-location)28 (body29 ;; TODO: Filter out deliminters such as `|`.30 ;; See the MACRO SYNTAX section in mdoc(7).31 (the-body flags))))3233;; The .Ar macro34(define-markup (man-arg :rest args)35 (new markup36 (markup 'man-arg)37 (loc &invocation-location)38 (body (the-body args))))3940;; The .Op macro41(define-markup (man-opt :rest args)42 (new markup43 (markup 'man-opt)44 (loc &invocation-location)45 (body (the-body args))))