summaryrefslogtreecommitdiffstats
path: root/markup/highlight
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-11-18 09:53:31 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-11-19 11:55:30 +0100
commitbcb62d8911a744be368c3c0dd1426fb5b0a37553 (patch)
treea5387b9a2852469140dbc88ce77ed50fb2f1286d /markup/highlight
parent00fe7e0408fe1571388608f358faf7dacb9cbaaf (diff)
deps: Upgrade github.com/alecthomas/chroma/v2 v2.4.0
Diffstat (limited to 'markup/highlight')
-rw-r--r--markup/highlight/config.go2
-rw-r--r--markup/highlight/highlight_test.go3
2 files changed, 2 insertions, 3 deletions
diff --git a/markup/highlight/config.go b/markup/highlight/config.go
index d55958d35..9013dd072 100644
--- a/markup/highlight/config.go
+++ b/markup/highlight/config.go
@@ -95,7 +95,7 @@ func (cfg Config) ToHTMLOptions() []html.Option {
html.BaseLineNumber(cfg.LineNoStart),
html.LineNumbersInTable(cfg.LineNumbersInTable),
html.WithClasses(!cfg.NoClasses),
- html.LinkableLineNumbers(cfg.AnchorLineNos, lineAnchors),
+ html.WithLinkableLineNumbers(cfg.AnchorLineNos, lineAnchors),
html.InlineCode(cfg.Hl_inline),
}
diff --git a/markup/highlight/highlight_test.go b/markup/highlight/highlight_test.go
index 53e53b1d9..662f07c93 100644
--- a/markup/highlight/highlight_test.go
+++ b/markup/highlight/highlight_test.go
@@ -86,8 +86,7 @@ User-Agent: foo
h := New(cfg)
result, _ := h.Highlight(lines, "bash", "")
- // From Chroma v0.8.2 this is linkable: https://github.com/alecthomas/chroma/commit/ab61726cdb54d5a98b6efe7ed76af6aa0698ab4a
- c.Assert(result, qt.Contains, "<span class=\"lnt\" id=\"2\"><a style=\"outline: none; text-decoration:none; color:inherit\" href=\"#2\">2</a>\n</span>")
+ c.Assert(result, qt.Contains, "<span class=\"lnt\" id=\"2\"><a class=\"lnlinks\" href=\"#2\">2</a>\n</span>")
result, _ = h.Highlight(lines, "bash", "lineanchors=test")
result, _ = h.Highlight(lines, "bash", "anchorlinenos=false,hl_lines=2")
c.Assert(result, qt.Not(qt.Contains), "id=\"2\"")