rouge 3.6.0 → 3.12.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/ada +26 -0
- data/lib/rouge/demos/apex +9 -0
- 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/clean +6 -0
- data/lib/rouge/demos/cmhg +8 -0
- data/lib/rouge/demos/csvs +8 -0
- data/lib/rouge/demos/cuda +11 -0
- data/lib/rouge/demos/cython +6 -0
- data/lib/rouge/demos/eex +1 -0
- data/lib/rouge/demos/epp +4 -0
- data/lib/rouge/demos/gdscript +18 -0
- data/lib/rouge/demos/haxe +5 -0
- data/lib/rouge/demos/hocon +8 -0
- data/lib/rouge/demos/hql +5 -0
- data/lib/rouge/demos/jsl +3 -0
- data/lib/rouge/demos/liquid +0 -1
- data/lib/rouge/demos/lustre +6 -0
- data/lib/rouge/demos/lutin +18 -0
- data/lib/rouge/demos/mason +22 -0
- data/lib/rouge/demos/minizinc +23 -0
- data/lib/rouge/demos/msgtrans +4 -0
- data/lib/rouge/demos/opentype_feature_file +6 -0
- data/lib/rouge/demos/plist +1 -132
- data/lib/rouge/demos/reasonml +12 -0
- data/lib/rouge/demos/robot_framework +27 -0
- data/lib/rouge/demos/sas +13 -0
- data/lib/rouge/demos/sparql +6 -0
- data/lib/rouge/demos/terraform +0 -15
- data/lib/rouge/formatters/html_line_table.rb +3 -1
- data/lib/rouge/formatters/tex.rb +14 -12
- data/lib/rouge/guessers/disambiguation.rb +17 -0
- data/lib/rouge/lexer.rb +3 -0
- data/lib/rouge/lexers/ada.rb +162 -0
- data/lib/rouge/lexers/apex.rb +126 -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/clean.rb +156 -0
- data/lib/rouge/lexers/cmhg.rb +34 -0
- data/lib/rouge/lexers/common_lisp.rb +1 -1
- data/lib/rouge/lexers/console.rb +1 -1
- data/lib/rouge/lexers/coq.rb +12 -9
- data/lib/rouge/lexers/cpp.rb +4 -1
- data/lib/rouge/lexers/csvs.rb +44 -0
- data/lib/rouge/lexers/cuda.rb +35 -0
- data/lib/rouge/lexers/cython.rb +151 -0
- data/lib/rouge/lexers/eex.rb +52 -0
- data/lib/rouge/lexers/elixir.rb +20 -9
- data/lib/rouge/lexers/epp.rb +51 -0
- data/lib/rouge/lexers/escape.rb +3 -0
- data/lib/rouge/lexers/gdscript.rb +171 -0
- data/lib/rouge/lexers/gherkin.rb +4 -2
- data/lib/rouge/lexers/graphql.rb +10 -3
- data/lib/rouge/lexers/handlebars.rb +14 -3
- data/lib/rouge/lexers/haxe.rb +246 -0
- data/lib/rouge/lexers/hocon.rb +86 -0
- data/lib/rouge/lexers/hql.rb +139 -0
- data/lib/rouge/lexers/html.rb +2 -2
- data/lib/rouge/lexers/http.rb +5 -5
- data/lib/rouge/lexers/igorpro.rb +1 -1
- data/lib/rouge/lexers/javascript.rb +1 -1
- data/lib/rouge/lexers/jsl.rb +55 -0
- data/lib/rouge/lexers/json.rb +43 -5
- data/lib/rouge/lexers/julia.rb +1 -1
- data/lib/rouge/lexers/kotlin.rb +21 -28
- data/lib/rouge/lexers/liquid.rb +82 -108
- data/lib/rouge/lexers/lustre.rb +79 -0
- data/lib/rouge/lexers/lutin.rb +33 -0
- data/lib/rouge/lexers/make.rb +39 -12
- data/lib/rouge/lexers/markdown.rb +7 -1
- data/lib/rouge/lexers/mason.rb +110 -0
- data/lib/rouge/lexers/matlab.rb +4 -2
- data/lib/rouge/lexers/matlab/builtins.yml +3515 -0
- data/lib/rouge/lexers/minizinc.rb +87 -0
- data/lib/rouge/lexers/msgtrans.rb +26 -0
- data/lib/rouge/lexers/ocaml.rb +12 -48
- data/lib/rouge/lexers/ocaml/common.rb +53 -0
- data/lib/rouge/lexers/opentype_feature_file.rb +113 -0
- data/lib/rouge/lexers/perl.rb +1 -1
- data/lib/rouge/lexers/php.rb +31 -9
- data/lib/rouge/lexers/php/builtins.rb +181 -174
- data/lib/rouge/lexers/plain_text.rb +1 -1
- data/lib/rouge/lexers/puppet.rb +2 -2
- data/lib/rouge/lexers/q.rb +1 -1
- data/lib/rouge/lexers/r.rb +2 -3
- data/lib/rouge/lexers/reasonml.rb +65 -0
- data/lib/rouge/lexers/robot_framework.rb +249 -0
- data/lib/rouge/lexers/rust.rb +12 -9
- data/lib/rouge/lexers/sas.rb +563 -0
- data/lib/rouge/lexers/sed.rb +1 -1
- data/lib/rouge/lexers/shell.rb +5 -3
- data/lib/rouge/lexers/smarty.rb +10 -10
- data/lib/rouge/lexers/sparql.rb +129 -0
- data/lib/rouge/lexers/sql.rb +26 -6
- data/lib/rouge/lexers/swift.rb +1 -1
- data/lib/rouge/lexers/terraform.rb +8 -0
- data/lib/rouge/plugins/redcarpet.rb +7 -1
- data/lib/rouge/tex_theme_renderer.rb +5 -1
- data/lib/rouge/themes/magritte.rb +3 -3
- data/lib/rouge/themes/thankful_eyes.rb +1 -1
- data/lib/rouge/themes/tulip.rb +1 -1
- data/lib/rouge/version.rb +1 -1
- data/rouge.gemspec +4 -3
- metadata +63 -6
- data/lib/rouge/lexers/matlab/builtins.rb +0 -13
data/lib/rouge/lexers/sed.rb
CHANGED
data/lib/rouge/lexers/shell.rb
CHANGED
@@ -9,10 +9,12 @@ module Rouge
|
|
9
9
|
|
10
10
|
tag 'shell'
|
11
11
|
aliases 'bash', 'zsh', 'ksh', 'sh'
|
12
|
-
filenames '*.sh', '*.bash', '*.zsh', '*.ksh',
|
13
|
-
'.
|
12
|
+
filenames '*.sh', '*.bash', '*.zsh', '*.ksh', '.bashrc', '.zshrc',
|
13
|
+
'.kshrc', '.profile', 'APKBUILD', 'PKGBUILD', '*.ebuild',
|
14
|
+
'*.eclass', '*.exheres-0', '*.exlib'
|
14
15
|
|
15
|
-
mimetypes 'application/x-sh', 'application/x-shellscript'
|
16
|
+
mimetypes 'application/x-sh', 'application/x-shellscript', 'text/x-sh',
|
17
|
+
'text/x-shellscript'
|
16
18
|
|
17
19
|
def self.detect?(text)
|
18
20
|
return true if text.shebang?(/(ba|z|k)?sh/)
|
data/lib/rouge/lexers/smarty.rb
CHANGED
@@ -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
|
-
|
68
|
-
|
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
|
@@ -0,0 +1,129 @@
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Rouge
|
5
|
+
module Lexers
|
6
|
+
class SPARQL < RegexLexer
|
7
|
+
title "SPARQL"
|
8
|
+
desc "Semantic Query Language, for RDF data"
|
9
|
+
tag 'sparql'
|
10
|
+
filenames '*.rq'
|
11
|
+
mimetypes 'application/sparql-query'
|
12
|
+
|
13
|
+
def self.builtins
|
14
|
+
@builtins = Set.new %w[
|
15
|
+
ABS AVG BNODE BOUND CEIL COALESCE CONCAT CONTAINS COUNT DATATYPE DAY
|
16
|
+
ENCODE_FOR_URI FLOOR GROUP_CONCAT HOURS IF IRI isBLANK isIRI
|
17
|
+
isLITERAL isNUMERIC isURI LANG LANGMATCHES LCASE MAX MD5 MIN MINUTES
|
18
|
+
MONTH NOW RAND REGEX REPLACE ROUND SAMETERM SAMPLE SECONDS SEPARATOR
|
19
|
+
SHA1 SHA256 SHA384 SHA512 STR STRAFTER STRBEFORE STRDT STRENDS
|
20
|
+
STRLANG STRLEN STRSTARTS STRUUID SUBSTR SUM TIMEZONE TZ UCASE URI
|
21
|
+
UUID YEAR
|
22
|
+
]
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.keywords
|
26
|
+
@keywords = Set.new %w[
|
27
|
+
ADD ALL AS ASC ASK BASE BIND BINDINGS BY CLEAR CONSTRUCT COPY CREATE
|
28
|
+
DATA DEFAULT DELETE DESC DESCRIBE DISTINCT DROP EXISTS FILTER FROM
|
29
|
+
GRAPH GROUP BY HAVING IN INSERT LIMIT LOAD MINUS MOVE NAMED NOT
|
30
|
+
OFFSET OPTIONAL ORDER PREFIX SELECT REDUCED SERVICE SILENT TO UNDEF
|
31
|
+
UNION USING VALUES WHERE WITH
|
32
|
+
]
|
33
|
+
end
|
34
|
+
|
35
|
+
state :root do
|
36
|
+
rule %r(\s+)m, Text::Whitespace
|
37
|
+
rule %r(#.*), Comment::Single
|
38
|
+
|
39
|
+
rule %r("""), Str::Double, :string_double_literal
|
40
|
+
rule %r("), Str::Double, :string_double
|
41
|
+
rule %r('''), Str::Single, :string_single_literal
|
42
|
+
rule %r('), Str::Single, :string_single
|
43
|
+
|
44
|
+
rule %r([$?]\w+), Name::Variable
|
45
|
+
rule %r((\w*:)(\w+)?) do |m|
|
46
|
+
token Name::Namespace, m[1]
|
47
|
+
token Str::Symbol, m[2]
|
48
|
+
end
|
49
|
+
rule %r(<[^>]*>), Name::Namespace
|
50
|
+
rule %r(true|false)i, Keyword::Constant
|
51
|
+
|
52
|
+
rule %r([A-Z]\w+\b)i do |m|
|
53
|
+
if self.class.builtins.include? m[0].upcase
|
54
|
+
token Name::Builtin
|
55
|
+
elsif self.class.keywords.include? m[0].upcase
|
56
|
+
token Keyword
|
57
|
+
else
|
58
|
+
token Error
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
rule %r([+\-]?(?:\d+\.\d*|\.\d+)(?:[e][+\-]?[0-9]+)?)i, Num::Float
|
63
|
+
rule %r([+\-]?\d+), Num::Integer
|
64
|
+
rule %r([\]\[(){}.,;=]), Punctuation
|
65
|
+
rule %r([/?*+=!<>]|&&|\|\||\^\^), Operator
|
66
|
+
end
|
67
|
+
|
68
|
+
state :string_double_common do
|
69
|
+
mixin :string_escapes
|
70
|
+
rule %r(\\), Str::Double
|
71
|
+
rule %r([^"\\]+), Str::Double
|
72
|
+
end
|
73
|
+
|
74
|
+
state :string_double do
|
75
|
+
rule %r(") do
|
76
|
+
token Str::Double
|
77
|
+
goto :string_end
|
78
|
+
end
|
79
|
+
mixin :string_double_common
|
80
|
+
end
|
81
|
+
|
82
|
+
state :string_double_literal do
|
83
|
+
rule %r(""") do
|
84
|
+
token Str::Double
|
85
|
+
goto :string_end
|
86
|
+
end
|
87
|
+
rule %r("), Str::Double
|
88
|
+
mixin :string_double_common
|
89
|
+
end
|
90
|
+
|
91
|
+
state :string_single_common do
|
92
|
+
mixin :string_escapes
|
93
|
+
rule %r(\\), Str::Single
|
94
|
+
rule %r([^'\\]+), Str::Single
|
95
|
+
end
|
96
|
+
|
97
|
+
state :string_single do
|
98
|
+
rule %r(') do
|
99
|
+
token Str::Single
|
100
|
+
goto :string_end
|
101
|
+
end
|
102
|
+
mixin :string_single_common
|
103
|
+
end
|
104
|
+
|
105
|
+
state :string_single_literal do
|
106
|
+
rule %r(''') do
|
107
|
+
token Str::Single
|
108
|
+
goto :string_end
|
109
|
+
end
|
110
|
+
rule %r('), Str::Single
|
111
|
+
mixin :string_single_common
|
112
|
+
end
|
113
|
+
|
114
|
+
state :string_escapes do
|
115
|
+
rule %r(\\[tbnrf"'\\]), Str::Escape
|
116
|
+
rule %r(\\u\h{4}), Str::Escape
|
117
|
+
rule %r(\\U\h{8}), Str::Escape
|
118
|
+
end
|
119
|
+
|
120
|
+
state :string_end do
|
121
|
+
rule %r((@)([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)) do
|
122
|
+
groups Operator, Name::Property
|
123
|
+
end
|
124
|
+
rule %r(\^\^), Operator
|
125
|
+
rule(//) { pop! }
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
data/lib/rouge/lexers/sql.rb
CHANGED
@@ -51,7 +51,7 @@ module Rouge
|
|
51
51
|
LOCALTIME LOCALTIMESTAMP LOCATION LOCATOR LOCK LOWER MAP MATCH
|
52
52
|
MAX MAXVALUE MESSAGE_LENGTH MESSAGE_OCTET_LENGTH MESSAGE_TEXT
|
53
53
|
METHOD MIN MINUTE MINVALUE MOD MODE MODIFIES MODIFY MONTH
|
54
|
-
MORE MOVE MUMPS NAMES
|
54
|
+
MORE MOVE MUMPS NAMES NATURAL NCLOB NEW NEXT
|
55
55
|
NO NOCREATEDB NOCREATEUSER NONE NOT NOTHING NOTIFY NOTNULL
|
56
56
|
NULL NULLABLE NULLIF OBJECT OCTET_LENGTH OF OFF OFFSET OIDS
|
57
57
|
OLD ON ONLY OPEN OPERATION OPERATOR OPTION OPTIONS OR ORDER
|
@@ -59,7 +59,7 @@ module Rouge
|
|
59
59
|
OWNER PAD PARAMETER PARAMETERS PARAMETER_MODE PARAMATER_NAME
|
60
60
|
PARAMATER_ORDINAL_POSITION PARAMETER_SPECIFIC_CATALOG
|
61
61
|
PARAMETER_SPECIFIC_NAME PARAMATER_SPECIFIC_SCHEMA PARTIAL PASCAL
|
62
|
-
PENDANT PLACING PLI POSITION POSTFIX
|
62
|
+
PENDANT PLACING PLI POSITION POSTFIX PREFIX PREORDER
|
63
63
|
PREPARE PRESERVE PRIMARY PRIOR PRIVILEGES PROCEDURAL PROCEDURE
|
64
64
|
PUBLIC READ READS RECHECK RECURSIVE REF REFERENCES REFERENCING
|
65
65
|
REINDEX RELATIVE RENAME REPEATABLE REPLACE RESET RESTART
|
@@ -75,7 +75,7 @@ module Rouge
|
|
75
75
|
STDIN STDOUT STORAGE STRICT STRUCTURE STYPE SUBCLASS_ORIGIN
|
76
76
|
SUBLIST SUBSTRING SUM SYMMETRIC SYSID SYSTEM SYSTEM_USER
|
77
77
|
TABLE TABLE_NAME TEMP TEMPLATE TEMPORARY TERMINATE THAN THEN
|
78
|
-
|
78
|
+
TIMEZONE_HOUR TIMEZONE_MINUTE TO TOAST TRAILING
|
79
79
|
TRANSATION TRANSACTIONS_COMMITTED TRANSACTIONS_ROLLED_BACK
|
80
80
|
TRANSATION_ACTIVE TRANSFORM TRANSFORMS TRANSLATE TRANSLATION
|
81
81
|
TREAT TRIGGER TRIGGER_CATALOG TRIGGER_NAME TRIGGER_SCHEMA TRIM
|
@@ -84,21 +84,41 @@ module Rouge
|
|
84
84
|
USAGE USER USER_DEFINED_TYPE_CATALOG USER_DEFINED_TYPE_NAME
|
85
85
|
USER_DEFINED_TYPE_SCHEMA USING VACUUM VALID VALIDATOR VALUES
|
86
86
|
VARIABLE VERBOSE VERSION VIEW VOLATILE WHEN WHENEVER WHERE
|
87
|
-
WITH WITHOUT WORK WRITE
|
87
|
+
WITH WITHOUT WORK WRITE ZONE
|
88
88
|
)
|
89
89
|
end
|
90
90
|
|
91
|
+
def self.keywords_type
|
92
|
+
# sources:
|
93
|
+
# https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html
|
94
|
+
# https://dev.mysql.com/doc/refman/5.7/en/date-and-time-type-overview.html
|
95
|
+
# https://dev.mysql.com/doc/refman/5.7/en/string-type-overview.html
|
96
|
+
@keywords_type ||= Set.new(%w(
|
97
|
+
ZEROFILL UNSIGNED SIGNED SERIAL BIT TINYINT BOOL BOOLEAN SMALLINT
|
98
|
+
MEDIUMINT INT INTEGER BIGINT DECIMAL DEC NUMERIC FIXED FLOAT DOUBLE
|
99
|
+
PRECISION REAL
|
100
|
+
DATE DATETIME TIMESTAMP TIME YEAR
|
101
|
+
NATIONAL CHAR CHARACTER NCHAR BYTE
|
102
|
+
VARCHAR VARYING BINARY VARBINARY TINYBLOB TINYTEXT BLOB TEXT
|
103
|
+
MEDIUMBLOB MEDIUMTEXT LONGBLOB LONGTEXT ENUM
|
104
|
+
))
|
105
|
+
end
|
106
|
+
|
91
107
|
state :root do
|
92
108
|
rule %r/\s+/m, Text
|
93
109
|
rule %r/--.*/, Comment::Single
|
94
110
|
rule %r(/\*), Comment::Multiline, :multiline_comments
|
95
111
|
rule %r/\d+/, Num::Integer
|
96
112
|
rule %r/'/, Str::Single, :single_string
|
113
|
+
# A double-quoted string refers to a database object in our default SQL
|
114
|
+
# dialect, which is apropriate for e.g. MS SQL and PostgreSQL.
|
97
115
|
rule %r/"/, Name::Variable, :double_string
|
98
116
|
rule %r/`/, Name::Variable, :backtick
|
99
117
|
|
100
|
-
rule %r/\w\w*/ do |m|
|
101
|
-
if self.class.
|
118
|
+
rule %r/\w[\w\d]*/ do |m|
|
119
|
+
if self.class.keywords_type.include? m[0].upcase
|
120
|
+
token Name::Builtin
|
121
|
+
elsif self.class.keywords.include? m[0].upcase
|
102
122
|
token Keyword
|
103
123
|
else
|
104
124
|
token Name
|
data/lib/rouge/lexers/swift.rb
CHANGED
@@ -80,7 +80,7 @@ module Rouge
|
|
80
80
|
rule %r/0b[01]+(?:_[01]+)*/, Num::Bin
|
81
81
|
rule %r{[\d]+(?:_\d+)*}, Num::Integer
|
82
82
|
|
83
|
-
rule %r/@#{id}
|
83
|
+
rule %r/@#{id}/, Keyword::Declaration
|
84
84
|
|
85
85
|
rule %r/(private|internal)(\([ ]*)(\w+)([ ]*\))/ do |m|
|
86
86
|
if m[3] == 'set'
|
@@ -9,7 +9,13 @@ module Rouge
|
|
9
9
|
module Plugins
|
10
10
|
module Redcarpet
|
11
11
|
def block_code(code, language)
|
12
|
-
lexer =
|
12
|
+
lexer =
|
13
|
+
begin
|
14
|
+
Lexer.find_fancy(language, code)
|
15
|
+
rescue Guesser::Ambiguous => e
|
16
|
+
e.alternatives.first
|
17
|
+
end
|
18
|
+
lexer ||= Lexers::PlainText
|
13
19
|
|
14
20
|
# XXX HACK: Redcarpet strips hard tabs out of code blocks,
|
15
21
|
# so we assume you're not using leading spaces that aren't tabs,
|
@@ -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={})
|
@@ -110,7 +113,8 @@ END
|
|
110
113
|
end
|
111
114
|
|
112
115
|
def render_style(tok, style, &b)
|
113
|
-
out =
|
116
|
+
out = String.new('')
|
117
|
+
out << "\\expandafter\\def#{token_name(tok)}#1{"
|
114
118
|
out << "\\fboxsep=0pt\\colorbox{#{palette_name(style[:bg])}}{" if style[:bg]
|
115
119
|
out << '\\textbf{' if style[:bold]
|
116
120
|
out << '\\textit{' if style[:italic]
|
@@ -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
|
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
|
@@ -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
|
@@ -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
|
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
|
data/lib/rouge/themes/tulip.rb
CHANGED
@@ -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
|
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
|
data/lib/rouge/version.rb
CHANGED
data/rouge.gemspec
CHANGED
@@ -13,13 +13,14 @@ 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']
|
20
19
|
s.required_ruby_version = '>= 2.0'
|
21
20
|
s.metadata = {
|
22
|
-
|
23
|
-
|
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"
|
24
25
|
}
|
25
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.12.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-10-15 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,10 +25,15 @@ 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
|
30
|
+
- lib/rouge/demos/apex
|
29
31
|
- lib/rouge/demos/apiblueprint
|
30
32
|
- lib/rouge/demos/applescript
|
33
|
+
- lib/rouge/demos/armasm
|
31
34
|
- lib/rouge/demos/awk
|
35
|
+
- lib/rouge/demos/batchfile
|
36
|
+
- lib/rouge/demos/bbcbasic
|
32
37
|
- lib/rouge/demos/biml
|
33
38
|
- lib/rouge/demos/bpf
|
34
39
|
- lib/rouge/demos/brainfuck
|
@@ -36,8 +41,10 @@ files:
|
|
36
41
|
- lib/rouge/demos/c
|
37
42
|
- lib/rouge/demos/ceylon
|
38
43
|
- lib/rouge/demos/cfscript
|
44
|
+
- lib/rouge/demos/clean
|
39
45
|
- lib/rouge/demos/clojure
|
40
46
|
- lib/rouge/demos/cmake
|
47
|
+
- lib/rouge/demos/cmhg
|
41
48
|
- lib/rouge/demos/coffeescript
|
42
49
|
- lib/rouge/demos/common_lisp
|
43
50
|
- lib/rouge/demos/conf
|
@@ -47,21 +54,27 @@ files:
|
|
47
54
|
- lib/rouge/demos/crystal
|
48
55
|
- lib/rouge/demos/csharp
|
49
56
|
- lib/rouge/demos/css
|
57
|
+
- lib/rouge/demos/csvs
|
58
|
+
- lib/rouge/demos/cuda
|
59
|
+
- lib/rouge/demos/cython
|
50
60
|
- lib/rouge/demos/d
|
51
61
|
- lib/rouge/demos/dart
|
52
62
|
- lib/rouge/demos/diff
|
53
63
|
- lib/rouge/demos/digdag
|
54
64
|
- lib/rouge/demos/docker
|
55
65
|
- lib/rouge/demos/dot
|
66
|
+
- lib/rouge/demos/eex
|
56
67
|
- lib/rouge/demos/eiffel
|
57
68
|
- lib/rouge/demos/elixir
|
58
69
|
- lib/rouge/demos/elm
|
70
|
+
- lib/rouge/demos/epp
|
59
71
|
- lib/rouge/demos/erb
|
60
72
|
- lib/rouge/demos/erlang
|
61
73
|
- lib/rouge/demos/escape
|
62
74
|
- lib/rouge/demos/factor
|
63
75
|
- lib/rouge/demos/fortran
|
64
76
|
- lib/rouge/demos/fsharp
|
77
|
+
- lib/rouge/demos/gdscript
|
65
78
|
- lib/rouge/demos/gherkin
|
66
79
|
- lib/rouge/demos/glsl
|
67
80
|
- lib/rouge/demos/go
|
@@ -72,7 +85,10 @@ files:
|
|
72
85
|
- lib/rouge/demos/haml
|
73
86
|
- lib/rouge/demos/handlebars
|
74
87
|
- lib/rouge/demos/haskell
|
88
|
+
- lib/rouge/demos/haxe
|
75
89
|
- lib/rouge/demos/hcl
|
90
|
+
- lib/rouge/demos/hocon
|
91
|
+
- lib/rouge/demos/hql
|
76
92
|
- lib/rouge/demos/html
|
77
93
|
- lib/rouge/demos/http
|
78
94
|
- lib/rouge/demos/hylang
|
@@ -85,6 +101,7 @@ files:
|
|
85
101
|
- lib/rouge/demos/java
|
86
102
|
- lib/rouge/demos/javascript
|
87
103
|
- lib/rouge/demos/jinja
|
104
|
+
- lib/rouge/demos/jsl
|
88
105
|
- lib/rouge/demos/json
|
89
106
|
- lib/rouge/demos/json-doc
|
90
107
|
- lib/rouge/demos/jsonnet
|
@@ -98,14 +115,19 @@ files:
|
|
98
115
|
- lib/rouge/demos/literate_haskell
|
99
116
|
- lib/rouge/demos/llvm
|
100
117
|
- lib/rouge/demos/lua
|
118
|
+
- lib/rouge/demos/lustre
|
119
|
+
- lib/rouge/demos/lutin
|
101
120
|
- lib/rouge/demos/m68k
|
102
121
|
- lib/rouge/demos/magik
|
103
122
|
- lib/rouge/demos/make
|
104
123
|
- lib/rouge/demos/markdown
|
124
|
+
- lib/rouge/demos/mason
|
105
125
|
- lib/rouge/demos/mathematica
|
106
126
|
- lib/rouge/demos/matlab
|
127
|
+
- lib/rouge/demos/minizinc
|
107
128
|
- lib/rouge/demos/moonscript
|
108
129
|
- lib/rouge/demos/mosel
|
130
|
+
- lib/rouge/demos/msgtrans
|
109
131
|
- lib/rouge/demos/mxml
|
110
132
|
- lib/rouge/demos/nasm
|
111
133
|
- lib/rouge/demos/nginx
|
@@ -114,6 +136,7 @@ files:
|
|
114
136
|
- lib/rouge/demos/objective_c
|
115
137
|
- lib/rouge/demos/ocaml
|
116
138
|
- lib/rouge/demos/openedge
|
139
|
+
- lib/rouge/demos/opentype_feature_file
|
117
140
|
- lib/rouge/demos/pascal
|
118
141
|
- lib/rouge/demos/perl
|
119
142
|
- lib/rouge/demos/php
|
@@ -132,8 +155,11 @@ files:
|
|
132
155
|
- lib/rouge/demos/qml
|
133
156
|
- lib/rouge/demos/r
|
134
157
|
- lib/rouge/demos/racket
|
158
|
+
- lib/rouge/demos/reasonml
|
159
|
+
- lib/rouge/demos/robot_framework
|
135
160
|
- lib/rouge/demos/ruby
|
136
161
|
- lib/rouge/demos/rust
|
162
|
+
- lib/rouge/demos/sas
|
137
163
|
- lib/rouge/demos/sass
|
138
164
|
- lib/rouge/demos/scala
|
139
165
|
- lib/rouge/demos/scheme
|
@@ -145,6 +171,7 @@ files:
|
|
145
171
|
- lib/rouge/demos/smalltalk
|
146
172
|
- lib/rouge/demos/smarty
|
147
173
|
- lib/rouge/demos/sml
|
174
|
+
- lib/rouge/demos/sparql
|
148
175
|
- lib/rouge/demos/sqf
|
149
176
|
- lib/rouge/demos/sql
|
150
177
|
- lib/rouge/demos/supercollider
|
@@ -193,11 +220,16 @@ files:
|
|
193
220
|
- lib/rouge/lexer.rb
|
194
221
|
- lib/rouge/lexers/abap.rb
|
195
222
|
- lib/rouge/lexers/actionscript.rb
|
223
|
+
- lib/rouge/lexers/ada.rb
|
196
224
|
- lib/rouge/lexers/apache.rb
|
197
225
|
- lib/rouge/lexers/apache/keywords.yml
|
226
|
+
- lib/rouge/lexers/apex.rb
|
198
227
|
- lib/rouge/lexers/apiblueprint.rb
|
199
228
|
- lib/rouge/lexers/apple_script.rb
|
229
|
+
- lib/rouge/lexers/armasm.rb
|
200
230
|
- lib/rouge/lexers/awk.rb
|
231
|
+
- lib/rouge/lexers/batchfile.rb
|
232
|
+
- lib/rouge/lexers/bbcbasic.rb
|
201
233
|
- lib/rouge/lexers/biml.rb
|
202
234
|
- lib/rouge/lexers/bpf.rb
|
203
235
|
- lib/rouge/lexers/brainfuck.rb
|
@@ -205,8 +237,10 @@ files:
|
|
205
237
|
- lib/rouge/lexers/c.rb
|
206
238
|
- lib/rouge/lexers/ceylon.rb
|
207
239
|
- lib/rouge/lexers/cfscript.rb
|
240
|
+
- lib/rouge/lexers/clean.rb
|
208
241
|
- lib/rouge/lexers/clojure.rb
|
209
242
|
- lib/rouge/lexers/cmake.rb
|
243
|
+
- lib/rouge/lexers/cmhg.rb
|
210
244
|
- lib/rouge/lexers/coffeescript.rb
|
211
245
|
- lib/rouge/lexers/common_lisp.rb
|
212
246
|
- lib/rouge/lexers/conf.rb
|
@@ -216,21 +250,27 @@ files:
|
|
216
250
|
- lib/rouge/lexers/crystal.rb
|
217
251
|
- lib/rouge/lexers/csharp.rb
|
218
252
|
- lib/rouge/lexers/css.rb
|
253
|
+
- lib/rouge/lexers/csvs.rb
|
254
|
+
- lib/rouge/lexers/cuda.rb
|
255
|
+
- lib/rouge/lexers/cython.rb
|
219
256
|
- lib/rouge/lexers/d.rb
|
220
257
|
- lib/rouge/lexers/dart.rb
|
221
258
|
- lib/rouge/lexers/diff.rb
|
222
259
|
- lib/rouge/lexers/digdag.rb
|
223
260
|
- lib/rouge/lexers/docker.rb
|
224
261
|
- lib/rouge/lexers/dot.rb
|
262
|
+
- lib/rouge/lexers/eex.rb
|
225
263
|
- lib/rouge/lexers/eiffel.rb
|
226
264
|
- lib/rouge/lexers/elixir.rb
|
227
265
|
- lib/rouge/lexers/elm.rb
|
266
|
+
- lib/rouge/lexers/epp.rb
|
228
267
|
- lib/rouge/lexers/erb.rb
|
229
268
|
- lib/rouge/lexers/erlang.rb
|
230
269
|
- lib/rouge/lexers/escape.rb
|
231
270
|
- lib/rouge/lexers/factor.rb
|
232
271
|
- lib/rouge/lexers/fortran.rb
|
233
272
|
- lib/rouge/lexers/fsharp.rb
|
273
|
+
- lib/rouge/lexers/gdscript.rb
|
234
274
|
- lib/rouge/lexers/gherkin.rb
|
235
275
|
- lib/rouge/lexers/gherkin/keywords.rb
|
236
276
|
- lib/rouge/lexers/glsl.rb
|
@@ -242,7 +282,10 @@ files:
|
|
242
282
|
- lib/rouge/lexers/haml.rb
|
243
283
|
- lib/rouge/lexers/handlebars.rb
|
244
284
|
- lib/rouge/lexers/haskell.rb
|
285
|
+
- lib/rouge/lexers/haxe.rb
|
245
286
|
- lib/rouge/lexers/hcl.rb
|
287
|
+
- lib/rouge/lexers/hocon.rb
|
288
|
+
- lib/rouge/lexers/hql.rb
|
246
289
|
- lib/rouge/lexers/html.rb
|
247
290
|
- lib/rouge/lexers/http.rb
|
248
291
|
- lib/rouge/lexers/hylang.rb
|
@@ -254,6 +297,7 @@ files:
|
|
254
297
|
- lib/rouge/lexers/java.rb
|
255
298
|
- lib/rouge/lexers/javascript.rb
|
256
299
|
- lib/rouge/lexers/jinja.rb
|
300
|
+
- lib/rouge/lexers/jsl.rb
|
257
301
|
- lib/rouge/lexers/json.rb
|
258
302
|
- lib/rouge/lexers/json_doc.rb
|
259
303
|
- lib/rouge/lexers/jsonnet.rb
|
@@ -269,16 +313,21 @@ files:
|
|
269
313
|
- lib/rouge/lexers/llvm.rb
|
270
314
|
- lib/rouge/lexers/lua.rb
|
271
315
|
- lib/rouge/lexers/lua/builtins.rb
|
316
|
+
- lib/rouge/lexers/lustre.rb
|
317
|
+
- lib/rouge/lexers/lutin.rb
|
272
318
|
- lib/rouge/lexers/m68k.rb
|
273
319
|
- lib/rouge/lexers/magik.rb
|
274
320
|
- lib/rouge/lexers/make.rb
|
275
321
|
- lib/rouge/lexers/markdown.rb
|
322
|
+
- lib/rouge/lexers/mason.rb
|
276
323
|
- lib/rouge/lexers/mathematica.rb
|
277
324
|
- lib/rouge/lexers/mathematica/builtins.rb
|
278
325
|
- lib/rouge/lexers/matlab.rb
|
279
|
-
- lib/rouge/lexers/matlab/builtins.
|
326
|
+
- lib/rouge/lexers/matlab/builtins.yml
|
327
|
+
- lib/rouge/lexers/minizinc.rb
|
280
328
|
- lib/rouge/lexers/moonscript.rb
|
281
329
|
- lib/rouge/lexers/mosel.rb
|
330
|
+
- lib/rouge/lexers/msgtrans.rb
|
282
331
|
- lib/rouge/lexers/mxml.rb
|
283
332
|
- lib/rouge/lexers/nasm.rb
|
284
333
|
- lib/rouge/lexers/nginx.rb
|
@@ -286,7 +335,9 @@ files:
|
|
286
335
|
- lib/rouge/lexers/nix.rb
|
287
336
|
- lib/rouge/lexers/objective_c.rb
|
288
337
|
- lib/rouge/lexers/ocaml.rb
|
338
|
+
- lib/rouge/lexers/ocaml/common.rb
|
289
339
|
- lib/rouge/lexers/openedge.rb
|
340
|
+
- lib/rouge/lexers/opentype_feature_file.rb
|
290
341
|
- lib/rouge/lexers/pascal.rb
|
291
342
|
- lib/rouge/lexers/perl.rb
|
292
343
|
- lib/rouge/lexers/php.rb
|
@@ -306,8 +357,11 @@ files:
|
|
306
357
|
- lib/rouge/lexers/qml.rb
|
307
358
|
- lib/rouge/lexers/r.rb
|
308
359
|
- lib/rouge/lexers/racket.rb
|
360
|
+
- lib/rouge/lexers/reasonml.rb
|
361
|
+
- lib/rouge/lexers/robot_framework.rb
|
309
362
|
- lib/rouge/lexers/ruby.rb
|
310
363
|
- lib/rouge/lexers/rust.rb
|
364
|
+
- lib/rouge/lexers/sas.rb
|
311
365
|
- lib/rouge/lexers/sass.rb
|
312
366
|
- lib/rouge/lexers/sass/common.rb
|
313
367
|
- lib/rouge/lexers/scala.rb
|
@@ -320,6 +374,7 @@ files:
|
|
320
374
|
- lib/rouge/lexers/smalltalk.rb
|
321
375
|
- lib/rouge/lexers/smarty.rb
|
322
376
|
- lib/rouge/lexers/sml.rb
|
377
|
+
- lib/rouge/lexers/sparql.rb
|
323
378
|
- lib/rouge/lexers/sqf.rb
|
324
379
|
- lib/rouge/lexers/sqf/commands.rb
|
325
380
|
- lib/rouge/lexers/sql.rb
|
@@ -377,8 +432,10 @@ licenses:
|
|
377
432
|
- MIT
|
378
433
|
- BSD-2-Clause
|
379
434
|
metadata:
|
380
|
-
|
381
|
-
changelog_uri: https://github.com/
|
435
|
+
bug_tracker_uri: https://github.com/rouge-ruby/rouge/issues
|
436
|
+
changelog_uri: https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md
|
437
|
+
documentation_uri: https://rouge-ruby.github.io/docs/
|
438
|
+
source_code_uri: https://github.com/rouge-ruby/rouge
|
382
439
|
post_install_message:
|
383
440
|
rdoc_options: []
|
384
441
|
require_paths:
|
@@ -394,7 +451,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
394
451
|
- !ruby/object:Gem::Version
|
395
452
|
version: '0'
|
396
453
|
requirements: []
|
397
|
-
rubygems_version: 3.0.
|
454
|
+
rubygems_version: 3.0.3
|
398
455
|
signing_key:
|
399
456
|
specification_version: 4
|
400
457
|
summary: A pure-ruby colorizer based on pygments
|