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
I have some situations where comments are not properly extracted. I don't have an exact test case, but it's something like:
multiple map key assignments
varx={"foo": translate("foo"),/// TRANSLATORS: description of foo"bar": translate("bar"),/// TRANSLATORS: description of bar"baz": translate("baz"),/// TRANSLATORS: description of baz}
In this case only the first comment would be extracted and matched.
Some long concatenation
varx="foo"+/// TRANSLATORS: comments for bartranslate("bar")+/// TRANSLATORS: comments for baztranslate("baz")+"foo";
In this case none of the comments are extracted and matched.
I read the discussion in #4 (comment) so I guess these constructs have some different representation in the AST that is not understood.
In my codebase I can work around this by extracting to a local variable first before building the longer construct. The comments can be extracted in this way, but, it's less clear.
The text was updated successfully, but these errors were encountered:
I've just published version 3.5.2 which should resolve the first issue.
As for the second example, this should already be working. However, you'll have to explicitly enable the extraction of comments on the previous line with otherLineLeading:
Hi, thanks for this project -
I have some situations where comments are not properly extracted. I don't have an exact test case, but it's something like:
In this case only the first comment would be extracted and matched.
In this case none of the comments are extracted and matched.
I read the discussion in #4 (comment) so I guess these constructs have some different representation in the AST that is not understood.
In my codebase I can work around this by extracting to a local variable first before building the longer construct. The comments can be extracted in this way, but, it's less clear.
The text was updated successfully, but these errors were encountered: