diff options
Diffstat (limited to 'etc/todo/latex.murphy.rb')
-rw-r--r-- | etc/todo/latex.murphy.rb | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/etc/todo/latex.murphy.rb b/etc/todo/latex.murphy.rb deleted file mode 100644 index 7b48769..0000000 --- a/etc/todo/latex.murphy.rb +++ /dev/null @@ -1,44 +0,0 @@ -module CodeRay -module Encoders - - class Latex < Encoder - - include Streamable - register_for :latex - - FILE_EXTENSION = 'tex' - - ALLTT_ESCAPE = { #:nodoc: - '{' => '\lb', - '}' => '\rb', - '\\' => '\bs', - } - - HTML_ESCAPE_PATTERN = /[\\{}]/ - - protected - - def text_token text, kind - if text =~ /#{HTML_ESCAPE_PATTERN}/o - text = text.gsub(/#{HTML_ESCAPE_PATTERN}/o) { |m| @HTML_ESCAPE[m] } - end - k = Tokens::AbbreviationForKind[kind] - if k == :NO_HIGHLIGHT - text - else - "\\CR#{k}{#{text}}" - end - end - - def open_token kind - "\\CR#{Tokens::AbbreviationForKind[kind]}{" - end - - def close_token kind - "}" - end - - end - -end -end |