don't escape html in sxml-display-as-text, add newline after li (issue #592)

This commit is contained in:
Alex Shinn 2019-12-26 22:49:18 +08:00
parent d79f557d46
commit 588d63d901
3 changed files with 12 additions and 11 deletions

View file

@ -15,12 +15,12 @@
;;> where clauses can be any of: ;;> where clauses can be any of:
;;> ;;>
;;> \itemlist[ ;;> \itemlist[
;;> \item[\scheme{(@ <opt-spec>)} - option spec, described below] ;;> \item{\scheme{(@ <opt-spec>)} - option spec, described below}
;;> \item[\scheme{(begin: <begin-proc>)} - procedure to run before main] ;;> \item{\scheme{(begin: <begin-proc>)} - procedure to run before main}
;;> \item[\scheme{(end: <end-proc>)} - procedure to run after main] ;;> \item{\scheme{(end: <end-proc>)} - procedure to run after main}
;;> \item[\scheme{(<proc> args ...)} - main procedure (args only for documentation)] ;;> \item{\scheme{(<proc> args ...)} - main procedure (args only for documentation)}
;;> \item[\scheme{<app-spec>} - a subcommand described by the nested spec] ;;> \item{\scheme{<app-spec>} - a subcommand described by the nested spec}
;;> \item[\scheme{(or <app-spec> ...)} - an alternate list of subcommands] ;;> \item{\scheme{(or <app-spec> ...)} - an alternate list of subcommands}
;;> ] ;;> ]
;;> ;;>
;;> For subcommands the symbolic command name must match, though it is ;;> For subcommands the symbolic command name must match, though it is
@ -40,7 +40,7 @@
;;> ;;>
;;> \itemlist[ ;;> \itemlist[
;;> \item{\scheme{boolean} - boolean, associated value optional, allowing \scheme{--noname} to indicate \scheme{#false}} ;;> \item{\scheme{boolean} - boolean, associated value optional, allowing \scheme{--noname} to indicate \scheme{#false}}
;;> \item{[\scheme{char} - a single character} ;;> \item{\scheme{char} - a single character}
;;> \item{\scheme{integer} - an exact integer} ;;> \item{\scheme{integer} - an exact integer}
;;> \item{\scheme{real} - any real number} ;;> \item{\scheme{real} - any real number}
;;> \item{\scheme{number} - any real or complex number} ;;> \item{\scheme{number} - any real or complex number}

View file

@ -146,9 +146,9 @@
(if (and (pair? (cdr sxml)) (eq? '@ (cadr sxml))) (if (and (pair? (cdr sxml)) (eq? '@ (cadr sxml)))
(cddr sxml) (cddr sxml)
(cdr sxml))) (cdr sxml)))
(if (memq tag '(p br h1 h2 h3 h4 h5 h6)) (if (memq tag '(p li br h1 h2 h3 h4 h5 h6))
(newline out))) (newline out)))
(else (else
(for-each lp sxml))))) (for-each lp sxml)))))
((null? sxml)) ((null? sxml))
(else (html-display-escaped-string sxml out)))))) (else (display sxml out))))))

View file

@ -55,7 +55,7 @@
;; parse the command-line ;; parse the command-line
(let lp ((args (cdr (command-line))) (let lp ((args (cdr (command-line)))
(render #f)) (render sxml-display-as-text))
(cond (cond
((and (pair? args) (not (equal? "" (car args))) ((and (pair? args) (not (equal? "" (car args)))
(eqv? #\- (string-ref (car args) 0))) (eqv? #\- (string-ref (car args) 0)))
@ -66,4 +66,5 @@
((-) (run (cdr args) render)) ((-) (run (cdr args) render))
(else (die "unknown option: " (car args))))) (else (die "unknown option: " (car args)))))
(else (else
(run args render)))) (run args render)))
(newline))