Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line matching #17

Open
mjgpy3 opened this issue Feb 19, 2021 · 1 comment
Open

Multi-line matching #17

mjgpy3 opened this issue Feb 19, 2021 · 1 comment
Assignees

Comments

@mjgpy3
Copy link

mjgpy3 commented Feb 19, 2021

Hello 👋

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!

@filipesperandio
Copy link

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.

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

No branches or pull requests

2 participants