Closed mappu closed 5 years ago
Thanks for reporting this issue. I'll try to fix this in the next release.
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
:
JsExtractors.callExpression('...', {
arguments: { ... },
comments: {
otherLineLeading: true,
sameLineLeading: true,
sameLineTrailing: true
}
})
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 https://github.com/lukasgeiter/gettext-extractor/issues/4#issuecomment-304471094 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.