You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our codebase we embed translation functions in JSX code blocks, using a translation function t, like so
<p>
{t('GREET_CODE_CLIMATE_KEY')}
</p>
An error I commonly make is to forget the curly-braces (which puts the literal function rather than its results).
I can easily check this using grep like so
grep -Rz "[^=]>[[:space:]]*t("*
The problem here is that the [[:space:]] character class needs to be able to capture newlines for this to work. This functionality is enabled by the -z flag.
Is there a way to do this with this plugin, as is? If not would such functionality be desirable/easy to add?
I'm happy to help add if such a change is valuable!
The text was updated successfully, but these errors were encountered:
Hey @mjgpy3 we don't use much this plugin internally so it is hard for me to tell without digging deeper.
Contributions are always welcome! If you are willing to open a PR, feel free to tag me for review.
Hello 👋
In our codebase we embed translation functions in JSX code blocks, using a translation function
t
, like soAn error I commonly make is to forget the curly-braces (which puts the literal function rather than its results).
I can easily check this using
grep
like soThe problem here is that the
[[:space:]]
character class needs to be able to capture newlines for this to work. This functionality is enabled by the-z
flag.Is there a way to do this with this plugin, as is? If not would such functionality be desirable/easy to add?
I'm happy to help add if such a change is valuable!
The text was updated successfully, but these errors were encountered: