mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
chibi doc fixes for irregex manual
This commit is contained in:
parent
4a06997978
commit
05ca40fa51
3 changed files with 12 additions and 7 deletions
|
@ -36,4 +36,14 @@
|
||||||
" line"))
|
" line"))
|
||||||
(ansi->sxml
|
(ansi->sxml
|
||||||
"plain \x1B;[4munder \x1B;[31mred\x1B;[39m line\x1B;[24m"))
|
"plain \x1B;[4munder \x1B;[31mred\x1B;[39m line\x1B;[24m"))
|
||||||
|
(test '(code "(" "string?" " "
|
||||||
|
(span (@ (class . "string")) "\"hello\"")
|
||||||
|
")")
|
||||||
|
(expand-docs '(scheme "(string? \"hello\")")
|
||||||
|
(make-default-doc-env)))
|
||||||
|
(test '(code "(" "string?" " "
|
||||||
|
(span (@ (class . "string")) "\"<hello>\"")
|
||||||
|
")")
|
||||||
|
(expand-docs '(scheme "(string? \"<hello>\")")
|
||||||
|
(make-default-doc-env)))
|
||||||
(test-end))))
|
(test-end))))
|
||||||
|
|
|
@ -267,6 +267,8 @@
|
||||||
(url . ,expand-url)
|
(url . ,expand-url)
|
||||||
(hyperlink . ,expand-hyperlink)
|
(hyperlink . ,expand-hyperlink)
|
||||||
(rawcode . code)
|
(rawcode . code)
|
||||||
|
(pre . pre)
|
||||||
|
(bibitem . ,(lambda (x env) '())) ;; TODO: bibtex
|
||||||
(code . ,expand-code)
|
(code . ,expand-code)
|
||||||
(codeblock . ,expand-codeblock)
|
(codeblock . ,expand-codeblock)
|
||||||
(ccode
|
(ccode
|
||||||
|
|
|
@ -121,10 +121,6 @@
|
||||||
(cond
|
(cond
|
||||||
((eof-object? c) (reverse-list->string ls))
|
((eof-object? c) (reverse-list->string ls))
|
||||||
((eqv? c term) (reverse-list->string (cons c ls)))
|
((eqv? c term) (reverse-list->string (cons c ls)))
|
||||||
((eqv? c #\<) (read-escaped in term `(#\; #\t #\l #\& ,@ls)))
|
|
||||||
;;((eqv? c #\>) (read-escaped in term `(#\; #\t #\g #\& ,@ls)))
|
|
||||||
((eqv? c #\&) (read-escaped in term `(#\; #\p #\m #\a #\& ,@ls)))
|
|
||||||
((eqv? c #\\) (read-escaped in term (cons (read-char in) (cons c ls))))
|
|
||||||
(else (read-escaped in term (cons c ls))))))
|
(else (read-escaped in term (cons c ls))))))
|
||||||
|
|
||||||
(define (read-to-eol in ls)
|
(define (read-to-eol in ls)
|
||||||
|
@ -134,9 +130,6 @@
|
||||||
((eqv? c #\newline) (reverse-list->string (cons c ls)))
|
((eqv? c #\newline) (reverse-list->string (cons c ls)))
|
||||||
(else (read-to-eol in (cons c ls))))))
|
(else (read-to-eol in (cons c ls))))))
|
||||||
|
|
||||||
(define (html-escape str)
|
|
||||||
(call-with-input-string str (lambda (in) (read-escaped in #f '()))))
|
|
||||||
|
|
||||||
(define (collect str res)
|
(define (collect str res)
|
||||||
(if (pair? str) (cons (reverse-list->string str) res) res))
|
(if (pair? str) (cons (reverse-list->string str) res) res))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue