File: 0002-fix-liquid-tokenizer.patch

package info (click to toggle)
ruby-jekyll-toc 0.19.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 256 kB
  • sloc: ruby: 912; makefile: 9
file content (26 lines) | stat: -rw-r--r-- 1,251 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Fix tests for Liquid Tokenizer API change
Author: Simon Quigley <tsimonq2@debian.org>
Origin: vendor
Forwarded: not-needed
Last-Update: 2026-03-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/test/test_toc_tag.rb
+++ b/test/test_toc_tag.rb
@@ -16,14 +16,14 @@ class TestTableOfContentsTag < Minitest:
                                      page: @stubbed_context2.new({ 'toc' => false }, '<h1>test</h1>'),
                                      site: @stubbed_context1.new({ 'toc' => nil })
                                    })
-    tag = Jekyll::TocTag.parse('toc_tag', '', Tokenizer.new(''), ParseContext.new)
+    tag = Jekyll::TocTag.parse('toc_tag', '', ParseContext.new.new_tokenizer(""), ParseContext.new)
 
     assert_equal(%(<ul id="toc" class="section-nav">\n<li class="toc-entry toc-h1"><a href="#test">test</a></li>\n</ul>), tag.render(context))
   end
 
   def test_toc_tag_returns_empty_string
     context = @stubbed_context.new({ page: { 'toc' => false } })
-    tag = Jekyll::TocTag.parse('toc_tag', '', Tokenizer.new(''), ParseContext.new)
+    tag = Jekyll::TocTag.parse('toc_tag', '', ParseContext.new.new_tokenizer(""), ParseContext.new)
 
     assert_empty tag.render(context)
   end