mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Whitespace cosmetics
Replace tabs with spaces Align some related lines Remove trailing whitespace
This commit is contained in:
parent
4f5658fc7a
commit
539ef52837
@ -130,19 +130,19 @@
|
||||
(define (gnc:html-document-render doc . rest)
|
||||
(let ((stylesheet (gnc:html-document-style-sheet doc))
|
||||
(headers? (if (null? rest) #f (if (car rest) #t #f)))
|
||||
(style-text (gnc:html-document-style-text doc))
|
||||
)
|
||||
(if stylesheet
|
||||
(style-text (gnc:html-document-style-text doc))
|
||||
)
|
||||
(if stylesheet
|
||||
;; if there's a style sheet, let it do the rendering
|
||||
(gnc:html-style-sheet-render stylesheet doc headers?)
|
||||
|
||||
;; otherwise, do the trivial render.
|
||||
(let* ((retval '())
|
||||
(push (lambda (l) (set! retval (cons l retval))))
|
||||
(objs (gnc:html-document-objects doc))
|
||||
(work-to-do (length objs))
|
||||
(css? (gnc-html-engine-supports-css))
|
||||
(work-done 0)
|
||||
(objs (gnc:html-document-objects doc))
|
||||
(work-to-do (length objs))
|
||||
(css? (gnc-html-engine-supports-css))
|
||||
(work-done 0)
|
||||
(title (gnc:html-document-title doc)))
|
||||
;; compile the doc style
|
||||
(gnc:html-style-table-compile (gnc:html-document-style doc)
|
||||
@ -160,9 +160,9 @@
|
||||
|
||||
(push "<head>\n")
|
||||
(push "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n")
|
||||
(if css?
|
||||
(if style-text
|
||||
(push (list "</style>" style-text "<style type=\"text/css\">\n"))))
|
||||
(if css?
|
||||
(if style-text
|
||||
(push (list "</style>" style-text "<style type=\"text/css\">\n"))))
|
||||
(let ((title (gnc:html-document-title doc)))
|
||||
(if title
|
||||
(push (list "</title>" title "<title>\n"))))
|
||||
@ -175,10 +175,10 @@
|
||||
;; now render the children
|
||||
(for-each
|
||||
(lambda (child)
|
||||
(begin
|
||||
(push (gnc:html-object-render child doc))
|
||||
(set! work-done (+ 1 work-done))
|
||||
(gnc:report-percent-done (* 100 (/ work-done work-to-do)))))
|
||||
(begin
|
||||
(push (gnc:html-object-render child doc))
|
||||
(set! work-done (+ 1 work-done))
|
||||
(gnc:report-percent-done (* 100 (/ work-done work-to-do)))))
|
||||
objs)
|
||||
|
||||
(if (not (null? headers?))
|
||||
@ -186,7 +186,7 @@
|
||||
(push "</body>\n")
|
||||
(push "</html>\n")))
|
||||
|
||||
(gnc:report-finished)
|
||||
(gnc:report-finished)
|
||||
(gnc:html-document-pop-style doc)
|
||||
(gnc:html-style-table-uncompile (gnc:html-document-style doc))
|
||||
|
||||
@ -195,12 +195,12 @@
|
||||
|
||||
(define (gnc:html-document-push-style doc style)
|
||||
(gnc:html-document-set-style-stack!
|
||||
doc (cons style (gnc:html-document-style-stack doc))))
|
||||
doc (cons style (gnc:html-document-style-stack doc))))
|
||||
|
||||
(define (gnc:html-document-pop-style doc)
|
||||
(if (not (null? (gnc:html-document-style-stack doc)))
|
||||
(gnc:html-document-set-style-stack!
|
||||
doc (cdr (gnc:html-document-style-stack doc)))))
|
||||
doc (cdr (gnc:html-document-style-stack doc)))))
|
||||
|
||||
(define (gnc:html-document-add-object! doc obj)
|
||||
(gnc:html-document-set-objects!
|
||||
@ -215,32 +215,32 @@
|
||||
|
||||
(define (gnc:html-document-fetch-markup-style doc markup)
|
||||
(let ((style-info #f)
|
||||
(style-stack (gnc:html-document-style-stack doc)))
|
||||
(if (not (null? style-stack))
|
||||
(set! style-info
|
||||
(style-stack (gnc:html-document-style-stack doc)))
|
||||
(if (not (null? style-stack))
|
||||
(set! style-info
|
||||
(gnc:html-style-table-fetch
|
||||
(car style-stack)
|
||||
(cdr style-stack)
|
||||
markup)))
|
||||
(if (not style-info)
|
||||
(gnc:make-html-markup-style-info)
|
||||
style-info)))
|
||||
(if (not style-info)
|
||||
(gnc:make-html-markup-style-info)
|
||||
style-info)))
|
||||
|
||||
(define (gnc:html-document-fetch-data-style doc markup)
|
||||
(let ((style-info #f)
|
||||
(style-stack (gnc:html-document-style-stack doc)))
|
||||
(if (not (null? (gnc:html-document-style-stack doc)))
|
||||
(set! style-info
|
||||
(style-stack (gnc:html-document-style-stack doc)))
|
||||
(if (not (null? (gnc:html-document-style-stack doc)))
|
||||
(set! style-info
|
||||
(gnc:html-style-table-fetch
|
||||
(car style-stack)
|
||||
(cdr style-stack)
|
||||
markup)))
|
||||
(if (not style-info)
|
||||
(gnc:make-html-data-style-info
|
||||
(lambda (datum parms)
|
||||
(sprintf #f "%a %a" markup datum))
|
||||
#f)
|
||||
style-info)))
|
||||
(if (not style-info)
|
||||
(gnc:make-html-data-style-info
|
||||
(lambda (datum parms)
|
||||
(sprintf #f "%a %a" markup datum))
|
||||
#f)
|
||||
style-info)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; markup-rendering functions : markup-start and markup-end return
|
||||
@ -273,11 +273,11 @@
|
||||
(add-internal-tag (lambda (tag) (push "<") (push tag) (push ">")))
|
||||
(add-attribute
|
||||
(lambda (key value prior)
|
||||
(push " ") (push key)
|
||||
(if value (begin (push "=\"")
|
||||
(push value)
|
||||
(push "\"")))
|
||||
#t))
|
||||
(push " ") (push key)
|
||||
(if value (begin (push "=\"")
|
||||
(push value)
|
||||
(push "\"")))
|
||||
#t))
|
||||
(addextraatt
|
||||
(lambda (attr)
|
||||
(cond ((string? attr) (push " ") (push attr))
|
||||
|
Loading…
Reference in New Issue
Block a user