[DRE-commits] [ruby-kramdown] 04/06: Put rouge 2.x syntax-highlighter in legacy mode for compatibility (Closes: #833788)

Cédric Boutillier boutil at moszumanska.debian.org
Sat Aug 27 13:38:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository ruby-kramdown.

commit a1a7ddf402ac9320f6d8e48e9871c9bb869e8f26
Author: Cédric Boutillier <boutil at debian.org>
Date:   Sat Aug 27 12:13:36 2016 +0200

    Put rouge 2.x syntax-highlighter in legacy mode for compatibility (Closes: #833788)
---
 debian/patches/rouge2.patch | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/debian/patches/rouge2.patch b/debian/patches/rouge2.patch
index 3db35b1..0b7af26 100644
--- a/debian/patches/rouge2.patch
+++ b/debian/patches/rouge2.patch
@@ -1,7 +1,9 @@
 Description: adapt tests for rouge 2.x
+ Also change the name of formatter to LegacyHTML,
+ as kramdown is not ready yet for rouge 2.x (not in legacy mode)
 Bug: https://github.com/gettalong/kramdown/issues/350
 Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2016-07-04
+Last-Update: 2016-08-27
 
 --- a/test/testcases/block/06_codeblock/rouge/simple.html
 +++ b/test/testcases/block/06_codeblock/rouge/simple.html
@@ -48,3 +50,14 @@ Last-Update: 2016-07-04
      s.add_dependency(%q<stringex>, ["~> 1.5.1"])
    end
  end
+--- a/lib/kramdown/converter/syntax_highlighter/rouge.rb
++++ b/lib/kramdown/converter/syntax_highlighter/rouge.rb
+@@ -27,7 +27,7 @@
+       lexer = ::Rouge::Lexer.find_fancy(lang || opts[:default_lang], text)
+       return nil if opts[:disable] || !lexer
+ 
+-      formatter = (opts.fetch(:formatter, ::Rouge::Formatters::HTML)).new(opts)
++      formatter = (opts.fetch(:formatter, ::Rouge::Formatters::HTMLLegacy)).new(opts)
+       formatter.format(lexer.lex(text))
+     end
+ 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-kramdown.git



More information about the Pkg-ruby-extras-commits mailing list