mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Merge pull request #868 from arthurgleckler/master
Fix bug: attributes without values didn't work.
This commit is contained in:
commit
b1750cee57
1 changed files with 3 additions and 3 deletions
|
@ -40,11 +40,11 @@
|
|||
(lambda (out) (html-display-escaped-attr (display-to-string str) out))))
|
||||
|
||||
(define (html-attr->string attr)
|
||||
(if (cdr attr)
|
||||
(if (null? (cdr attr))
|
||||
(symbol->string (car attr))
|
||||
(let ((val (if (pair? (cdr attr)) (cadr attr) (cdr attr))))
|
||||
(string-append (symbol->string (car attr))
|
||||
"=\"" (html-escape-attr val) "\""))
|
||||
(symbol->string (car attr))))
|
||||
"=\"" (html-escape-attr val) "\""))))
|
||||
|
||||
(define (html-tag->string tag attrs)
|
||||
(let lp ((ls attrs) (res (list (symbol->string tag) "<")))
|
||||
|
|
Loading…
Add table
Reference in a new issue