Skip to content
This repository was archived by the owner on Apr 5, 2018. It is now read-only.

Does not detect strings inside url() function #7

Open
nickdunn opened this issue Jan 11, 2015 · 1 comment
Open

Does not detect strings inside url() function #7

nickdunn opened this issue Jan 11, 2015 · 1 comment
Assignees
Labels

Comments

@nickdunn
Copy link

Not common practice, I know, but I've found this plugin won't detect the following:

{{ url('mystring'|t) }}

To achieve this I relaxed the rule that the translated string must be surrounded by {{ or {%, instead it must be surrounded by at least a space.

Regex:

'/(\s*.*?)\'(.*?)\'.*?\|.*?(t|translate)(\(.*?\)|).*?(\s)/',

Example:

url( 'mystring'|t )

Quite brittle and not the best approach, but it got me past a deadline!

@boboldehampsink
Copy link
Owner

Thanks, this and one other issue have to be resolved by me creating a regex pattern that I'm working on, but is a though one.

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

No branches or pull requests

2 participants