summaryrefslogtreecommitdiff
path: root/document.go
diff options
context:
space:
mode:
Diffstat (limited to 'document.go')
-rw-r--r--document.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/document.go b/document.go
index cfa3eeb..29d589e 100644
--- a/document.go
+++ b/document.go
@@ -203,12 +203,18 @@ func (doc *Document) ToHTML(out io.Writer) (err error) {
fmt.Fprintf(buf, "\n<title>%s</title>", title)
}
+ var ok bool
+
+ _, ok = doc.Attributes.Entry[docAttrStylesheet]
+ if ok {
+ buf.WriteByte('\n')
+ buf.WriteString(_defaultCSS)
+ }
+
fmt.Fprintf(buf, "\n</head>\n<body class=%q>\n", doc.classes.String())
- var (
- isWithHeaderFooter = true
- ok bool
- )
+ var isWithHeaderFooter = true
+
_, ok = doc.Attributes.Entry[docAttrNoHeaderFooter]
if ok {
isWithHeaderFooter = false