diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-02-14 13:27:17 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-02-15 10:37:14 +0100 |
commit | ea54a99ca5c4ed9e66574553f6c057fb83d0aca3 (patch) | |
tree | 7d8b7db9e798635f8fe84df5ee56d3401e6dd966 /markup/highlight/highlight_test.go | |
parent | 9563c7d13b157612b01a9d108c134c407126b328 (diff) |
deps: Update github.com/alecthomas/chroma v0.9.4 => v0.10.0
Diffstat (limited to 'markup/highlight/highlight_test.go')
-rw-r--r-- | markup/highlight/highlight_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/markup/highlight/highlight_test.go b/markup/highlight/highlight_test.go index f68df629a..53e53b1d9 100644 --- a/markup/highlight/highlight_test.go +++ b/markup/highlight/highlight_test.go @@ -43,7 +43,7 @@ User-Agent: foo h := New(cfg) result, _ := h.Highlight(`echo "Hugo Rocks!"`, "bash", "") - c.Assert(result, qt.Equals, `<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="nb">echo</span> <span class="s2">"Hugo Rocks!"</span></code></pre></div>`) + c.Assert(result, qt.Equals, `<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">"Hugo Rocks!"</span></span></span></code></pre></div>`) result, _ = h.Highlight(`echo "Hugo Rocks!"`, "unknown", "") c.Assert(result, qt.Equals, `<pre tabindex="0"><code class="language-unknown" data-lang="unknown">echo "Hugo Rocks!"</code></pre>`) }) @@ -58,7 +58,7 @@ User-Agent: foo c.Assert(result, qt.Contains, "<span class=\"hl\"><span class=\"lnt\">4") result, _ = h.Highlight(lines, "bash", "linenos=inline,hl_lines=2") - c.Assert(result, qt.Contains, "<span class=\"ln\">2</span>LINE2\n</span>") + c.Assert(result, qt.Contains, "<span class=\"ln\">2</span><span class=\"cl\">LINE2\n</span></span>") c.Assert(result, qt.Not(qt.Contains), "<table") result, _ = h.Highlight(lines, "bash", "linenos=true,hl_lines=2") @@ -101,7 +101,7 @@ User-Agent: foo h := New(cfg) result, _ := h.Highlight(lines, "bash", "") - c.Assert(result, qt.Contains, "<span class=\"ln\">2</span>LINE2\n<") + c.Assert(result, qt.Contains, "<span class=\"cl\">LINE2\n</span></span>") result, _ = h.Highlight(lines, "bash", "linenos=table") c.Assert(result, qt.Contains, "<span class=\"lnt\">1\n</span>") }) @@ -125,7 +125,7 @@ User-Agent: foo h := New(cfg) result, _ := h.Highlight(lines, "", "") - c.Assert(result, qt.Contains, "<span class=\"ln\">2</span>LINE2\n<") + c.Assert(result, qt.Contains, "<span class=\"cl\">LINE2\n</span></span>") }) c.Run("No language, Escape HTML string", func(c *qt.C) { |