rouge 2.0.7 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -9
- data/lib/rouge.rb +1 -0
- data/lib/rouge/cli.rb +20 -0
- data/lib/rouge/demos/awk +4 -0
- data/lib/rouge/demos/console +6 -0
- data/lib/rouge/demos/digdag +19 -0
- data/lib/rouge/demos/dot +5 -0
- data/lib/rouge/demos/graphql +17 -0
- data/lib/rouge/demos/hylang +10 -0
- data/lib/rouge/demos/igorpro +9 -0
- data/lib/rouge/demos/irb +4 -0
- data/lib/rouge/demos/irb_output +2 -0
- data/lib/rouge/demos/lasso +12 -0
- data/lib/rouge/demos/mosel +10 -0
- data/lib/rouge/demos/plist +142 -0
- data/lib/rouge/demos/pony +17 -0
- data/lib/rouge/demos/q +2 -0
- data/lib/rouge/demos/sieve +10 -0
- data/lib/rouge/demos/tsx +17 -0
- data/lib/rouge/demos/turtle +0 -0
- data/lib/rouge/demos/wollok +11 -0
- data/lib/rouge/formatters/html_inline.rb +9 -1
- data/lib/rouge/formatters/html_pygments.rb +2 -2
- data/lib/rouge/formatters/html_table.rb +1 -1
- data/lib/rouge/formatters/terminal256.rb +1 -1
- data/lib/rouge/lexer.rb +124 -37
- data/lib/rouge/lexers/abap.rb +2 -2
- data/lib/rouge/lexers/apache.rb +1 -1
- data/lib/rouge/lexers/awk.rb +161 -0
- data/lib/rouge/lexers/clojure.rb +2 -2
- data/lib/rouge/lexers/coffeescript.rb +1 -1
- data/lib/rouge/lexers/console.rb +136 -0
- data/lib/rouge/lexers/csharp.rb +26 -7
- data/lib/rouge/lexers/digdag.rb +72 -0
- data/lib/rouge/lexers/docker.rb +1 -1
- data/lib/rouge/lexers/dot.rb +68 -0
- data/lib/rouge/lexers/elixir.rb +52 -27
- data/lib/rouge/lexers/fortran.rb +56 -28
- data/lib/rouge/lexers/fsharp.rb +1 -1
- data/lib/rouge/lexers/gherkin/keywords.rb +4 -4
- data/lib/rouge/lexers/graphql.rb +243 -0
- data/lib/rouge/lexers/groovy.rb +5 -1
- data/lib/rouge/lexers/haml.rb +19 -24
- data/lib/rouge/lexers/html.rb +48 -4
- data/lib/rouge/lexers/hylang.rb +93 -0
- data/lib/rouge/lexers/igorpro.rb +407 -0
- data/lib/rouge/lexers/irb.rb +66 -0
- data/lib/rouge/lexers/javascript.rb +21 -10
- data/lib/rouge/lexers/json.rb +3 -2
- data/lib/rouge/lexers/json_doc.rb +6 -0
- data/lib/rouge/lexers/jsx.rb +2 -1
- data/lib/rouge/lexers/lasso.rb +217 -0
- data/lib/rouge/lexers/lasso/keywords.yml +446 -0
- data/lib/rouge/lexers/lua.rb +3 -0
- data/lib/rouge/lexers/lua/builtins.rb +1 -1
- data/lib/rouge/lexers/markdown.rb +2 -3
- data/lib/rouge/lexers/matlab/builtins.rb +1 -1
- data/lib/rouge/lexers/moonscript.rb +8 -4
- data/lib/rouge/lexers/mosel.rb +231 -0
- data/lib/rouge/lexers/ocaml.rb +9 -20
- data/lib/rouge/lexers/php.rb +40 -20
- data/lib/rouge/lexers/php/builtins.rb +27 -37
- data/lib/rouge/lexers/plain_text.rb +4 -3
- data/lib/rouge/lexers/plist.rb +49 -0
- data/lib/rouge/lexers/pony.rb +93 -0
- data/lib/rouge/lexers/powershell.rb +36 -0
- data/lib/rouge/lexers/properties.rb +2 -2
- data/lib/rouge/lexers/q.rb +124 -0
- data/lib/rouge/lexers/r.rb +2 -2
- data/lib/rouge/lexers/ruby.rb +26 -13
- data/lib/rouge/lexers/rust.rb +7 -5
- data/lib/rouge/lexers/sed.rb +4 -2
- data/lib/rouge/lexers/shell.rb +38 -16
- data/lib/rouge/lexers/sieve.rb +96 -0
- data/lib/rouge/lexers/sml.rb +3 -2
- data/lib/rouge/lexers/tsx.rb +19 -0
- data/lib/rouge/lexers/turtle.rb +0 -0
- data/lib/rouge/lexers/typescript.rb +3 -27
- data/lib/rouge/lexers/typescript/common.rb +33 -0
- data/lib/rouge/lexers/viml/keywords.rb +2 -2
- data/lib/rouge/lexers/wollok.rb +107 -0
- data/lib/rouge/lexers/xml.rb +1 -1
- data/lib/rouge/lexers/yaml.rb +4 -1
- data/lib/rouge/regex_lexer.rb +1 -0
- data/lib/rouge/template_lexer.rb +3 -5
- data/lib/rouge/theme.rb +14 -4
- data/lib/rouge/themes/igor_pro.rb +20 -0
- data/lib/rouge/themes/pastie.rb +69 -0
- data/lib/rouge/themes/thankful_eyes.rb +8 -5
- data/lib/rouge/version.rb +1 -1
- metadata +40 -6
- data/lib/rouge/demos/shell_session +0 -10
- data/lib/rouge/lexers/shell_session.rb +0 -29
@@ -1,29 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*- #
|
2
|
-
|
3
|
-
module Rouge
|
4
|
-
module Lexers
|
5
|
-
class ShellSession < RegexLexer
|
6
|
-
tag 'shell_session'
|
7
|
-
title "Shell Session"
|
8
|
-
desc 'A generic lexer for shell session and command line'
|
9
|
-
aliases 'terminal', 'console'
|
10
|
-
filenames '*.cap'
|
11
|
-
|
12
|
-
state :root do
|
13
|
-
rule /^([^ \n]*# )([^ \n]*)(.*(\n|$))/ do |m|
|
14
|
-
token Name::Entity, m[1]
|
15
|
-
token Name::Class, m[2]
|
16
|
-
token Keyword::Variable, m[3]
|
17
|
-
end
|
18
|
-
rule /^([^ \n]*\$ )([^ \n]*)(.*(\n|$))/ do |m|
|
19
|
-
token Text::Whitespace, m[1]
|
20
|
-
token Name::Class, m[2]
|
21
|
-
token Keyword::Variable, m[3]
|
22
|
-
end
|
23
|
-
rule /^<...>$/, Comment
|
24
|
-
rule /.*\n/, Text
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
### tag function class label
|