Open AlexMost opened 5 years ago
I attempted to recreate an analogy of this issue in the test suite. I know the JSX
is slightly different, but I think the conclusion might be similar:
// Analogy test case
const strong = '<Strong>';
expect(jt`${strong + `${jt`oh no`}` + strong} you did something wrong`)
This is broken down using buildArr
with the following args:
Strs [ '', ' you did something wrong' ]
Exprs [ '<Strong>oh no<Strong>' ]
and results in:
-[
- ""
- "<Strong>oh no<Strong>"
- " you did something wrong"
-]
The problem is because the first tagged templates return value is used directly in the final output of the jt
. I'm not sure if there's anyway to fix this right now, just wanted to post my findings.
Please let me know if I'm looking in the wrong place, I'd like to help out if I can!
EDIT: I should probably investigate inside the getMsgid
🙇
Example:
ttag update will not extract
oh no
https://github.com/ttag-org/ttag/issues/177#issuecomment-517524467