lib/sass/selector/sequence.rb
# Groups a sequence into subsequences. The subsequences are determined by
# strings; adjacent non-string elements will be put into separate groups,
# but any element adjacent to a string will be grouped with that string.
#
# For example, `(A B "C" D E "F" G "H" "I" J)` will become `[(A) (B "C" D)
# (E "F" G "H" "I" J)]`.
#
# @param seq [Array]
# @return [Array<Array>]
Groups a sequence into subsequences. The subsequences are determined by
strings; adjacent non-string elements will be put into separate groups,
but any element adjacent to a string will be grouped with that string.


Groups a sequence into subsequences . The subsequences are determined by strings ; adjacent non - string elements will be put into separate groups but any element adjacent to a string will be grouped with that string .
def group_selectors(seq)
        newseq = []
        tail = seq.dup
        until tail.empty?
          head = []
          begin
            head << tail.shift
          end while !tail.empty? && head.last.is_a?(String) || tail.first.is_a?(String)
          newseq << head
        end
        return newseq
      end
def group_selectors ( seq ) newseq = [ ] tail = seq . dup until tail . empty? head = [ ] begin head << tail . shift end while ! tail . empty? && head . last . is_a? ( String ) || tail . first . is_a? ( String ) newseq << head end return newseq end
Groups a sequence into subsequences.
Groups a sequence into subsequences .
None
Array<Array>
seq
None