diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-23 03:36:53 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-23 03:42:57 +0700 |
| commit | 7346cea5b876c99877d156f7d8428442507a5e98 (patch) | |
| tree | 85bd33acb718bbe88746bb922b79ea5508a807b2 /document.go | |
| parent | b1b5b41d62c7e8fee012be72feec7a66e1bb83e7 (diff) | |
| download | asciidoctor-go-7346cea5b876c99877d156f7d8428442507a5e98.tar.xz | |
all: use separate file with go:embed for default CSS
Using separate file allow tracking and modifying the style as needed.
Diffstat (limited to 'document.go')
| -rw-r--r-- | document.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/document.go b/document.go index 1fa88ed..3d8394e 100644 --- a/document.go +++ b/document.go @@ -217,8 +217,9 @@ func (doc *Document) ToHTML(out io.Writer) (err error) { docAttrValue, ok = doc.Attributes.Entry[DocAttrStylesheet] if ok && len(docAttrValue) == 0 { - buf.WriteByte('\n') - buf.WriteString(_defaultCSS) + buf.WriteString("\n<style>\n") + buf.WriteString(DefaultCSS) + buf.WriteString("</style>\n") } fmt.Fprintf(buf, "\n</head>\n<body class=%q>\n", doc.classes.String()) |
