jazzy 0.13.7 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/Tests.yml +2 -2
- data/.rubocop.yml +123 -24
- data/CHANGELOG.md +34 -0
- data/Dangerfile +11 -8
- data/Gemfile +3 -1
- data/Gemfile.lock +49 -34
- data/README.md +23 -11
- data/Rakefile +13 -12
- data/bin/jazzy +3 -2
- data/jazzy.gemspec +8 -6
- data/lib/jazzy.rb +2 -0
- data/lib/jazzy/config.rb +116 -69
- data/lib/jazzy/doc.rb +3 -1
- data/lib/jazzy/doc_builder.rb +63 -81
- data/lib/jazzy/docset_builder.rb +3 -1
- data/lib/jazzy/documentation_generator.rb +6 -2
- data/lib/jazzy/executable.rb +3 -0
- data/lib/jazzy/extensions/bitbucket/img/bitbucket.svg +11 -0
- data/lib/jazzy/{themes/apple/assets → extensions/github}/img/gh.png +0 -0
- data/lib/jazzy/extensions/gitlab/img/gitlab.svg +23 -0
- data/lib/jazzy/gem_version.rb +3 -1
- data/lib/jazzy/highlighter.rb +5 -3
- data/lib/jazzy/jazzy_markdown.rb +63 -30
- data/lib/jazzy/podspec_documenter.rb +14 -16
- data/lib/jazzy/search_builder.rb +4 -3
- data/lib/jazzy/source_declaration.rb +9 -3
- data/lib/jazzy/source_declaration/access_control_level.rb +7 -5
- data/lib/jazzy/source_declaration/type.rb +3 -1
- data/lib/jazzy/source_document.rb +8 -5
- data/lib/jazzy/source_host.rb +111 -0
- data/lib/jazzy/source_mark.rb +8 -6
- data/lib/jazzy/source_module.rb +6 -6
- data/lib/jazzy/sourcekitten.rb +98 -72
- data/lib/jazzy/stats.rb +4 -2
- data/lib/jazzy/symbol_graph.rb +15 -15
- data/lib/jazzy/symbol_graph/constraint.rb +5 -1
- data/lib/jazzy/symbol_graph/ext_node.rb +3 -1
- data/lib/jazzy/symbol_graph/graph.rb +13 -11
- data/lib/jazzy/symbol_graph/relationship.rb +3 -0
- data/lib/jazzy/symbol_graph/sym_node.rb +11 -6
- data/lib/jazzy/symbol_graph/symbol.rb +18 -15
- data/lib/jazzy/themes/apple/assets/css/highlight.css.scss +63 -59
- data/lib/jazzy/themes/apple/assets/css/jazzy.css.scss +5 -1
- data/lib/jazzy/themes/apple/assets/js/jazzy.js +4 -0
- data/lib/jazzy/themes/apple/assets/js/jazzy.search.js +4 -0
- data/lib/jazzy/themes/apple/templates/doc.mustache +3 -3
- data/lib/jazzy/themes/apple/templates/footer.mustache +1 -1
- data/lib/jazzy/themes/apple/templates/header.mustache +3 -3
- data/lib/jazzy/themes/apple/templates/task.mustache +3 -3
- data/lib/jazzy/themes/fullwidth/assets/css/highlight.css.scss +63 -59
- data/lib/jazzy/themes/fullwidth/assets/css/jazzy.css.scss +6 -2
- data/lib/jazzy/themes/fullwidth/assets/js/jazzy.js +4 -0
- data/lib/jazzy/themes/fullwidth/assets/js/jazzy.search.js +4 -0
- data/lib/jazzy/themes/fullwidth/templates/doc.mustache +3 -3
- data/lib/jazzy/themes/fullwidth/templates/footer.mustache +1 -1
- data/lib/jazzy/themes/fullwidth/templates/header.mustache +5 -5
- data/lib/jazzy/themes/fullwidth/templates/task.mustache +3 -3
- data/lib/jazzy/themes/jony/assets/css/highlight.css.scss +63 -59
- data/lib/jazzy/themes/jony/assets/css/jazzy.css.scss +5 -1
- data/lib/jazzy/themes/jony/assets/js/jazzy.js +4 -0
- data/lib/jazzy/themes/jony/templates/doc.mustache +3 -3
- data/lib/jazzy/themes/jony/templates/footer.mustache +1 -1
- data/lib/jazzy/themes/jony/templates/header.mustache +5 -5
- data/lib/jazzy/themes/jony/templates/task.mustache +3 -3
- data/spec/integration_spec.rb +39 -36
- data/spec/spec_helper.rb +3 -1
- data/spec/spec_helper/pre_flight.rb +2 -0
- metadata +27 -13
- data/lib/jazzy/themes/fullwidth/assets/img/gh.png +0 -0
- data/lib/jazzy/themes/jony/assets/img/gh.png +0 -0
- data/spec/sourcekitten_spec.rb +0 -6
data/lib/jazzy/stats.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Jazzy
|
2
4
|
# Collect + report metadata about a processed module
|
3
5
|
class Stats
|
4
6
|
include Config::Mixin
|
5
7
|
|
6
|
-
attr_reader :documented, :acl_skipped
|
7
|
-
attr_reader :undocumented_decls
|
8
|
+
attr_reader :documented, :acl_skipped, :undocumented_decls
|
8
9
|
|
9
10
|
def add_documented
|
10
11
|
@documented += 1
|
@@ -57,6 +58,7 @@ module Jazzy
|
|
57
58
|
|
58
59
|
def doc_coverage
|
59
60
|
return 0 if acl_included == 0
|
61
|
+
|
60
62
|
(100 * documented) / acl_included
|
61
63
|
end
|
62
64
|
|
data/lib/jazzy/symbol_graph.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'set'
|
2
4
|
require 'jazzy/symbol_graph/graph'
|
3
5
|
require 'jazzy/symbol_graph/constraint'
|
@@ -37,7 +39,6 @@ module Jazzy
|
|
37
39
|
end
|
38
40
|
|
39
41
|
# Figure out the args to pass to symbolgraph-extract
|
40
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
41
42
|
def self.arguments(config, output_path)
|
42
43
|
if config.module_name.empty?
|
43
44
|
raise 'error: `--swift-build-tool symbolgraph` requires `--module`.'
|
@@ -45,29 +46,28 @@ module Jazzy
|
|
45
46
|
|
46
47
|
user_args = config.build_tool_arguments.join
|
47
48
|
|
48
|
-
if user_args =~
|
49
|
+
if user_args =~ /-(?:module-name|minimum-access-level|output-dir)/
|
49
50
|
raise 'error: `--build-tool-arguments` for '\
|
50
|
-
"`--swift-build-tool symbolgraph` can't use
|
51
|
-
'
|
51
|
+
"`--swift-build-tool symbolgraph` can't use `-module`, "\
|
52
|
+
'`-minimum-access-level`, or `-output-dir`.'
|
52
53
|
end
|
53
54
|
|
54
55
|
# Default set
|
55
56
|
args = [
|
56
|
-
|
57
|
-
'
|
58
|
-
|
59
|
-
'
|
57
|
+
'-module-name', config.module_name,
|
58
|
+
'-minimum-access-level', 'private',
|
59
|
+
'-output-dir', output_path,
|
60
|
+
'-skip-synthesized-members'
|
60
61
|
]
|
61
62
|
|
62
63
|
# Things user can override
|
63
|
-
args
|
64
|
-
args
|
65
|
-
args
|
66
|
-
args
|
64
|
+
args += ['-sdk', sdk(config)] unless user_args =~ /-sdk/
|
65
|
+
args += ['-target', target] unless user_args =~ /-target/
|
66
|
+
args += ['-F', config.source_directory.to_s] unless user_args =~ /-F(?!s)/
|
67
|
+
args += ['-I', config.source_directory.to_s] unless user_args =~ /-I/
|
67
68
|
|
68
69
|
args + config.build_tool_arguments
|
69
70
|
end
|
70
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
71
71
|
|
72
72
|
# Get the SDK path. On !darwin this just isn't needed.
|
73
73
|
def self.sdk(config)
|
@@ -87,8 +87,8 @@ module Jazzy
|
|
87
87
|
def self.demangle(usr)
|
88
88
|
args = %w[demangle -simplified -compact].append(usr.sub(/^s:/, 's'))
|
89
89
|
output, = Executable.execute_command('swift', args, true)
|
90
|
-
|
91
|
-
rescue
|
90
|
+
output.chomp
|
91
|
+
rescue StandardError
|
92
92
|
usr
|
93
93
|
end
|
94
94
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Jazzy
|
2
4
|
module SymbolGraph
|
3
5
|
# Constraint is a tidied-up JSON object, used by both Symbol and
|
@@ -27,6 +29,7 @@ module Jazzy
|
|
27
29
|
def self.new_hash(hash)
|
28
30
|
kind = KIND_MAP[hash[:kind]]
|
29
31
|
raise "Unknown constraint kind '#{kind}'" unless kind
|
32
|
+
|
30
33
|
lhs = hash[:lhs].sub(/^Self\./, '')
|
31
34
|
rhs = hash[:rhs].sub(/^Self\./, '')
|
32
35
|
new(kind, lhs, rhs)
|
@@ -62,6 +65,7 @@ module Jazzy
|
|
62
65
|
path_components.include?(hash[:rhs])
|
63
66
|
next nil
|
64
67
|
end
|
68
|
+
|
65
69
|
Constraint.new_hash(hash)
|
66
70
|
end.compact
|
67
71
|
end
|
@@ -89,6 +93,6 @@ end
|
|
89
93
|
|
90
94
|
class Array
|
91
95
|
def to_where_clause
|
92
|
-
empty? ? '' :
|
96
|
+
empty? ? '' : " where #{map(&:to_swift).join(', ')}"
|
93
97
|
end
|
94
98
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Jazzy
|
2
4
|
module SymbolGraph
|
3
5
|
# For extensions we need to track constraints of the extended type
|
@@ -68,7 +70,7 @@ module Jazzy
|
|
68
70
|
def full_declaration
|
69
71
|
decl = "extension #{name}"
|
70
72
|
unless conformances.empty?
|
71
|
-
decl +=
|
73
|
+
decl += " : #{conformances.join(', ')}"
|
72
74
|
end
|
73
75
|
decl + all_constraints.ext.to_where_clause
|
74
76
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# rubocop:disable Metrics/ClassLength
|
2
4
|
module Jazzy
|
3
5
|
module SymbolGraph
|
@@ -63,14 +65,14 @@ module Jazzy
|
|
63
65
|
# Increasingly desparate ways to find the name of the symbol
|
64
66
|
# at the target end of a relationship
|
65
67
|
def rel_target_name(rel, target_node)
|
66
|
-
|
68
|
+
target_node&.symbol&.name ||
|
67
69
|
rel.target_fallback ||
|
68
70
|
Jazzy::SymbolGraph.demangle(rel.target_usr)
|
69
71
|
end
|
70
72
|
|
71
73
|
# Same for the source end. Less help from the tool here
|
72
74
|
def rel_source_name(rel, source_node)
|
73
|
-
|
75
|
+
source_node&.qualified_name ||
|
74
76
|
Jazzy::SymbolGraph.demangle(rel.source_usr)
|
75
77
|
end
|
76
78
|
|
@@ -86,11 +88,11 @@ module Jazzy
|
|
86
88
|
|
87
89
|
source.protocol_requirement = rel.protocol_requirement?
|
88
90
|
constraints =
|
89
|
-
ExtConstraints.new(target
|
91
|
+
ExtConstraints.new(target&.constraints,
|
90
92
|
source.unique_context_constraints(target))
|
91
93
|
|
92
94
|
# Add to its parent or invent an extension
|
93
|
-
unless target
|
95
|
+
unless target&.try_add_child(source, constraints.ext)
|
94
96
|
add_ext_member(rel.target_usr, source, constraints)
|
95
97
|
end
|
96
98
|
end
|
@@ -101,7 +103,7 @@ module Jazzy
|
|
101
103
|
|
102
104
|
return if redundant_conformance?(rel, source, protocol_name)
|
103
105
|
|
104
|
-
type_constraints =
|
106
|
+
type_constraints = source&.constraints || []
|
105
107
|
constraints =
|
106
108
|
ExtConstraints.new(type_constraints,
|
107
109
|
rel.constraints - type_constraints)
|
@@ -122,7 +124,7 @@ module Jazzy
|
|
122
124
|
target_parent.is_a?(SymNode)
|
123
125
|
# Could probably figure this out with demangle, but...
|
124
126
|
warn "Can't resolve membership of default implementation "\
|
125
|
-
|
127
|
+
"#{source.symbol.usr}."
|
126
128
|
source.unlisted = true
|
127
129
|
return
|
128
130
|
end
|
@@ -174,14 +176,14 @@ module Jazzy
|
|
174
176
|
|
175
177
|
root_symbol_nodes =
|
176
178
|
symbol_nodes.values
|
177
|
-
|
178
|
-
|
179
|
-
|
179
|
+
.select(&:top_level_decl?)
|
180
|
+
.sort
|
181
|
+
.map(&:to_sourcekit)
|
180
182
|
|
181
183
|
root_ext_nodes =
|
182
184
|
ext_nodes.values
|
183
|
-
|
184
|
-
|
185
|
+
.sort
|
186
|
+
.map { |n| n.to_sourcekit(module_name) }
|
185
187
|
{
|
186
188
|
'key.diagnostic_stage' => 'parse',
|
187
189
|
'key.substructure' => root_symbol_nodes + root_ext_nodes,
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Jazzy
|
2
4
|
module SymbolGraph
|
3
5
|
# A Relationship is a tidied-up SymbolGraph JSON object
|
@@ -25,6 +27,7 @@ module Jazzy
|
|
25
27
|
unless KINDS.include?(kind)
|
26
28
|
raise "Unknown relationship kind '#{kind}'"
|
27
29
|
end
|
30
|
+
|
28
31
|
self.kind = kind.to_sym
|
29
32
|
self.source_usr = hash[:source]
|
30
33
|
self.target_usr = hash[:target]
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Jazzy
|
2
4
|
module SymbolGraph
|
3
5
|
# The rebuilt syntax tree is made of nodes that either match
|
@@ -72,6 +74,7 @@ module Jazzy
|
|
72
74
|
(!protocol? || node.protocol_requirement?)
|
73
75
|
return false
|
74
76
|
end
|
77
|
+
|
75
78
|
add_child(node)
|
76
79
|
true
|
77
80
|
end
|
@@ -93,24 +96,26 @@ module Jazzy
|
|
93
96
|
# conformance: don't bother if it's already in the type declaration.
|
94
97
|
def conformance?(protocol)
|
95
98
|
return false unless symbol.declaration =~ /(?<=:).*?(?=(where|$))/
|
99
|
+
|
96
100
|
Regexp.last_match[0] =~ /\b#{protocol}\b/
|
97
101
|
end
|
98
102
|
|
99
103
|
# Generate the 'where' clause for the declaration
|
100
104
|
def where_clause
|
101
|
-
parent_constraints =
|
105
|
+
parent_constraints = parent&.constraints || []
|
102
106
|
(constraints - parent_constraints).to_where_clause
|
103
107
|
end
|
104
108
|
|
105
109
|
def inherits_clause
|
106
110
|
return '' unless superclass_name
|
111
|
+
|
107
112
|
" : #{superclass_name}"
|
108
113
|
end
|
109
114
|
|
110
115
|
def full_declaration
|
111
116
|
symbol.availability
|
112
|
-
|
113
|
-
|
117
|
+
.append(symbol.declaration + inherits_clause + where_clause)
|
118
|
+
.join("\n")
|
114
119
|
end
|
115
120
|
|
116
121
|
# rubocop:disable Metrics/MethodLength
|
@@ -120,7 +125,7 @@ module Jazzy
|
|
120
125
|
|
121
126
|
hash = {
|
122
127
|
'key.kind' => symbol.kind,
|
123
|
-
'key.usr' =>
|
128
|
+
'key.usr' => symbol.usr,
|
124
129
|
'key.name' => symbol.name,
|
125
130
|
'key.accessibility' => symbol.acl,
|
126
131
|
'key.parsed_decl' => declaration,
|
@@ -136,8 +141,8 @@ module Jazzy
|
|
136
141
|
end
|
137
142
|
if location = symbol.location
|
138
143
|
hash['key.filepath'] = location[:filename]
|
139
|
-
hash['key.doc.line'] = location[:line]
|
140
|
-
hash['key.doc.column'] = location[:character]
|
144
|
+
hash['key.doc.line'] = location[:line] + 1
|
145
|
+
hash['key.doc.column'] = location[:character] + 1
|
141
146
|
end
|
142
147
|
unless children.empty?
|
143
148
|
hash['key.substructure'] = children_to_sourcekit
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# rubocop:disable Metrics/ClassLength
|
2
4
|
module Jazzy
|
3
5
|
module SymbolGraph
|
@@ -45,10 +47,10 @@ module Jazzy
|
|
45
47
|
def init_declaration(raw_decl)
|
46
48
|
# Too much 'Self.TypeName'; omitted arg labels look odd;
|
47
49
|
# duplicated constraints; swift 5.3 vs. master workaround
|
48
|
-
self.declaration =
|
49
|
-
|
50
|
-
|
51
|
-
|
50
|
+
self.declaration = raw_decl
|
51
|
+
.gsub(/\bSelf\./, '')
|
52
|
+
.gsub(/(?<=\(|, )_: /, '_ arg: ')
|
53
|
+
.gsub(/ where.*$/, '')
|
52
54
|
if kind == 'source.lang.swift.decl.class'
|
53
55
|
declaration.sub!(/\s*:.*$/, '')
|
54
56
|
end
|
@@ -90,6 +92,7 @@ module Jazzy
|
|
90
92
|
# We treat 'static var' differently to 'class var'
|
91
93
|
def adjust_kind_for_declaration(kind)
|
92
94
|
return kind unless declaration =~ /\bstatic\b/
|
95
|
+
|
93
96
|
kind.gsub(/type/, 'static')
|
94
97
|
end
|
95
98
|
|
@@ -97,13 +100,14 @@ module Jazzy
|
|
97
100
|
adjusted = adjust_kind_for_declaration(kind)
|
98
101
|
sourcekit_kind = KIND_MAP[adjusted.sub('swift.', '')]
|
99
102
|
raise "Unknown symbol kind '#{kind}'" unless sourcekit_kind
|
100
|
-
|
103
|
+
|
104
|
+
self.kind = "source.lang.swift.decl.#{sourcekit_kind}"
|
101
105
|
end
|
102
106
|
|
103
107
|
# Mapping SymbolGraph's ACL to SourceKit
|
104
108
|
|
105
109
|
def init_acl(acl)
|
106
|
-
self.acl =
|
110
|
+
self.acl = "source.lang.swift.accessibility.#{acl}"
|
107
111
|
end
|
108
112
|
|
109
113
|
# Symbol location - only available for public+ decls
|
@@ -120,6 +124,7 @@ module Jazzy
|
|
120
124
|
def init_constraints(hash, raw_decl)
|
121
125
|
raw_constraints = %i[swiftGenerics swiftExtension].flat_map do |key|
|
122
126
|
next [] unless container = hash[key]
|
127
|
+
|
123
128
|
container[:constraints] || []
|
124
129
|
end
|
125
130
|
|
@@ -146,9 +151,9 @@ module Jazzy
|
|
146
151
|
end
|
147
152
|
|
148
153
|
def init_doc_comments(comments_hash)
|
149
|
-
self.doc_comments =
|
150
|
-
|
151
|
-
|
154
|
+
self.doc_comments = comments_hash[:lines]
|
155
|
+
.map { |l| l[:text] }
|
156
|
+
.join("\n")
|
152
157
|
end
|
153
158
|
|
154
159
|
# Availability
|
@@ -171,8 +176,8 @@ module Jazzy
|
|
171
176
|
next nil
|
172
177
|
end
|
173
178
|
|
174
|
-
str +=
|
175
|
-
str +=
|
179
|
+
str += ", message: \"#{avail[:message]}\"" if avail[:message]
|
180
|
+
str += ", renamed: \"#{avail[:renamed]}\"" if avail[:renamed]
|
176
181
|
|
177
182
|
str + ')'
|
178
183
|
end.compact
|
@@ -188,8 +193,6 @@ module Jazzy
|
|
188
193
|
# Sort order
|
189
194
|
include Comparable
|
190
195
|
|
191
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
192
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
193
196
|
def <=>(other)
|
194
197
|
# Things with location: order by file/line/column
|
195
198
|
# (pls tell what wheel i am reinventing :/)
|
@@ -198,6 +201,7 @@ module Jazzy
|
|
198
201
|
if location[:line] == other_loc[:line]
|
199
202
|
return location[:character] <=> other_loc[:character]
|
200
203
|
end
|
204
|
+
|
201
205
|
return location[:line] <=> other_loc[:line]
|
202
206
|
end
|
203
207
|
return location[:filename] <=> other_loc[:filename]
|
@@ -209,10 +213,9 @@ module Jazzy
|
|
209
213
|
|
210
214
|
# Things without a location: by name and then USR
|
211
215
|
return usr <=> other.usr if name == other.name
|
216
|
+
|
212
217
|
name <=> other.name
|
213
218
|
end
|
214
|
-
# rubocop:enable Metrics/PerceivedComplexity
|
215
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
216
219
|
end
|
217
220
|
end
|
218
221
|
end
|
@@ -1,63 +1,67 @@
|
|
1
|
+
/*! Jazzy - https://github.com/realm/jazzy
|
2
|
+
* Copyright Realm Inc.
|
3
|
+
* SPDX-License-Identifier: MIT
|
4
|
+
*/
|
1
5
|
/* Credit to https://gist.github.com/wataru420/2048287 */
|
2
6
|
|
3
7
|
.highlight {
|
4
|
-
.c { color: #999988; font-style: italic }
|
5
|
-
.err { color: #a61717; background-color: #e3d2d2 }
|
6
|
-
.k { color: #000000; font-weight: bold }
|
7
|
-
.o { color: #000000; font-weight: bold }
|
8
|
-
.cm { color: #999988; font-style: italic }
|
9
|
-
.cp { color: #999999; font-weight: bold }
|
10
|
-
.c1 { color: #999988; font-style: italic }
|
11
|
-
.cs { color: #999999; font-weight: bold; font-style: italic }
|
12
|
-
.gd { color: #000000; background-color: #ffdddd }
|
13
|
-
.gd .x { color: #000000; background-color: #ffaaaa }
|
14
|
-
.ge { color: #000000; font-style: italic }
|
15
|
-
.gr { color: #aa0000 }
|
16
|
-
.gh { color: #999999 }
|
17
|
-
.gi { color: #000000; background-color: #ddffdd }
|
18
|
-
.gi .x { color: #000000; background-color: #aaffaa }
|
19
|
-
.go { color: #888888 }
|
20
|
-
.gp { color: #555555 }
|
21
|
-
.gs { font-weight: bold }
|
22
|
-
.gu { color: #aaaaaa }
|
23
|
-
.gt { color: #aa0000 }
|
24
|
-
.kc { color: #000000; font-weight: bold }
|
25
|
-
.kd { color: #000000; font-weight: bold }
|
26
|
-
.kp { color: #000000; font-weight: bold }
|
27
|
-
.kr { color: #000000; font-weight: bold }
|
28
|
-
.kt { color: #445588; }
|
29
|
-
.m { color: #009999 }
|
30
|
-
.s { color: #d14 }
|
31
|
-
.na { color: #008080 }
|
32
|
-
.nb { color: #0086B3 }
|
33
|
-
.nc { color: #445588; font-weight: bold }
|
34
|
-
.no { color: #008080 }
|
35
|
-
.ni { color: #800080 }
|
36
|
-
.ne { color: #990000; font-weight: bold }
|
37
|
-
.nf { color: #990000; }
|
38
|
-
.nn { color: #555555 }
|
39
|
-
.nt { color: #000080 }
|
40
|
-
.nv { color: #008080 }
|
41
|
-
.ow { color: #000000; font-weight: bold }
|
42
|
-
.w { color: #bbbbbb }
|
43
|
-
.mf { color: #009999 }
|
44
|
-
.mh { color: #009999 }
|
45
|
-
.mi { color: #009999 }
|
46
|
-
.mo { color: #009999 }
|
47
|
-
.sb { color: #d14 }
|
48
|
-
.sc { color: #d14 }
|
49
|
-
.sd { color: #d14 }
|
50
|
-
.s2 { color: #d14 }
|
51
|
-
.se { color: #d14 }
|
52
|
-
.sh { color: #d14 }
|
53
|
-
.si { color: #d14 }
|
54
|
-
.sx { color: #d14 }
|
55
|
-
.sr { color: #009926 }
|
56
|
-
.s1 { color: #d14 }
|
57
|
-
.ss { color: #990073 }
|
58
|
-
.bp { color: #999999 }
|
59
|
-
.vc { color: #008080 }
|
60
|
-
.vg { color: #008080 }
|
61
|
-
.vi { color: #008080 }
|
62
|
-
.il { color: #009999 }
|
8
|
+
.c { color: #999988; font-style: italic } // Comment
|
9
|
+
.err { color: #a61717; background-color: #e3d2d2 } // Error
|
10
|
+
.k { color: #000000; font-weight: bold } // Keyword
|
11
|
+
.o { color: #000000; font-weight: bold } // Operator
|
12
|
+
.cm { color: #999988; font-style: italic } // Comment.Multiline
|
13
|
+
.cp { color: #999999; font-weight: bold } // Comment.Preproc
|
14
|
+
.c1 { color: #999988; font-style: italic } // Comment.Single
|
15
|
+
.cs { color: #999999; font-weight: bold; font-style: italic } // Comment.Special
|
16
|
+
.gd { color: #000000; background-color: #ffdddd } // Generic.Deleted
|
17
|
+
.gd .x { color: #000000; background-color: #ffaaaa } // Generic.Deleted.Specific
|
18
|
+
.ge { color: #000000; font-style: italic } // Generic.Emph
|
19
|
+
.gr { color: #aa0000 } // Generic.Error
|
20
|
+
.gh { color: #999999 } // Generic.Heading
|
21
|
+
.gi { color: #000000; background-color: #ddffdd } // Generic.Inserted
|
22
|
+
.gi .x { color: #000000; background-color: #aaffaa } // Generic.Inserted.Specific
|
23
|
+
.go { color: #888888 } // Generic.Output
|
24
|
+
.gp { color: #555555 } // Generic.Prompt
|
25
|
+
.gs { font-weight: bold } // Generic.Strong
|
26
|
+
.gu { color: #aaaaaa } // Generic.Subheading
|
27
|
+
.gt { color: #aa0000 } // Generic.Traceback
|
28
|
+
.kc { color: #000000; font-weight: bold } // Keyword.Constant
|
29
|
+
.kd { color: #000000; font-weight: bold } // Keyword.Declaration
|
30
|
+
.kp { color: #000000; font-weight: bold } // Keyword.Pseudo
|
31
|
+
.kr { color: #000000; font-weight: bold } // Keyword.Reserved
|
32
|
+
.kt { color: #445588; } // Keyword.Type
|
33
|
+
.m { color: #009999 } // Literal.Number
|
34
|
+
.s { color: #d14 } // Literal.String
|
35
|
+
.na { color: #008080 } // Name.Attribute
|
36
|
+
.nb { color: #0086B3 } // Name.Builtin
|
37
|
+
.nc { color: #445588; font-weight: bold } // Name.Class
|
38
|
+
.no { color: #008080 } // Name.Constant
|
39
|
+
.ni { color: #800080 } // Name.Entity
|
40
|
+
.ne { color: #990000; font-weight: bold } // Name.Exception
|
41
|
+
.nf { color: #990000; } // Name.Function
|
42
|
+
.nn { color: #555555 } // Name.Namespace
|
43
|
+
.nt { color: #000080 } // Name.Tag
|
44
|
+
.nv { color: #008080 } // Name.Variable
|
45
|
+
.ow { color: #000000; font-weight: bold } // Operator.Word
|
46
|
+
.w { color: #bbbbbb } // Text.Whitespace
|
47
|
+
.mf { color: #009999 } // Literal.Number.Float
|
48
|
+
.mh { color: #009999 } // Literal.Number.Hex
|
49
|
+
.mi { color: #009999 } // Literal.Number.Integer
|
50
|
+
.mo { color: #009999 } // Literal.Number.Oct
|
51
|
+
.sb { color: #d14 } // Literal.String.Backtick
|
52
|
+
.sc { color: #d14 } // Literal.String.Char
|
53
|
+
.sd { color: #d14 } // Literal.String.Doc
|
54
|
+
.s2 { color: #d14 } // Literal.String.Double
|
55
|
+
.se { color: #d14 } // Literal.String.Escape
|
56
|
+
.sh { color: #d14 } // Literal.String.Heredoc
|
57
|
+
.si { color: #d14 } // Literal.String.Interpol
|
58
|
+
.sx { color: #d14 } // Literal.String.Other
|
59
|
+
.sr { color: #009926 } // Literal.String.Regex
|
60
|
+
.s1 { color: #d14 } // Literal.String.Single
|
61
|
+
.ss { color: #990073 } // Literal.String.Symbol
|
62
|
+
.bp { color: #999999 } // Name.Builtin.Pseudo
|
63
|
+
.vc { color: #008080 } // Name.Variable.Class
|
64
|
+
.vg { color: #008080 } // Name.Variable.Global
|
65
|
+
.vi { color: #008080 } // Name.Variable.Instance
|
66
|
+
.il { color: #009999 } // Literal.Number.Integer.Long
|
63
67
|
}
|