Skip to content

Commit fb06a23

Browse files
committed
nested id
1 parent 5612445 commit fb06a23

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/coderay/scanners/scss.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,13 @@ def scan_tokens encoder, options
7979
end
8080

8181
when :block
82-
# check for nested selectors class or element
82+
# check for nested selectors
8383
if match = scan(/(\.|\%)[-_a-zA-Z0-9]+/)
8484
encoder.text_token match, :class
8585
next
86-
# TODO: test for tag
87-
# assume standard block now
86+
elsif match = scan(RE::Id)
87+
encoder.text_token match, :id
88+
next
8889
elsif match = scan(/(?>#{RE::Ident})(?!\()/ox)
8990
if value_expected
9091
encoder.text_token match, :value

0 commit comments

Comments
 (0)