Leafo\ScssPhp\Compiler::extractInterpolation PHP Method

extractInterpolation() protected method

Extract interpolation; it doesn't need to be recursive, compileValue will handle that
protected extractInterpolation ( array $list ) : array
$list array
return array
    protected function extractInterpolation($list)
    {
        $items = $list[2];
        foreach ($items as $i => $item) {
            if ($item[0] === Type::T_INTERPOLATE) {
                $before = [Type::T_LIST, $list[1], array_slice($items, 0, $i)];
                $after = [Type::T_LIST, $list[1], array_slice($items, $i + 1)];
                return [Type::T_INTERPOLATED, $item, $before, $after];
            }
        }
        return $list;
    }
Compiler