-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from Pita/feature/singleSpaceFix
Correctly remove all empty jsx text nodes, fixes #67
- Loading branch information
Showing
3 changed files
with
34 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Trans } from "react-i18next"; | ||
|
||
<Trans i18nKey="key1"> | ||
I read the{" "} | ||
<a | ||
href="https://www.example.com/tos" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
TOS | ||
</a>{" "} | ||
and the{" "} | ||
<a | ||
href="https://www.example.com/privacy" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Privacy Policy | ||
</a>{" "} | ||
and accept them. | ||
</Trans>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"description": "test that i18next can deal with single spaces correctly", | ||
"pluginOptions": { | ||
"useI18nextDefaultValue": true | ||
}, | ||
"expectValues": { | ||
"key1": "I read the <2>TOS</2> and the <6>Privacy Policy</6> and accept them." | ||
} | ||
} |