Skip to content

Conversation

@rrabb
Copy link

@rrabb rrabb commented May 6, 2019

Hello, I'm using your library as part of the gulp replace task and find it very useful. It is being added to node_modules via npm install.
However, I've encountered an issue with using json object pattern matching.

It's necessary to use suffix sometimes when there are unintended partial matches due to missing json keys in the pattern json object.
For example, be able to replace matches like @@env.css.darkStyle@@ instead of just @@env.css.darkStyle. This is needed to avoid erroneously substituting a partial match like @@env.css.darkStyle.headerColor with the @@env.css.darkStyle match (which is a serialized json object) when property "headerColor" is not found in the pattern json object under env.css.darkStyle.

rrabb added 3 commits May 6, 2019 18:32
For example, replace matches like @@env.css.darkStyle@@ instead of just @@env.css.darkStyle. This is needed to avoid erroneously substituting a partial match like @@env.css.darkStyle_header with the @@env.css.darkStyle when darkStyle_header is not found in json.
It's necessary to use suffix sometimes when there are unintended partial matches due to missing json keys in the pattern json object. 
For example, be able to replace matches like @@env.css.darkStyle@@ instead of just @@env.css.darkStyle. This is needed to avoid erroneously substituting a partial match like @@env.css.darkStyle_header with the @@env.css.darkStyle match when darkStyle_header is not found in the pattern json.
5793b26
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.

1 participant