mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[html-text] dedupe gnc:html-text-render-markup-noclose
dedupe the following fns * gnc:html-text-render-markup-noclose * gnc:html-text-render-markup
This commit is contained in:
parent
39a7584e79
commit
c5f232755b
@ -221,34 +221,21 @@
|
||||
(gnc:html-style-table-uncompile (gnc:html-text-style p))
|
||||
retval))
|
||||
|
||||
;; XXX It would be better to merge this with the original html-text-render-markup below it,
|
||||
;; but that would require a fair amount of work to refactor so that it works correctly.
|
||||
(define (gnc:html-text-render-markup-noclose doc markup attrib end-tag? . entities)
|
||||
(let* ((retval '())
|
||||
(push (lambda (l) (set! retval (cons l retval)))))
|
||||
(push (gnc:html-document-markup-start doc markup end-tag? attrib))
|
||||
(for-each
|
||||
(for-each
|
||||
(lambda (elt)
|
||||
(cond ((procedure? elt)
|
||||
(push (elt doc)))
|
||||
(#t
|
||||
(push (gnc:html-document-render-data doc elt)))))
|
||||
(cond
|
||||
((procedure? elt) (push (elt doc)))
|
||||
(else (push (gnc:html-document-render-data doc elt)))))
|
||||
entities)
|
||||
retval))
|
||||
|
||||
(define (gnc:html-text-render-markup doc markup attrib end-tag? . entities)
|
||||
(let* ((retval '())
|
||||
(let* ((retval (apply gnc:html-text-render-markup-noclose doc markup
|
||||
attrib end-tag? entities))
|
||||
(push (lambda (l) (set! retval (cons l retval)))))
|
||||
(push (gnc:html-document-markup-start doc markup end-tag? attrib))
|
||||
(for-each
|
||||
(lambda (elt)
|
||||
(cond ((procedure? elt)
|
||||
(push (elt doc)))
|
||||
(#t
|
||||
(push (gnc:html-document-render-data doc elt)))))
|
||||
entities)
|
||||
(if end-tag?
|
||||
(push (gnc:html-document-markup-end doc markup)))
|
||||
(if end-tag? (push (gnc:html-document-markup-end doc markup)))
|
||||
retval))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user