Skip to content

Commit

Permalink
Remove spurious newline in HTML output.
Browse files Browse the repository at this point in the history
Fixes #29.
  • Loading branch information
alecthomas committed Sep 25, 2017
1 parent 022592b commit b0295f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion formatters/html/html.go
Expand Up @@ -137,7 +137,7 @@ func (f *Formatter) writeHTML(w io.Writer, style *chroma.Style, tokens []*chroma
fmt.Fprintf(w, "<body%s>\n", f.styleAttr(css, chroma.Background))
}

fmt.Fprintf(w, "<pre%s>\n", f.styleAttr(css, chroma.Background))
fmt.Fprintf(w, "<pre%s>", f.styleAttr(css, chroma.Background))
lines := splitTokensIntoLines(tokens)
lineDigits := len(fmt.Sprintf("%d", len(lines)))
highlightIndex := 0
Expand Down

0 comments on commit b0295f6

Please sign in to comment.