Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Identify the Bug
Fixes the bug that was addressed in less-cache#6.
Description of the Change
Inline JavaScript (within backticks) will once again be tolerated within certain LESS constructs. This is a feature I was using so that I could write
instead of
Less.js has deprecated this behavior, but we haven’t, and it’s good not to break stuff.
Alternate Designs
There is an alternative way of pulling this off with
@plugin
rules, but it only works in Less v4, and there’s no simple way to offer up the right solution for the user’s Pulsar version, so I’ll hold off on adopting that approach in my syntax theme until I’m certain it won’t break for the entirely fictional other people who are also usingvibrant-ink-redux
as their syntax theme.Possible Drawbacks
I can’t think of any. This is no less secure than what we were already doing, and I don’t think it’s a security problem at all, since the JS inside a
less
file is ultimately no less sandboxed than the JS we allow a package to run otherwise.Verification Process
Wrote a unit test in
less-cache
to demonstrate the fix. If CI passes, we should be good.Release Notes
Restored ability for
less
files in packages to use inline JavaScript inside backticks