Skip to content

Commit

Permalink
Drop support for highlighting by Emacs
Browse files Browse the repository at this point in the history
It seems that htmlize isn't maintained.
  • Loading branch information
kou committed Oct 30, 2023
1 parent c1b2673 commit 5b21312
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 163 deletions.
121 changes: 0 additions & 121 deletions lib/rabbit/parser/ext/emacs.rb

This file was deleted.

12 changes: 0 additions & 12 deletions lib/rabbit/parser/rd/ext/block-verbatim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
require "rabbit/parser/ext/blockdiag"
require "rabbit/parser/ext/charty"
require "rabbit/parser/ext/coderay"
require "rabbit/parser/ext/emacs"
require "rabbit/parser/ext/enscript"
require "rabbit/parser/ext/rouge"
require "rabbit/parser/ext/tex"
Expand Down Expand Up @@ -120,17 +119,6 @@ def ext_block_verb_coderay(label, source, content, visitor)
result || default_ext_block_verbatim(label, src, src, visitor)
end

def ext_block_verb_emacs(label, source, content, visitor)
return nil unless /\Aemacs(?:\s+(.+))?\z/i =~ label
mode_line = $1

src, prop = parse_source(source)
logger = visitor.logger

result = Parser::Ext::Emacs.highlight(src, logger, mode_line)
result || default_ext_block_verbatim(label, src, src, visitor)
end

def ext_block_verb_rt(label, source, content, visitor)
return nil unless /\Art\z/i =~ label
unless defined?(RT2RabbitVisitor)
Expand Down
6 changes: 0 additions & 6 deletions lib/rabbit/parser/wiki/output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
require "rabbit/parser/ext/aafigure"
require "rabbit/parser/ext/blockdiag"
require "rabbit/parser/ext/coderay"
require "rabbit/parser/ext/emacs"
require "rabbit/parser/ext/entity"
require "rabbit/parser/ext/rouge"

Expand Down Expand Up @@ -530,11 +529,6 @@ def coderay(lang, source)
Ext::CodeRay.highlight(lang, source, logger)
end

def emacs(source, mode_line=nil)
logger = @output.canvas.logger
Ext::Emacs.highlight(source, logger, mode_line)
end

def rouge(lang, source)
logger = @output.canvas.logger
Ext::Rouge.highlight(lang, source, logger)
Expand Down
12 changes: 0 additions & 12 deletions sample/rabbit-en.rd
Original file line number Diff line number Diff line change
Expand Up @@ -328,18 +328,6 @@ The following is source code:

End of source code.

= Source: Emacs

The following is source code:

# emacs # -*- ruby -*-
# comment
def method_name
body
end

End of source code.

= Source: Rouge

The following is source code:
Expand Down
12 changes: 0 additions & 12 deletions sample/rabbit.rd
Original file line number Diff line number Diff line change
Expand Up @@ -337,18 +337,6 @@ URL先の画像をダウンロード

以上がソース

= ソース: Emacs

以下がソース

# emacs # -*- ruby -*-
# comment
def method_name
body
end

以上がソース

= ソース: Rouge

以下がソース
Expand Down

0 comments on commit 5b21312

Please sign in to comment.