diff options
author | Stan Hu <stanhu@gmail.com> | 2015-09-10 23:38:43 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-09-10 23:38:43 +0300 |
commit | e20529cec4f6de0c2c1589da99abb8714ea1c1c1 (patch) | |
tree | c5553355f8bf7c22ba5c6c7de1f3dbec2ffc1976 /config | |
parent | 3223a2a5ae477d82784998359f895ccddef42e1d (diff) |
Bump rouge to 1.10.1
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/rouge_diff_lexer.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/config/initializers/rouge_diff_lexer.rb b/config/initializers/rouge_diff_lexer.rb deleted file mode 100644 index fdb2d7b748e..00000000000 --- a/config/initializers/rouge_diff_lexer.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Here until https://github.com/jneen/rouge/pull/297 is merged into Rouge and the gem is updated in GitLab. -module Rouge - module Lexers - class Diff - def self.analyze_text(text) - return 1 if text.start_with?('Index: ') - return 1 if text.start_with?('diff ') - return 0.9 if text.start_with?('--- ') - end - - state :root do - rule(/^ .*\n/, Text) - rule(/^---\n/, Text) - rule(/^\+.*\n/, Generic::Inserted) - rule(/^-+.*\n/, Generic::Deleted) - rule(/^!.*\n/, Generic::Strong) - rule(/^@.*\n/, Generic::Subheading) - rule(/^([Ii]ndex|diff).*\n/, Generic::Heading) - rule(/^=.*\n/, Generic::Heading) - rule(/.*\n/, Text) - end - end - end -end |