rouge 3.6.0 → 3.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rouge/demos/ada +26 -0
  3. data/lib/rouge/demos/cuda +11 -0
  4. data/lib/rouge/demos/gdscript +18 -0
  5. data/lib/rouge/demos/hocon +8 -0
  6. data/lib/rouge/demos/mason +22 -0
  7. data/lib/rouge/demos/opentype_feature_file +6 -0
  8. data/lib/rouge/demos/reasonml +12 -0
  9. data/lib/rouge/demos/sas +13 -0
  10. data/lib/rouge/formatters/tex.rb +3 -0
  11. data/lib/rouge/guessers/disambiguation.rb +4 -0
  12. data/lib/rouge/lexers/ada.rb +162 -0
  13. data/lib/rouge/lexers/cuda.rb +35 -0
  14. data/lib/rouge/lexers/escape.rb +3 -0
  15. data/lib/rouge/lexers/gdscript.rb +171 -0
  16. data/lib/rouge/lexers/gherkin.rb +4 -2
  17. data/lib/rouge/lexers/graphql.rb +10 -3
  18. data/lib/rouge/lexers/handlebars.rb +14 -3
  19. data/lib/rouge/lexers/hocon.rb +86 -0
  20. data/lib/rouge/lexers/html.rb +2 -2
  21. data/lib/rouge/lexers/igorpro.rb +1 -1
  22. data/lib/rouge/lexers/json.rb +43 -5
  23. data/lib/rouge/lexers/mason.rb +115 -0
  24. data/lib/rouge/lexers/ocaml.rb +12 -48
  25. data/lib/rouge/lexers/ocaml/common.rb +53 -0
  26. data/lib/rouge/lexers/opentype_feature_file.rb +113 -0
  27. data/lib/rouge/lexers/php.rb +31 -9
  28. data/lib/rouge/lexers/php/builtins.rb +181 -174
  29. data/lib/rouge/lexers/reasonml.rb +65 -0
  30. data/lib/rouge/lexers/rust.rb +12 -9
  31. data/lib/rouge/lexers/sas.rb +563 -0
  32. data/lib/rouge/lexers/smarty.rb +10 -10
  33. data/lib/rouge/tex_theme_renderer.rb +3 -0
  34. data/lib/rouge/themes/magritte.rb +1 -1
  35. data/lib/rouge/themes/thankful_eyes.rb +1 -1
  36. data/lib/rouge/themes/tulip.rb +1 -1
  37. data/lib/rouge/version.rb +1 -1
  38. data/rouge.gemspec +0 -1
  39. metadata +19 -2
@@ -64,18 +64,18 @@ module Rouge
64
64
  rule %r/#[a-zA-Z_]\w*#/, Name::Variable
65
65
  rule %r/\$[a-zA-Z_]\w*(\.\w+)*/, Name::Variable
66
66
  rule %r/(true|false|null)\b/, Keyword::Constant
