Skip to content

Support sass-embedded#196

Merged
k0kubun merged 1 commit into
k0kubun:masterfrom
ntkme:sass-embedded
Nov 8, 2022
Merged

Support sass-embedded#196
k0kubun merged 1 commit into
k0kubun:masterfrom
ntkme:sass-embedded

Conversation

@ntkme

@ntkme ntkme commented Nov 8, 2022

Copy link
Copy Markdown
Contributor

Fixes #195.

In sass-embedded, it is protobuf returning frozen string as result. While we could unfreeze it after we get the result in upstream libraries e.g. sass-embedd or tilt, it is intentionally left frozen for best performance. Therefore, this PR updates the code to conditionally use .gsub vs .gsub!. I did a benchmark locally and it is consistently at least around 5% faster than (+text).gsub! on my machine.

@k0kubun k0kubun left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@k0kubun k0kubun merged commit ae5d2bf into k0kubun:master Nov 8, 2022
@ntkme ntkme deleted the sass-embedded branch November 8, 2022 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SCSS filter not working with sass-embedded

2 participants