8000 Scss scanner by Piderman · Pull Request #162 · rubychan/coderay · GitHub
[go: up one dir, main page]

Skip to content
8000

Scss scanner #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
nested id
  • Loading branch information
Piderman committed Feb 9, 2014
commit fb06a237c71d9876115bbf0cfed3a0d49d1467cd
7 changes: 4 additions & 3 deletions lib/coderay/scanners/scss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,13 @@ def scan_tokens encoder, options
end

when :block
# check for nested selectors class or element
# check for nested selectors
if match = scan(/(\.|\%)[-_a-zA-Z0-9]+/)
encoder.text_token match, :class
next
# TODO: test for tag
# assume standard block now
elsif match = scan(RE::Id)
encoder.text_token match, :id
next
elsif match = scan(/(?>#{RE::Ident})(?!\()/ox)
if value_expected
encoder.text_token match, :value
Expand Down
0