Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

fix: variable interpolation #102

Merged
merged 2 commits into from
Nov 21, 2021
Merged

fix: variable interpolation #102

merged 2 commits into from
Nov 21, 2021

Conversation

SwiftWinds
Copy link
Contributor

@SwiftWinds SwiftWinds commented Nov 15, 2021

Fixes #101

I changed the regex to also allow for matching a whitespace. This guarantees that this matches cases where the variable is not interpolated as the last word in the line, but rather somewhere in the middle of the line, which was the edge case mentioned in #101 (and actually the same edge case as giuseppeg/styled-jsx-plugin-sass#32 (comment) from the original repo that this fork originated).

@SwiftWinds SwiftWinds changed the title Fix variable interpolation fix: fix variable interpolation Nov 15, 2021
allow for variables to be interpolated mid-sentence

fixes Thream#101
@SwiftWinds SwiftWinds changed the title fix: fix variable interpolation fix: variable interpolation Nov 15, 2021
Copy link
Member

@theoludwig theoludwig left a comment

Choose a reason for hiding this comment

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

Thanks for your PR! @SwiftWinds

Could you add a test case, so we can avoid regression?

@SwiftWinds
Copy link
Contributor Author

Sure! will do :)

@SwiftWinds
Copy link
Contributor Author

I added tests. Please let me know if they suffice :)

Copy link
Member

@theoludwig theoludwig left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@theoludwig theoludwig merged commit 18731a8 into Thream:develop Nov 21, 2021
@github-actions
Copy link

🎉 This PR is included in version 4.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@SwiftWinds SwiftWinds deleted the patch-1 branch November 21, 2021 10:48
@SwiftWinds
Copy link
Contributor Author

SwiftWinds commented Nov 21, 2021

Thanks for merging! happy to contribute :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] variable interpolation not working
2 participants