rouge 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rouge/lexers/ruby.rb +6 -3
- data/lib/rouge/themes/base16.rb +25 -25
- data/lib/rouge/themes/colorful.rb +48 -48
- data/lib/rouge/themes/github.rb +61 -61
- data/lib/rouge/version.rb +1 -1
- metadata +2 -2
data/lib/rouge/lexers/ruby.rb
CHANGED
@@ -196,8 +196,11 @@ module Rouge
|
|
196
196
|
mixin :has_heredocs
|
197
197
|
|
198
198
|
rule /[A-Z][a-zA-Z0-9_]+/, Name::Constant, :method_call
|
199
|
-
rule /(\.|::)([a-z_]\w*[!?]?|[*%&^`~+-\/\[<>=])
|
200
|
-
Name::Function
|
199
|
+
rule /(\.|::)([a-z_]\w*[!?]?|[*%&^`~+-\/\[<>=])/ do
|
200
|
+
groups Punctuation, Name::Function
|
201
|
+
push :expr_start
|
202
|
+
end
|
203
|
+
|
201
204
|
rule /[a-zA-Z_]\w*[?!]/, Name, :expr_start
|
202
205
|
rule /[a-zA-Z_]\w*/, Name, :method_call
|
203
206
|
rule /\[|\]|\*\*|<<?|>>?|>=|<=|<=>|=~|={3}|!~|&&?|\|\||\.{1,3}/,
|
@@ -290,7 +293,7 @@ module Rouge
|
|
290
293
|
groups Punctuation, Operator
|
291
294
|
pop!
|
292
295
|
end
|
293
|
-
rule /\(/,
|
296
|
+
rule /\(/, Punctuation, :defexpr
|
294
297
|
mixin :root
|
295
298
|
end
|
296
299
|
|
data/lib/rouge/themes/base16.rb
CHANGED
@@ -35,48 +35,48 @@ module Rouge
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def self.make_dark!
|
38
|
-
style
|
38
|
+
style Text, :fg => :base05, :bg => :base00
|
39
39
|
end
|
40
40
|
|
41
41
|
def self.make_light!
|
42
|
-
style
|
42
|
+
style Text, :fg => :base02
|
43
43
|
end
|
44
44
|
|
45
45
|
light!
|
46
46
|
|
47
|
-
style
|
48
|
-
style
|
47
|
+
style Error, :fg => :base00, :bg => :base08
|
48
|
+
style Comment, :fg => :base03
|
49
49
|
|
50
|
-
style
|
51
|
-
|
50
|
+
style Comment::Preproc,
|
51
|
+
Name::Tag, :fg => :base0A
|
52
52
|
|
53
|
-
style
|
54
|
-
|
53
|
+
style Operator,
|
54
|
+
Punctuation, :fg => :base05
|
55
55
|
|
56
|
-
style
|
57
|
-
style
|
58
|
-
style
|
56
|
+
style Generic::Inserted, :fg => :base0B
|
57
|
+
style Generic::Deleted, :fg => :base08
|
58
|
+
style Generic::Heading, :fg => :base0D, :bg => :base00, :bold => true
|
59
59
|
|
60
|
-
style
|
61
|
-
style
|
62
|
-
|
60
|
+
style Keyword, :fg => :base0E
|
61
|
+
style Keyword::Constant,
|
62
|
+
Keyword::Type, :fg => :base09
|
63
63
|
|
64
|
-
style
|
64
|
+
style Keyword::Declaration, :fg => :base09
|
65
65
|
|
66
|
-
style
|
67
|
-
style
|
66
|
+
style Literal::String, :fg => :base0B
|
67
|
+
style Literal::String::Regex, :fg => :base0C
|
68
68
|
|
69
|
-
style
|
70
|
-
|
69
|
+
style Literal::String::Interpol,
|
70
|
+
Literal::String::Escape, :fg => :base0F
|
71
71
|
|
72
|
-
style
|
73
|
-
|
74
|
-
|
72
|
+
style Name::Namespace,
|
73
|
+
Name::Class,
|
74
|
+
Name::Constant, :fg => :base0A
|
75
75
|
|
76
|
-
style
|
76
|
+
style Name::Attribute, :fg => :base0D
|
77
77
|
|
78
|
-
style
|
79
|
-
|
78
|
+
style Literal::Number,
|
79
|
+
Literal::String::Symbol, :fg => :base0B
|
80
80
|
|
81
81
|
class Solarized < Base16
|
82
82
|
name 'base16.solarized'
|
@@ -4,62 +4,62 @@ module Rouge
|
|
4
4
|
class Colorful < CSSTheme
|
5
5
|
name 'colorful'
|
6
6
|
|
7
|
-
style
|
7
|
+
style Text, :fg => "#bbbbbb", :bg => '#000'
|
8
8
|
|
9
|
-
style
|
10
|
-
style
|
11
|
-
style
|
9
|
+
style Comment, :fg => "#888"
|
10
|
+
style Comment::Preproc, :fg => "#579"
|
11
|
+
style Comment::Special, :fg => "#cc0000", :bold => true
|
12
12
|
|
13
|
-
style
|
14
|
-
style
|
15
|
-
style
|
13
|
+
style Keyword, :fg => "#080", :bold => true
|
14
|
+
style Keyword::Pseudo, :fg => "#038"
|
15
|
+
style Keyword::Type, :fg => "#339"
|
16
16
|
|
17
|
-
style
|
18
|
-
style
|
17
|
+
style Operator, :fg => "#333"
|
18
|
+
style Operator::Word, :fg => "#000", :bold => true
|
19
19
|
|
20
|
-
style
|
21
|
-
style
|
22
|
-
style
|
23
|
-
style
|
24
|
-
style
|
25
|
-
style
|
26
|
-
style
|
27
|
-
style
|
28
|
-
style
|
29
|
-
style
|
30
|
-
style
|
31
|
-
style
|
32
|
-
style
|
33
|
-
style
|
34
|
-
style
|
20
|
+
style Name::Builtin, :fg => "#007020"
|
21
|
+
style Name::Function, :fg => "#06B", :bold => true
|
22
|
+
style Name::Class, :fg => "#B06", :bold => true
|
23
|
+
style Name::Namespace, :fg => "#0e84b5", :bold => true
|
24
|
+
style Name::Exception, :fg => "#F00", :bold => true
|
25
|
+
style Name::Variable, :fg => "#963"
|
26
|
+
style Name::Variable::Instance, :fg => "#33B"
|
27
|
+
style Name::Variable::Class, :fg => "#369"
|
28
|
+
style Name::Variable::Global, :fg => "#d70", :bold => true
|
29
|
+
style Name::Constant, :fg => "#036", :bold => true
|
30
|
+
style Name::Label, :fg => "#970", :bold => true
|
31
|
+
style Name::Entity, :fg => "#800", :bold => true
|
32
|
+
style Name::Attribute, :fg => "#00C"
|
33
|
+
style Name::Tag, :fg => "#070"
|
34
|
+
style Name::Decorator, :fg => "#555", :bold => true
|
35
35
|
|
36
|
-
style
|
37
|
-
style
|
38
|
-
style
|
39
|
-
style
|
40
|
-
style
|
41
|
-
style
|
42
|
-
style
|
43
|
-
style
|
36
|
+
style Literal::String, :bg => "#fff0f0"
|
37
|
+
style Literal::String::Char, :fg => "#04D"
|
38
|
+
style Literal::String::Doc, :fg => "#D42"
|
39
|
+
style Literal::String::Interpol, :bg => "#eee"
|
40
|
+
style Literal::String::Escape, :fg => "#666", :bold => true
|
41
|
+
style Literal::String::Regex, :fg => "#000", :bg => "#fff0ff"
|
42
|
+
style Literal::String::Symbol, :fg => "#A60"
|
43
|
+
style Literal::String::Other, :fg => "#D20"
|
44
44
|
|
45
|
-
style
|
46
|
-
style
|
47
|
-
style
|
48
|
-
style
|
49
|
-
style
|
45
|
+
style Literal::Number, :fg => "#60E", :bold => true
|
46
|
+
style Literal::Number::Integer, :fg => "#00D", :bold => true
|
47
|
+
style Literal::Number::Float, :fg => "#60E", :bold => true
|
48
|
+
style Literal::Number::Hex, :fg => "#058", :bold => true
|
49
|
+
style Literal::Number::Oct, :fg => "#40E", :bold => true
|
50
50
|
|
51
|
-
style
|
52
|
-
style
|
53
|
-
style
|
54
|
-
style
|
55
|
-
style
|
56
|
-
style
|
57
|
-
style
|
58
|
-
style
|
59
|
-
style
|
60
|
-
style
|
51
|
+
style Generic::Heading, :fg => "#000080", :bold => true
|
52
|
+
style Generic::Subheading, :fg => "#800080", :bold => true
|
53
|
+
style Generic::Deleted, :fg => "#A00000"
|
54
|
+
style Generic::Inserted, :fg => "#00A000"
|
55
|
+
style Generic::Error, :fg => "#FF0000"
|
56
|
+
style Generic::Emph, :italic => true
|
57
|
+
style Generic::Strong, :bold => true
|
58
|
+
style Generic::Prompt, :fg => "#c65d09", :bold => true
|
59
|
+
style Generic::Output, :fg => "#888"
|
60
|
+
style Generic::Traceback, :fg => "#04D"
|
61
61
|
|
62
|
-
style
|
62
|
+
style Error, :fg => "#F00", :bg => "#FAA"
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
data/lib/rouge/themes/github.rb
CHANGED
@@ -3,67 +3,67 @@ module Rouge
|
|
3
3
|
class Github < CSSTheme
|
4
4
|
name 'github'
|
5
5
|
|
6
|
-
style
|
7
|
-
style
|
8
|
-
style
|
9
|
-
style
|
10
|
-
style
|
11
|
-
style
|
12
|
-
style
|
13
|
-
style
|
14
|
-
style
|
15
|
-
style
|
16
|
-
style
|
17
|
-
style
|
18
|
-
style
|
19
|
-
style
|
20
|
-
style
|
21
|
-
style
|
22
|
-
style
|
23
|
-
style
|
24
|
-
style
|
25
|
-
style
|
26
|
-
style
|
27
|
-
style
|
28
|
-
style
|
29
|
-
style
|
30
|
-
style
|
31
|
-
style
|
32
|
-
style
|
33
|
-
style
|
34
|
-
style
|
35
|
-
style
|
36
|
-
style
|
37
|
-
style
|
38
|
-
style
|
39
|
-
style
|
40
|
-
style
|
41
|
-
style
|
42
|
-
style
|
43
|
-
style
|
44
|
-
style
|
45
|
-
style
|
46
|
-
style
|
47
|
-
style
|
48
|
-
style
|
49
|
-
style
|
50
|
-
style
|
51
|
-
style
|
52
|
-
style
|
53
|
-
style
|
54
|
-
style
|
55
|
-
style
|
56
|
-
style
|
57
|
-
style
|
58
|
-
style
|
59
|
-
style
|
60
|
-
style
|
61
|
-
style
|
62
|
-
style
|
63
|
-
style
|
64
|
-
style
|
65
|
-
style
|
66
|
-
style
|
6
|
+
style Comment::Multiline, :fg => '#999988', :italic => true
|
7
|
+
style Comment::Preproc, :fg => '#999999', :bold => true
|
8
|
+
style Comment::Single, :fg => '#999988', :italic => true
|
9
|
+
style Comment::Special, :fg => '#999999', :italic => true, :bold => true
|
10
|
+
style Comment, :fg => '#999988', :italic => true
|
11
|
+
style Error, :fg => '#a61717', :bg => '#e3d2d2'
|
12
|
+
style Generic::Deleted, :fg => '#000000', :bg => '#ffdddd'
|
13
|
+
style Generic::Emph, :fg => '#000000', :italic => true
|
14
|
+
style Generic::Error, :fg => '#aa0000'
|
15
|
+
style Generic::Heading, :fg => '#999999'
|
16
|
+
style Generic::Inserted, :fg => '#000000', :bg => '#ddffdd'
|
17
|
+
style Generic::Output, :fg => '#888888'
|
18
|
+
style Generic::Prompt, :fg => '#555555'
|
19
|
+
style Generic::Strong, :bold => true
|
20
|
+
style Generic::Subheading, :fg => '#aaaaaa'
|
21
|
+
style Generic::Traceback, :fg => '#aa0000'
|
22
|
+
style Keyword::Constant, :fg => '#000000', :bold => true
|
23
|
+
style Keyword::Declaration, :fg => '#000000', :bold => true
|
24
|
+
style Keyword::Namespace, :fg => '#000000', :bold => true
|
25
|
+
style Keyword::Pseudo, :fg => '#000000', :bold => true
|
26
|
+
style Keyword::Reserved, :fg => '#000000', :bold => true
|
27
|
+
style Keyword::Type, :fg => '#445588', :bold => true
|
28
|
+
style Keyword, :fg => '#000000', :bold => true
|
29
|
+
style Literal::Number::Float, :fg => '#009999'
|
30
|
+
style Literal::Number::Hex, :fg => '#009999'
|
31
|
+
style Literal::Number::Integer::Long, :fg => '#009999'
|
32
|
+
style Literal::Number::Integer, :fg => '#009999'
|
33
|
+
style Literal::Number::Oct, :fg => '#009999'
|
34
|
+
style Literal::Number, :fg => '#009999'
|
35
|
+
style Literal::String::Backtick, :fg => '#d14'
|
36
|
+
style Literal::String::Char, :fg => '#d14'
|
37
|
+
style Literal::String::Doc, :fg => '#d14'
|
38
|
+
style Literal::String::Double, :fg => '#d14'
|
39
|
+
style Literal::String::Escape, :fg => '#d14'
|
40
|
+
style Literal::String::Heredoc, :fg => '#d14'
|
41
|
+
style Literal::String::Interpol, :fg => '#d14'
|
42
|
+
style Literal::String::Other, :fg => '#d14'
|
43
|
+
style Literal::String::Regex, :fg => '#009926'
|
44
|
+
style Literal::String::Single, :fg => '#d14'
|
45
|
+
style Literal::String::Symbol, :fg => '#990073'
|
46
|
+
style Literal::String, :fg => '#d14'
|
47
|
+
style Name::Attribute, :fg => '#008080'
|
48
|
+
style Name::Builtin::Pseudo, :fg => '#999999'
|
49
|
+
style Name::Builtin, :fg => '#0086B3'
|
50
|
+
style Name::Class, :fg => '#445588', :bold => true
|
51
|
+
style Name::Constant, :fg => '#008080'
|
52
|
+
style Name::Decorator, :fg => '#3c5d5d', :bold => true
|
53
|
+
style Name::Entity, :fg => '#800080'
|
54
|
+
style Name::Exception, :fg => '#990000', :bold => true
|
55
|
+
style Name::Function, :fg => '#990000', :bold => true
|
56
|
+
style Name::Label, :fg => '#990000', :bold => true
|
57
|
+
style Name::Namespace, :fg => '#555555'
|
58
|
+
style Name::Tag, :fg => '#000080'
|
59
|
+
style Name::Variable::Class, :fg => '#008080'
|
60
|
+
style Name::Variable::Global, :fg => '#008080'
|
61
|
+
style Name::Variable::Instance, :fg => '#008080'
|
62
|
+
style Name::Variable, :fg => '#008080'
|
63
|
+
style Operator::Word, :fg => '#000000', :bold => true
|
64
|
+
style Operator, :fg => '#000000', :bold => true
|
65
|
+
style Text::Whitespace, :fg => '#bbbbbb'
|
66
|
+
style Text, :bg => '#f8f8f8'
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
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: 0.5.
|
4
|
+
version: 0.5.1
|
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-09-
|
12
|
+
date: 2013-09-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
type: :runtime
|