We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b92405 commit 1fc3d97Copy full SHA for 1fc3d97
src/functions.cpp
@@ -1020,16 +1020,19 @@ namespace Sass {
1020
std::string str = unquote(s->value());
1021
1022
size_t size = utf8::distance(str.begin(), str.end());
1023
+
1024
if (end_at <= size * -1.0 && size > 1) {
- end_at += size;
1025
- if (end_at == 0) end_at = 1;
+ end_at = 0;
1026
}
1027
if (end_at < 0) {
1028
end_at += size + 1;
1029
if (end_at == 0) end_at = 1;
1030
1031
if (end_at > size) { end_at = (double)size; }
1032
- if (start_at < 0) { start_at += size + 1; }
+ if (start_at < 0) {
1033
+ start_at += size + 1;
1034
+ if (start_at < 0) start_at = 0;
1035
+ }
1036
else if (start_at == 0) { ++ start_at; }
1037
1038
if (start_at <= end_at)
0 commit comments