-
Notifications
You must be signed in to change notification settings - Fork 515
Commit 2fb4296
Added library functions & better string handling
quote() and unquote() format functions can remove and add quotes around the
arguments passed to them.
eg. say you have some complex css syntax that can't be parsed, you can
use string operations and unquote() to do a raw output.
@color: #aabbcc;
some-property: unquote("[doSomething color: {@color}]");
outputs:
some-property: [doSomething color: #aabbcc];
If you subclass lessc then you can add your own functions, prefix
them with lib_ to make them visible. Take a look at the implementations
of lib_quote and lib_unquote as an example (they are very short).
Improved string parsing and concatenation1 parent 25b17ba commit 2fb4296
1 file changed
+29
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | - | ||
434 | + | ||
435 | 435 | | |
436 | - | ||
436 | + | ||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | + | ||
758 | + | ||
759 | + | ||
760 | + | ||
761 | + | ||
762 | + | ||
763 | + | ||
757 | 764 | | |
758 | 765 | | |
759 | 766 | | |
760 | 767 | | |
761 | 768 | | |
762 | 769 | | |
763 | 770 | | |
771 | + | ||
772 | + | ||
773 | + | ||
774 | + | ||
775 | + | ||
776 | + | ||
777 | + | ||
778 | + | ||
779 | + | ||
780 | + | ||
781 | + | ||
782 | + | ||
783 | + | ||
784 | + | ||
785 | + | ||
786 | + | ||
764 | 787 | | |
765 | 788 | | |
766 | 789 | | |
| |||
837 | 860 | | |
838 | 861 | | |
839 | 862 | | |
840 | - | ||
841 | 863 | | |
842 | - | ||
843 | - | ||
844 | - | ||
864 | + | ||
845 | 865 | | |
846 | 866 | | |
847 | - | ||
848 | - | ||
849 | - | ||
850 | - | ||
851 | - | ||
867 | + | ||
868 | + | ||
852 | 869 | | |
853 | 870 | | |
854 | 871 | | |
| |||
1159 | 1176 | | |
1160 | 1177 | | |
1161 | 1178 | | |
1162 | - | ||
1179 | + | ||
1163 | 1180 | | |
1164 | 1181 | | |
1165 | 1182 | | |
| |||
0 commit comments