|
33 | 33 | *
|
34 | 34 | */
|
35 | 35 | class lessc {
|
36 |
| - public static $VERSION = "v0.3.2"; |
| 36 | + public static $VERSION = "v0.3.2-dev"; |
37 | 37 | protected $buffer;
|
38 | 38 | protected $count;
|
39 | 39 | protected $line;
|
@@ -785,30 +785,36 @@ function func(&$func) {
|
785 | 785 |
|
786 | 786 | if ($this->match('(%|[\w\-_][\w\-_:\.]*)', $m) && $this->literal('(')) {
|
787 | 787 | $fname = $m[1];
|
788 |
| - if ($fname == 'url') { |
789 |
| - $this->to(')', $content, true); |
790 |
| - $args = array('string', $content); |
791 |
| - } else { |
792 |
| - $args = array(); |
793 |
| - while (true) { |
794 |
| - $ss = $this->seek(); |
795 |
| - if ($this->keyword($name) && $this->literal('=') && $this->expressionList($value)) { |
796 |
| - $args[] = array('list', '=', array(array('keyword', $name), $value)); |
797 |
| - } else { |
798 |
| - $this->seek($ss); |
799 |
| - if ($this->expressionList($value)) { |
800 |
| - $args[] = $value; |
801 |
| - } |
802 |
| - } |
803 | 788 |
|
804 |
| - if (!$this->literal(',')) break; |
| 789 | + $s_pre_args = $this->seek(); |
| 790 | + |
| 791 | + $args = array(); |
| 792 | + while (true) { |
| 793 | + $ss = $this->seek(); |
| 794 | + // this ugly nonsense is for ie filter properties |
| 795 | + if ($this->keyword($name) && $this->literal('=') && $this->expressionList($value)) { |
| 796 | + $args[] = array('list', '=', array(array('keyword', $name), $value)); |
| 797 | + } else { |
| 798 | + $this->seek($ss); |
| 799 | + if ($this->expressionList($value)) { |
| 800 | + $args[] = $value; |
| 801 | + } |
805 | 802 | }
|
806 |
| - $args = array('list', ',', $args); |
| 803 | + |
| 804 | + if (!$this->literal(',')) break; |
807 | 805 | }
|
| 806 | + $args = array('list', ',', $args); |
808 | 807 |
|
809 | 808 | if ($this->literal(')')) {
|
810 | 809 | $func = array('function', $fname, $args);
|
811 | 810 | return true;
|
| 811 | + } elseif ($fname == 'url') { |
| 812 | + // couldn't parse and in url? treat as string |
| 813 | + $this->seek($s_pre_args); |
| 814 | + if ($this->to(')', $content, true) && $this->literal(')')) { |
| 815 | + $func = array('function', $fname,array('string', $content)); |
| 816 | + return true; |
| 817 | + } |
812 | 818 | }
|
813 | 819 | }
|
814 | 820 |
|
|
0 commit comments