rouge 3.7.0 → 3.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/rouge/demos/armasm +12 -0
- data/lib/rouge/demos/batchfile +3 -0
- data/lib/rouge/demos/bbcbasic +6 -0
- data/lib/rouge/demos/cmhg +8 -0
- data/lib/rouge/demos/cython +6 -0
- data/lib/rouge/demos/epp +4 -0
- data/lib/rouge/demos/msgtrans +4 -0
- data/lib/rouge/demos/plist +1 -132
- data/lib/rouge/formatters/html_line_table.rb +3 -1
- data/lib/rouge/formatters/tex.rb +11 -12
- data/lib/rouge/guessers/disambiguation.rb +8 -0
- data/lib/rouge/lexers/armasm.rb +145 -0
- data/lib/rouge/lexers/batchfile.rb +164 -0
- data/lib/rouge/lexers/bbcbasic.rb +112 -0
- data/lib/rouge/lexers/cmhg.rb +34 -0
- data/lib/rouge/lexers/console.rb +1 -1
- data/lib/rouge/lexers/cpp.rb +4 -1
- data/lib/rouge/lexers/cython.rb +151 -0
- data/lib/rouge/lexers/epp.rb +51 -0
- data/lib/rouge/lexers/json.rb +1 -1
- data/lib/rouge/lexers/julia.rb +1 -1
- data/lib/rouge/lexers/make.rb +39 -12
- data/lib/rouge/lexers/msgtrans.rb +26 -0
- data/lib/rouge/lexers/plain_text.rb +1 -1
- data/lib/rouge/lexers/puppet.rb +2 -2
- data/lib/rouge/lexers/r.rb +2 -3
- data/lib/rouge/lexers/sed.rb +1 -1
- data/lib/rouge/tex_theme_renderer.rb +2 -1
- data/lib/rouge/themes/magritte.rb +2 -2
- data/lib/rouge/version.rb +1 -1
- data/rouge.gemspec +4 -2
- metadata +21 -5
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Rouge
|
5
|
+
module Lexers
|
6
|
+
class MsgTrans < RegexLexer
|
7
|
+
title "MessageTrans"
|
8
|
+
desc "RISC OS message translator messages file"
|
9
|
+
tag 'msgtrans'
|
10
|
+
filenames 'Messages', 'Message[0-9]', 'Message[1-9][0-9]', 'Message[1-9][0-9][0-9]'
|
11
|
+
|
12
|
+
state :root do
|
13
|
+
rule %r/^#[^\n]*/, Comment
|
14
|
+
rule %r/[^\t\n\r ,):?\/]+/, Name::Variable
|
15
|
+
rule %r/[\n\/?]/, Operator
|
16
|
+
rule %r/:/, Operator, :value
|
17
|
+
end
|
18
|
+
|
19
|
+
state :value do
|
20
|
+
rule %r/\n/, Text, :pop!
|
21
|
+
rule %r/%[0-3%]/, Operator
|
22
|
+
rule %r/[^\n%]/, Literal::String
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/rouge/lexers/puppet.rb
CHANGED
@@ -59,7 +59,7 @@ module Rouge
|
|
59
59
|
rule cap_id, Name::Class
|
60
60
|
|
61
61
|
rule %r/[+=|~-]>|<[|~-]/, Punctuation
|
62
|
-
rule %r/[
|
62
|
+
rule %r/[|:}();\[\]]/, Punctuation
|
63
63
|
|
64
64
|
# HACK for case statements and selectors
|
65
65
|
rule %r/{/, Punctuation, :regex_allowed
|
@@ -68,7 +68,7 @@ module Rouge
|
|
68
68
|
rule %r/(in|and|or)\b/, Operator::Word
|
69
69
|
rule %r/[=!<>]=/, Operator
|
70
70
|
rule %r/[=!]~/, Operator, :regex_allowed
|
71
|
-
rule %r([
|
71
|
+
rule %r([.=<>!+*/-]), Operator
|
72
72
|
|
73
73
|
rule %r/(class|include)(\s*)(#{qualname})/ do
|
74
74
|
groups Keyword, Text, Name::Class
|
data/lib/rouge/lexers/r.rb
CHANGED
@@ -60,8 +60,7 @@ module Rouge
|
|
60
60
|
rule %r/%[^%]*?%/, Operator
|
61
61
|
|
62
62
|
rule %r/0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/, Num::Hex
|
63
|
-
rule %r/[+-]?(\d+([.]\d+)?|[.]\d+)([eE][+-]?\d+)?[Li]?/,
|
64
|
-
Num
|
63
|
+
rule %r/[+-]?(\d+([.]\d+)?|[.]\d+)([eE][+-]?\d+)?[Li]?/, Num
|
65
64
|
|
66
65
|
# Only recognize built-in functions when they are actually used as a
|
67
66
|
# function call, i.e. followed by an opening parenthesis.
|
@@ -69,7 +68,7 @@ module Rouge
|
|
69
68
|
# highlighted specifically; thus use `Name::Function`.
|
70
69
|
rule %r/\b(?<!.)(#{PRIMITIVE_FUNCTIONS.join('|')})(?=\()/, Name::Function
|
71
70
|
|
72
|
-
rule %r/[
|
71
|
+
rule %r/(?:(?:[[:alpha:]]|[.][._[:alpha:]])[._[:alnum:]]*)|[.]/ do |m|
|
73
72
|
if KEYWORDS.include? m[0]
|
74
73
|
token Keyword
|
75
74
|
elsif KEYWORD_CONSTANTS.include? m[0]
|
data/lib/rouge/lexers/sed.rb
CHANGED
@@ -113,7 +113,8 @@ END
|
|
113
113
|
end
|
114
114
|
|
115
115
|
def render_style(tok, style, &b)
|
116
|
-
out =
|
116
|
+
out = String.new('')
|
117
|
+
out << "\\expandafter\\def#{token_name(tok)}#1{"
|
117
118
|
out << "\\fboxsep=0pt\\colorbox{#{palette_name(style[:bg])}}{" if style[:bg]
|
118
119
|
out << '\\textbf{' if style[:bold]
|
119
120
|
out << '\\textit{' if style[:italic]
|
@@ -67,8 +67,8 @@ module Rouge
|
|
67
67
|
Literal::String::Interpol, :fg => :purple, :bold => true
|
68
68
|
style Name::Builtin, :bold => true
|
69
69
|
style Name::Entity, :fg => :darkgray, :bold => true
|
70
|
-
style Text::Whitespace,
|
71
|
-
|
70
|
+
style Text::Whitespace, :fg => :lightgray
|
71
|
+
style Generic::Output, :fg => :royal
|
72
72
|
style Name::Function,
|
73
73
|
Name::Property,
|
74
74
|
Name::Attribute, :fg => :candy
|
data/lib/rouge/version.rb
CHANGED
data/rouge.gemspec
CHANGED
@@ -18,7 +18,9 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.licenses = ['MIT', 'BSD-2-Clause']
|
19
19
|
s.required_ruby_version = '>= 2.0'
|
20
20
|
s.metadata = {
|
21
|
-
|
22
|
-
|
21
|
+
"bug_tracker_uri" => "https://github.com/rouge-ruby/rouge/issues",
|
22
|
+
"changelog_uri" => "https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md",
|
23
|
+
"documentation_uri" => "https://rouge-ruby.github.io/docs/",
|
24
|
+
"source_code_uri" => "https://github.com/rouge-ruby/rouge"
|
23
25
|
}
|
24
26
|
end
|
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.
|
4
|
+
version: 3.8.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-
|
11
|
+
date: 2019-08-06 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:
|
@@ -29,7 +29,10 @@ files:
|
|
29
29
|
- lib/rouge/demos/apache
|
30
30
|
- lib/rouge/demos/apiblueprint
|
31
31
|
- lib/rouge/demos/applescript
|
32
|
+
- lib/rouge/demos/armasm
|
32
33
|
- lib/rouge/demos/awk
|
34
|
+
- lib/rouge/demos/batchfile
|
35
|
+
- lib/rouge/demos/bbcbasic
|
33
36
|
- lib/rouge/demos/biml
|
34
37
|
- lib/rouge/demos/bpf
|
35
38
|
- lib/rouge/demos/brainfuck
|
@@ -39,6 +42,7 @@ files:
|
|
39
42
|
- lib/rouge/demos/cfscript
|
40
43
|
- lib/rouge/demos/clojure
|
41
44
|
- lib/rouge/demos/cmake
|
45
|
+
- lib/rouge/demos/cmhg
|
42
46
|
- lib/rouge/demos/coffeescript
|
43
47
|
- lib/rouge/demos/common_lisp
|
44
48
|
- lib/rouge/demos/conf
|
@@ -49,6 +53,7 @@ files:
|
|
49
53
|
- lib/rouge/demos/csharp
|
50
54
|
- lib/rouge/demos/css
|
51
55
|
- lib/rouge/demos/cuda
|
56
|
+
- lib/rouge/demos/cython
|
52
57
|
- lib/rouge/demos/d
|
53
58
|
- lib/rouge/demos/dart
|
54
59
|
- lib/rouge/demos/diff
|
@@ -58,6 +63,7 @@ files:
|
|
58
63
|
- lib/rouge/demos/eiffel
|
59
64
|
- lib/rouge/demos/elixir
|
60
65
|
- lib/rouge/demos/elm
|
66
|
+
- lib/rouge/demos/epp
|
61
67
|
- lib/rouge/demos/erb
|
62
68
|
- lib/rouge/demos/erlang
|
63
69
|
- lib/rouge/demos/escape
|
@@ -111,6 +117,7 @@ files:
|
|
111
117
|
- lib/rouge/demos/matlab
|
112
118
|
- lib/rouge/demos/moonscript
|
113
119
|
- lib/rouge/demos/mosel
|
120
|
+
- lib/rouge/demos/msgtrans
|
114
121
|
- lib/rouge/demos/mxml
|
115
122
|
- lib/rouge/demos/nasm
|
116
123
|
- lib/rouge/demos/nginx
|
@@ -206,7 +213,10 @@ files:
|
|
206
213
|
- lib/rouge/lexers/apache/keywords.yml
|
207
214
|
- lib/rouge/lexers/apiblueprint.rb
|
208
215
|
- lib/rouge/lexers/apple_script.rb
|
216
|
+
- lib/rouge/lexers/armasm.rb
|
209
217
|
- lib/rouge/lexers/awk.rb
|
218
|
+
- lib/rouge/lexers/batchfile.rb
|
219
|
+
- lib/rouge/lexers/bbcbasic.rb
|
210
220
|
- lib/rouge/lexers/biml.rb
|
211
221
|
- lib/rouge/lexers/bpf.rb
|
212
222
|
- lib/rouge/lexers/brainfuck.rb
|
@@ -216,6 +226,7 @@ files:
|
|
216
226
|
- lib/rouge/lexers/cfscript.rb
|
217
227
|
- lib/rouge/lexers/clojure.rb
|
218
228
|
- lib/rouge/lexers/cmake.rb
|
229
|
+
- lib/rouge/lexers/cmhg.rb
|
219
230
|
- lib/rouge/lexers/coffeescript.rb
|
220
231
|
- lib/rouge/lexers/common_lisp.rb
|
221
232
|
- lib/rouge/lexers/conf.rb
|
@@ -226,6 +237,7 @@ files:
|
|
226
237
|
- lib/rouge/lexers/csharp.rb
|
227
238
|
- lib/rouge/lexers/css.rb
|
228
239
|
- lib/rouge/lexers/cuda.rb
|
240
|
+
- lib/rouge/lexers/cython.rb
|
229
241
|
- lib/rouge/lexers/d.rb
|
230
242
|
- lib/rouge/lexers/dart.rb
|
231
243
|
- lib/rouge/lexers/diff.rb
|
@@ -235,6 +247,7 @@ files:
|
|
235
247
|
- lib/rouge/lexers/eiffel.rb
|
236
248
|
- lib/rouge/lexers/elixir.rb
|
237
249
|
- lib/rouge/lexers/elm.rb
|
250
|
+
- lib/rouge/lexers/epp.rb
|
238
251
|
- lib/rouge/lexers/erb.rb
|
239
252
|
- lib/rouge/lexers/erlang.rb
|
240
253
|
- lib/rouge/lexers/escape.rb
|
@@ -292,6 +305,7 @@ files:
|
|
292
305
|
- lib/rouge/lexers/matlab/builtins.rb
|
293
306
|
- lib/rouge/lexers/moonscript.rb
|
294
307
|
- lib/rouge/lexers/mosel.rb
|
308
|
+
- lib/rouge/lexers/msgtrans.rb
|
295
309
|
- lib/rouge/lexers/mxml.rb
|
296
310
|
- lib/rouge/lexers/nasm.rb
|
297
311
|
- lib/rouge/lexers/nginx.rb
|
@@ -394,8 +408,10 @@ licenses:
|
|
394
408
|
- MIT
|
395
409
|
- BSD-2-Clause
|
396
410
|
metadata:
|
397
|
-
|
398
|
-
changelog_uri: https://github.com/
|
411
|
+
bug_tracker_uri: https://github.com/rouge-ruby/rouge/issues
|
412
|
+
changelog_uri: https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md
|
413
|
+
documentation_uri: https://rouge-ruby.github.io/docs/
|
414
|
+
source_code_uri: https://github.com/rouge-ruby/rouge
|
399
415
|
post_install_message:
|
400
416
|
rdoc_options: []
|
401
417
|
require_paths:
|
@@ -411,7 +427,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
411
427
|
- !ruby/object:Gem::Version
|
412
428
|
version: '0'
|
413
429
|
requirements: []
|
414
|
-
rubygems_version: 3.0.
|
430
|
+
rubygems_version: 3.0.3
|
415
431
|
signing_key:
|
416
432
|
specification_version: 4
|
417
433
|
summary: A pure-ruby colorizer based on pygments
|