rouge 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/lib/rouge/cli.rb +15 -0
- data/lib/rouge/demos/matlab +6 -0
- data/lib/rouge/demos/ocaml +12 -0
- data/lib/rouge/demos/scala +3 -0
- data/lib/rouge/demos/sml +4 -0
- data/lib/rouge/demos/vb +4 -0
- data/lib/rouge/formatters/html.rb +13 -17
- data/lib/rouge/formatters/terminal256.rb +2 -2
- data/lib/rouge/lexer.rb +12 -14
- data/lib/rouge/lexers/coffeescript.rb +2 -4
- data/lib/rouge/lexers/common_lisp.rb +2 -4
- data/lib/rouge/lexers/erlang.rb +4 -13
- data/lib/rouge/lexers/factor.rb +25 -24
- data/lib/rouge/lexers/gherkin.rb +6 -6
- data/lib/rouge/lexers/groovy.rb +1 -2
- data/lib/rouge/lexers/haml.rb +2 -2
- data/lib/rouge/lexers/haskell.rb +18 -20
- data/lib/rouge/lexers/http.rb +13 -12
- data/lib/rouge/lexers/ini.rb +1 -2
- data/lib/rouge/lexers/java.rb +1 -2
- data/lib/rouge/lexers/lua.rb +1 -1
- data/lib/rouge/lexers/make.rb +4 -5
- data/lib/rouge/lexers/markdown.rb +4 -12
- data/lib/rouge/lexers/matlab.rb +71 -0
- data/lib/rouge/lexers/matlab/builtins.rb +10 -0
- data/lib/rouge/lexers/nginx.rb +3 -4
- data/lib/rouge/lexers/objective_c.rb +1 -1
- data/lib/rouge/lexers/ocaml.rb +109 -0
- data/lib/rouge/lexers/perl.rb +2 -5
- data/lib/rouge/lexers/php.rb +5 -5
- data/lib/rouge/lexers/php/builtins.rb +4 -2
- data/lib/rouge/lexers/puppet.rb +1 -2
- data/lib/rouge/lexers/python.rb +5 -11
- data/lib/rouge/lexers/racket.rb +1 -3
- data/lib/rouge/lexers/ruby.rb +8 -8
- data/lib/rouge/lexers/rust.rb +3 -3
- data/lib/rouge/lexers/sass/common.rb +4 -4
- data/lib/rouge/lexers/scala.rb +141 -0
- data/lib/rouge/lexers/scheme.rb +1 -3
- data/lib/rouge/lexers/sed.rb +4 -4
- data/lib/rouge/lexers/shell.rb +1 -2
- data/lib/rouge/lexers/smalltalk.rb +6 -7
- data/lib/rouge/lexers/sml.rb +236 -6
- data/lib/rouge/lexers/tex.rb +1 -4
- data/lib/rouge/lexers/toml.rb +1 -2
- data/lib/rouge/lexers/vb.rb +162 -0
- data/lib/rouge/lexers/viml.rb +1 -1
- data/lib/rouge/lexers/yaml.rb +10 -11
- data/lib/rouge/regex_lexer.rb +77 -92
- data/lib/rouge/token.rb +3 -3
- data/lib/rouge/util.rb +4 -4
- data/lib/rouge/version.rb +1 -1
- metadata +13 -4
data/lib/rouge/token.rb
CHANGED
data/lib/rouge/util.rb
CHANGED
@@ -72,14 +72,14 @@ module Rouge
|
|
72
72
|
def starts_block(block_state)
|
73
73
|
@block_state = block_state
|
74
74
|
@block_indentation = @last_indentation || ''
|
75
|
-
|
76
|
-
|
75
|
+
puts " starts_block #{block_state.inspect}" if @debug
|
76
|
+
puts " block_indentation: #{@block_indentation.inspect}" if @debug
|
77
77
|
end
|
78
78
|
|
79
79
|
# handle a single indented line
|
80
80
|
def indentation(indent_str)
|
81
|
-
|
82
|
-
|
81
|
+
puts " indentation #{indent_str.inspect}" if @debug
|
82
|
+
puts " block_indentation: #{@block_indentation.inspect}" if @debug
|
83
83
|
@last_indentation = indent_str
|
84
84
|
|
85
85
|
# if it's an indent and we know where to go next,
|
data/lib/rouge/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rouge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Rouge aims to a be a simple, easy-to-extend drop-in replacement for pygments.
|
15
15
|
email:
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- lib/rouge/lexers/php/builtins.rb
|
52
52
|
- lib/rouge/lexers/nginx.rb
|
53
53
|
- lib/rouge/lexers/llvm.rb
|
54
|
+
- lib/rouge/lexers/scala.rb
|
54
55
|
- lib/rouge/lexers/perl.rb
|
55
56
|
- lib/rouge/lexers/groovy.rb
|
56
57
|
- lib/rouge/lexers/sed.rb
|
@@ -71,6 +72,7 @@ files:
|
|
71
72
|
- lib/rouge/lexers/tcl.rb
|
72
73
|
- lib/rouge/lexers/tex.rb
|
73
74
|
- lib/rouge/lexers/gherkin.rb
|
75
|
+
- lib/rouge/lexers/vb.rb
|
74
76
|
- lib/rouge/lexers/rust.rb
|
75
77
|
- lib/rouge/lexers/ini.rb
|
76
78
|
- lib/rouge/lexers/scss.rb
|
@@ -99,8 +101,11 @@ files:
|
|
99
101
|
- lib/rouge/lexers/cpp.rb
|
100
102
|
- lib/rouge/lexers/sql.rb
|
101
103
|
- lib/rouge/lexers/haskell.rb
|
104
|
+
- lib/rouge/lexers/matlab.rb
|
105
|
+
- lib/rouge/lexers/matlab/builtins.rb
|
102
106
|
- lib/rouge/lexers/r.rb
|
103
107
|
- lib/rouge/lexers/markdown.rb
|
108
|
+
- lib/rouge/lexers/ocaml.rb
|
104
109
|
- lib/rouge/lexers/prolog.rb
|
105
110
|
- lib/rouge/lexers/conf.rb
|
106
111
|
- lib/rouge.rb
|
@@ -123,6 +128,7 @@ files:
|
|
123
128
|
- lib/rouge/demos/perl
|
124
129
|
- lib/rouge/demos/prolog
|
125
130
|
- lib/rouge/demos/r
|
131
|
+
- lib/rouge/demos/scala
|
126
132
|
- lib/rouge/demos/viml
|
127
133
|
- lib/rouge/demos/haskell
|
128
134
|
- lib/rouge/demos/css
|
@@ -146,6 +152,7 @@ files:
|
|
146
152
|
- lib/rouge/demos/groovy
|
147
153
|
- lib/rouge/demos/sml
|
148
154
|
- lib/rouge/demos/nginx
|
155
|
+
- lib/rouge/demos/vb
|
149
156
|
- lib/rouge/demos/toml
|
150
157
|
- lib/rouge/demos/gherkin
|
151
158
|
- lib/rouge/demos/http
|
@@ -161,7 +168,9 @@ files:
|
|
161
168
|
- lib/rouge/demos/objective_c
|
162
169
|
- lib/rouge/demos/sql
|
163
170
|
- lib/rouge/demos/puppet
|
171
|
+
- lib/rouge/demos/matlab
|
164
172
|
- lib/rouge/demos/ini
|
173
|
+
- lib/rouge/demos/ocaml
|
165
174
|
- lib/rouge/demos/scheme
|
166
175
|
- lib/rouge/demos/diff
|
167
176
|
homepage: http://github.com/jayferd/rouge
|
@@ -172,17 +181,17 @@ rdoc_options: []
|
|
172
181
|
require_paths:
|
173
182
|
- lib
|
174
183
|
required_ruby_version: !ruby/object:Gem::Requirement
|
184
|
+
none: false
|
175
185
|
requirements:
|
176
186
|
- - ! '>='
|
177
187
|
- !ruby/object:Gem::Version
|
178
188
|
version: '0'
|
179
|
-
none: false
|
180
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
|
+
none: false
|
181
191
|
requirements:
|
182
192
|
- - ! '>='
|
183
193
|
- !ruby/object:Gem::Version
|
184
194
|
version: '0'
|
185
|
-
none: false
|
186
195
|
requirements: []
|
187
196
|
rubyforge_project: rouge
|
188
197
|
rubygems_version: 1.8.23
|