Skip to content

Commit e23f69f

Browse files
committed
Merge remote-tracking branch 'noprompt/master' into css-token-kinds
Conflicts: etc/todo/scanners/css.rb
2 parents 40b9083 + 4eb4324 commit e23f69f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/coderay/scanners/css.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ class CSS < Scanner
77

88
KINDS_NOT_LOC = [
99
:comment,
10-
:class, :pseudo_class, :type,
11-
:constant, :directive,
10+
:class, :pseudo_class, :tag,
11+
:id, :directive,
1212
:key, :value, :operator, :color, :float, :string,
1313
:error, :important,
1414
] # :nodoc:
@@ -64,13 +64,13 @@ def scan_tokens encoder, options
6464
elsif case states.last
6565
when :initial, :media
6666
if match = scan(/(?>#{RE::Ident})(?!\()|\*/ox)
67-
encoder.text_token match, :type
67+
encoder.text_token match, :tag
6868
next
6969
elsif match = scan(RE::Class)
7070
encoder.text_token match, :class
7171
next
7272
elsif match = scan(RE::Id)
73-
encoder.text_token match, :constant
73+
encoder.text_token match, :id
7474
next
7575
elsif match = scan(RE::PseudoClass)
7676
encoder.text_token match, :pseudo_class
@@ -99,7 +99,7 @@ def scan_tokens encoder, options
9999

100100
when :media_before_name
101101
if match = scan(RE::Ident)
102-
encoder.text_token match, :type
102+
encoder.text_token match, :tag
103103
states[-1] = :media_after_name
104104
next
105105
end

lib/coderay/token_kinds.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module CodeRay
3939
:function => 'function',
4040
:global_variable => 'global-variable',
4141
:hex => 'hex',
42+
:id => 'id',
4243
:imaginary => 'imaginary',
4344
:important => 'important',
4445
:include => 'include',

0 commit comments

Comments
 (0)