Add support for maps with numeric keys#81
Merged
PlentyCodeDev merged 1 commit intoJun 23, 2022
Conversation
davidsmith2
commented
Jun 20, 2022
| public static wrapCss(cssDeclaration: IDeclaration, useInspect: boolean): string { | ||
| if (useInspect) { | ||
| return `${WRAPPER_CSS_ID}.${cssDeclaration.name}{content:"#{inspect(${cssDeclaration.value})}";}`; | ||
| return `${WRAPPER_CSS_ID}._${cssDeclaration.name}{content:"#{inspect(${cssDeclaration.value})}";}`; |
Contributor
Author
There was a problem hiding this comment.
The underscore is required to avoid errors like the following:
Error: Expected identifier.
╷
46 │ #sass-export-id.100{content:"#{inspect(80%)}";}
│ ^
╵
PlentyCodeDev
approved these changes
Jun 23, 2022
Member
PlentyCodeDev
left a comment
There was a problem hiding this comment.
looks great, thank you! 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds support for Sass Maps that have numeric keys. It does this by updating the sass-export parser to allow a digit to appear as the first character in map keys--this appears to be valid Sass, as the following Gist shows:
https://gist.github.com/davidsmith2/99d0ce1a7017690844e2adf80300b7aa
Resolves #74