"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "markup/highlight/highlight.go" between
hugo-0.85.0.tar.gz and hugo-0.86.0.tar.gz

About: Hugo is a static site generator that takes a source directory of Markdown files and templates and uses these as input to create a complete website (written in Go).

highlight.go  (hugo-0.85.0):highlight.go  (hugo-0.86.0)
skipping to change at line 126 skipping to change at line 126
func getHtmlPreWrapper(language string) html.Option { func getHtmlPreWrapper(language string) html.Option {
return html.WithPreWrapper(getPreWrapper(language)) return html.WithPreWrapper(getPreWrapper(language))
} }
type preWrapper struct { type preWrapper struct {
language string language string
} }
func (p preWrapper) Start(code bool, styleAttr string) string { func (p preWrapper) Start(code bool, styleAttr string) string {
w := &strings.Builder{} w := &strings.Builder{}
fmt.Fprintf(w, "<pre%s>", styleAttr) fmt.Fprintf(w, `<pre tabindex="0"%s>`, styleAttr)
var language string var language string
if code { if code {
language = p.language language = p.language
} }
WriteCodeTag(w, language) WriteCodeTag(w, language)
return w.String() return w.String()
} }
func WriteCodeTag(w io.Writer, language string) { func WriteCodeTag(w io.Writer, language string) {
fmt.Fprint(w, "<code") fmt.Fprint(w, "<code")
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)