Closed cwitteveen closed 3 months ago
Hey @cwitteveen
thanks for the report. Could you please paste the file or part of the file for which the extraction doesn't work?
it also only matches when the id is on the same line as the key in the object
It's not an issue, because code is converted to a one line before looking for IDs:
The regex defined in the
ReactIntlKeyExtractor
to extract ids from thedefineMessages
function only ever matches the first id defined, and it also only matches when the id is on the same line as the key in the object. So nicely formatting your code breaks the extraction.Regex in the code: https://github.com/simplelocalize/simplelocalize-cli/blob/2e8bf5fcfc7daf9cbf21453a80ddf7dbc4ce0908/src/main/java/io/simplelocalize/cli/extraction/keys/ReactIntlKeyExtractor.java#L32
I entered the regex on regex101.com and tested it with a code sample.