summaryrefslogtreecommitdiffstats
path: root/markup/highlight
AgeCommit message (Collapse)Author
2021-08-23highlight: Add tabindex when code is not highlightedHelder Pereira
2021-07-15markup: Add tabindex="0" to default <pre> wrapperrhymes
Currently the generated `<pre>` element isn't fully accessible as it can't be focused by keyboard users. To make this fully accessible, the attribute `tabindex="0"` should be added to the `<pre>` tag. Closes #7194
2021-06-14Misc config loading fixesBjørn Erik Pedersen
The main motivation behind this is simplicity and correctnes, but the new small config library is also faster: ``` BenchmarkDefaultConfigProvider/Viper-16 252418 4546 ns/op 2720 B/op 30 allocs/op BenchmarkDefaultConfigProvider/Custom-16 450756 2651 ns/op 1008 B/op 6 allocs/op ``` Fixes #8633 Fixes #8618 Fixes #8630 Updates #8591 Closes #6680 Closes #5192
2020-12-16all: Fix minor typosPhil Davis
2020-12-03all: Format code with gofumptBjørn Erik Pedersen
See https://github.com/mvdan/gofumpt
2020-11-20deps: Update to Chroma v0.8.2Bjørn Erik Pedersen
Closes #7970
2020-10-16highlight: Avoid making unnecessary allocationCameron Moore
Avoid creating a local copy of the highlight configuration when no options are passed. Benchmarks of building the docs site: name old time/op new time/op delta DocsSite-2 1.94s ± 4% 1.93s ± 4% ~ (p=0.841 n=5+5) name old alloc/op new alloc/op delta DocsSite-2 666MB ± 1% 656MB ± 0% -1.48% (p=0.008 n=5+5) name old allocs/op new allocs/op delta DocsSite-2 8.85M ± 0% 8.76M ± 0% -1.04% (p=0.029 n=4+4)
2020-09-13markup/highlight: Add support to linkable line anchors on ChromaFernando Jorge Mota
Fixes #7622
2020-02-17markup/highlight: Fix chroma highlightsatotake
* Use chroma.Coalesce * Escape code strings if lexer is nil Fixes #6877 Fixes #6856
2019-12-02markup: Reimplement pygmentsCodefencesGuessSyntaxBjørn Erik Pedersen
Fixes #6565
2019-11-24markup/highlight: Replace the temp for with a dependencyBjørn Erik Pedersen
2019-11-23Minor cleanupsCameron Moore
Use fmt.Fprint were appropriate instead of Fprintf. Remove some unused code.
2019-11-23Add Goldmark as the new default markdown handlerBjørn Erik Pedersen
This commit adds the fast and CommonMark compliant Goldmark as the new default markdown handler in Hugo. If you want to continue using BlackFriday as the default for md/markdown extensions, you can use this configuration: ```toml [markup] defaultMarkdownHandler="blackfriday" ``` Fixes #5963 Fixes #1778 Fixes #6355