67
- rule %r/[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?/, Num
68
- rule %r/"(\\.|.)*?"/, Str::Double
67
+ rule %r/[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?/, Num
68
+ rule %r/"(\\.|.)*?"/, Str::Double
69
69
  rule %r/'(\\.|.)*?'/, Str::Single
70
- rule %r/([a-zA-Z_]\w*)/ do |m|
71
- if self.class.builtins.include? m[0]
72
- token Name::Builtin
73
- else
74
- token Name::Attribute
75
- end
76
- end
77
- end
78
70
 
71
+ rule %r/([a-zA-Z_]\w*)/ do |m|
72
+ if self.class.builtins.include? m[0]
73
+ token Name::Builtin
74
+ else
75
+ token Name::Attribute
76
+ end
77
+ end
78
+ end
79
79
  end
80
80
  end
81
81
  end
@@ -1,3 +1,6 @@
1
+ # -*- coding: utf-8 -*- #
2
+ # frozen_string_literal: true
3
+
1
4
  module Rouge
2
5
  class TexThemeRenderer
3
6
  def initialize(theme, opts={})
@@ -32,7 +32,7 @@ module Rouge
32
32
  # style Generic::Prompt, :fg => :chilly, :bold => true
33
33
 
34
34
  style Comment, :fg => :dragon, :italic => true
35
- style Comment::Preproc, :fg => :chocolate, :bold => true, :italic => true
35
+ style Comment::Preproc, :fg => :chocolate, :bold => true
36
36
  style Error, :fg => :eggshell, :bg => :cherry
37
37
  style Generic::Error, :fg => :cherry, :italic => true, :bold => true
38
38
  style Keyword, :fg => :royal, :bold => true
@@ -29,7 +29,7 @@ module Rouge
29
29
  style Generic::Prompt, :fg => :chilly, :bold => true
30
30
 
31
31
  style Comment, :fg => :cool_as_ice, :italic => true
32
- style Comment::Preproc, :fg => :go_get_it, :bold => true, :italic => true
32
+ style Comment::Preproc, :fg => :go_get_it, :bold => true
33
33
  style Error, :fg => :aluminum1, :bg => :scarletred2
34
34
  style Generic::Error, :fg => :scarletred2, :italic => true, :bold => true
35
35
  style Keyword, :fg => :sandy, :bold => true
@@ -24,7 +24,7 @@ module Rouge
24
24
  style Text, :fg => :white, :bg => :dark_purple
25
25
 
26
26
  style Comment, :fg => :gray, :italic => true
27
- style Comment::Preproc, :fg => :lgreen, :bold => true, :italic => true
27
+ style Comment::Preproc, :fg => :lgreen, :bold => true
28
28
  style Error,
29
29
  Generic::Error, :fg => :white, :bg => :red
30
30
  style Keyword, :fg => :yellow, :bold => true
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Rouge
5
5
  def self.version
6
- "3.6.0"
6
+ "3.7.0"
7
7
  end
8
8
  end
@@ -13,7 +13,6 @@ Gem::Specification.new do |s|
13
13
  for pygments.
14
14
  desc
15
15
  s.homepage = "http://rouge.jneen.net/"
16
- s.rubyforge_project = "rouge"
17
16
  s.files = Dir['Gemfile', 'LICENSE', 'rouge.gemspec', 'lib/**/*.rb', 'lib/**/*.yml', 'bin/rougify', 'lib/rouge/demos/*']
18
17
  s.executables = %w(rougify)
19
18
  s.licenses = ['MIT', 'BSD-2-Clause']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rouge
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeanine Adkisson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-09 00:00:00.000000000 Z
11
+ date: 2019-07-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rouge aims to a be a simple, easy-to-extend drop-in replacement for pygments.
14
14
  email:
@@ -25,6 +25,7 @@ files:
25
25
  - lib/rouge/cli.rb
26
26
  - lib/rouge/demos/abap
27
27
  - lib/rouge/demos/actionscript
28
+ - lib/rouge/demos/ada
28
29
  - lib/rouge/demos/apache
29
30
  - lib/rouge/demos/apiblueprint
30
31
  - lib/rouge/demos/applescript
@@ -47,6 +48,7 @@ files:
47
48
  - lib/rouge/demos/crystal
48
49
  - lib/rouge/demos/csharp
49
50
  - lib/rouge/demos/css
51
+ - lib/rouge/demos/cuda
50
52
  - lib/rouge/demos/d
51
53
  - lib/rouge/demos/dart
52
54
  - lib/rouge/demos/diff
@@ -62,6 +64,7 @@ files:
62
64
  - lib/rouge/demos/factor
63
65
  - lib/rouge/demos/fortran
64
66
  - lib/rouge/demos/fsharp
67
+ - lib/rouge/demos/gdscript
65
68
  - lib/rouge/demos/gherkin
66
69
  - lib/rouge/demos/glsl
67
70
  - lib/rouge/demos/go
@@ -73,6 +76,7 @@ files:
73
76
  - lib/rouge/demos/handlebars
74
77
  - lib/rouge/demos/haskell
75
78
  - lib/rouge/demos/hcl
79
+ - lib/rouge/demos/hocon
76
80
  - lib/rouge/demos/html
77
81
  - lib/rouge/demos/http
78
82
  - lib/rouge/demos/hylang
@@ -102,6 +106,7 @@ files:
102
106
  - lib/rouge/demos/magik
103
107
  - lib/rouge/demos/make
104
108
  - lib/rouge/demos/markdown
109
+ - lib/rouge/demos/mason
105
110
  - lib/rouge/demos/mathematica
106
111
  - lib/rouge/demos/matlab
107
112
  - lib/rouge/demos/moonscript
@@ -114,6 +119,7 @@ files:
114
119
  - lib/rouge/demos/objective_c
115
120
  - lib/rouge/demos/ocaml
116
121
  - lib/rouge/demos/openedge
122
+ - lib/rouge/demos/opentype_feature_file
117
123
  - lib/rouge/demos/pascal
118
124
  - lib/rouge/demos/perl
119
125
  - lib/rouge/demos/php
@@ -132,8 +138,10 @@ files:
132
138
  - lib/rouge/demos/qml
133
139
  - lib/rouge/demos/r
134
140
  - lib/rouge/demos/racket
141
+ - lib/rouge/demos/reasonml
135
142
  - lib/rouge/demos/ruby
136
143
  - lib/rouge/demos/rust
144
+ - lib/rouge/demos/sas
137
145
  - lib/rouge/demos/sass
138
146
  - lib/rouge/demos/scala
139
147
  - lib/rouge/demos/scheme
@@ -193,6 +201,7 @@ files:
193
201
  - lib/rouge/lexer.rb
194
202
  - lib/rouge/lexers/abap.rb
195
203
  - lib/rouge/lexers/actionscript.rb
204
+ - lib/rouge/lexers/ada.rb
196
205
  - lib/rouge/lexers/apache.rb
197
206
  - lib/rouge/lexers/apache/keywords.yml
198
207
  - lib/rouge/lexers/apiblueprint.rb
@@ -216,6 +225,7 @@ files:
216
225
  - lib/rouge/lexers/crystal.rb
217
226
  - lib/rouge/lexers/csharp.rb
218
227
  - lib/rouge/lexers/css.rb
228
+ - lib/rouge/lexers/cuda.rb
219
229
  - lib/rouge/lexers/d.rb
220
230
  - lib/rouge/lexers/dart.rb
221
231
  - lib/rouge/lexers/diff.rb
@@ -231,6 +241,7 @@ files:
231
241
  - lib/rouge/lexers/factor.rb
232
242
  - lib/rouge/lexers/fortran.rb
233
243
  - lib/rouge/lexers/fsharp.rb
244
+ - lib/rouge/lexers/gdscript.rb
234
245
  - lib/rouge/lexers/gherkin.rb
235
246
  - lib/rouge/lexers/gherkin/keywords.rb
236
247
  - lib/rouge/lexers/glsl.rb
@@ -243,6 +254,7 @@ files:
243
254
  - lib/rouge/lexers/handlebars.rb
244
255
  - lib/rouge/lexers/haskell.rb
245
256
  - lib/rouge/lexers/hcl.rb
257
+ - lib/rouge/lexers/hocon.rb
246
258
  - lib/rouge/lexers/html.rb
247
259
  - lib/rouge/lexers/http.rb
248
260
  - lib/rouge/lexers/hylang.rb
@@ -273,6 +285,7 @@ files:
273
285
  - lib/rouge/lexers/magik.rb
274
286
  - lib/rouge/lexers/make.rb
275
287
  - lib/rouge/lexers/markdown.rb
288
+ - lib/rouge/lexers/mason.rb
276
289
  - lib/rouge/lexers/mathematica.rb
277
290
  - lib/rouge/lexers/mathematica/builtins.rb
278
291
  - lib/rouge/lexers/matlab.rb
@@ -286,7 +299,9 @@ files:
286
299
  - lib/rouge/lexers/nix.rb
287
300
  - lib/rouge/lexers/objective_c.rb
288
301
  - lib/rouge/lexers/ocaml.rb
302
+ - lib/rouge/lexers/ocaml/common.rb
289
303
  - lib/rouge/lexers/openedge.rb
304
+ - lib/rouge/lexers/opentype_feature_file.rb
290
305
  - lib/rouge/lexers/pascal.rb
291
306
  - lib/rouge/lexers/perl.rb
292
307
  - lib/rouge/lexers/php.rb
@@ -306,8 +321,10 @@ files:
306
321
  - lib/rouge/lexers/qml.rb
307
322
  - lib/rouge/lexers/r.rb
308
323
  - lib/rouge/lexers/racket.rb
324
+ - lib/rouge/lexers/reasonml.rb
309
325
  - lib/rouge/lexers/ruby.rb
310
326
  - lib/rouge/lexers/rust.rb
327
+ - lib/rouge/lexers/sas.rb
311
328
  - lib/rouge/lexers/sass.rb
312
329
  - lib/rouge/lexers/sass/common.rb
313
330
  - lib/rouge/lexers/scala.rb