Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error indicator not unicode aware #2404

Closed
mgreter opened this issue May 30, 2017 · 0 comments · Fixed by #2543
Closed

Error indicator not unicode aware #2404

mgreter opened this issue May 30, 2017 · 0 comments · Fixed by #2543

Comments

@mgreter
Copy link
Contributor

mgreter commented May 30, 2017

With latest perl-libsass we discovered two bugs in how libsass creates the error indicator (the excerpt of error line with arrow indicator). First e.pstate.src does not seems to reference the right content when parsing interpolated selectors. Second the algorithm to create the excerpt is not unicode aware, as it only counts bytes, which can lead to unicode errors if implementors have strict rules for their strings (as perl does).

I.e. the following line should use utf8::advance and similar helpers:

msg_stream << ">> " << std::string(line_beg + move_in, line_end - shorten) << "\n";

Will post a hotfix to solve the most urgent issue, since it is currently failing most of perl-libsass installs.

mgreter added a commit to mgreter/libsass that referenced this issue May 30, 2017
@xzyfer xzyfer added this to the 3.5.0.beta.4 milestone May 30, 2017
mgreter added a commit that referenced this issue May 30, 2017
Hotfix issue with invalid error indicator (#2404)
mgreter added a commit to sass/perl-libsass that referenced this issue Nov 17, 2017
mgreter added a commit to sass/perl-libsass that referenced this issue Nov 21, 2017
mgreter added a commit to sass/perl-libsass that referenced this issue Nov 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants