Update chroma and make line numbers linkable.

Yet no links will be generated.

Related to #20.
This commit is contained in:
2020-02-29 23:39:09 +05:00
parent 825fd724ff
commit 3f9801b1bd
3 changed files with 12 additions and 2 deletions

View File

@@ -163,7 +163,7 @@ func pasteGETWebInterface(ec echo.Context) error {
style = styles.Fallback
}
// Get HTML formatter.
formatter := chroma.Formatter(htmlfmt.New(htmlfmt.WithLineNumbers(), htmlfmt.LineNumbersInTable()))
formatter := chroma.Formatter(htmlfmt.New(htmlfmt.WithLineNumbers(true), htmlfmt.LineNumbersInTable(true), htmlfmt.LinkableLineNumbers(true, "L")))
if formatter == nil {
formatter = formatters.Fallback
}