Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self closing tags are not supported (<br />) #3101

Open
Goye opened this issue Oct 4, 2022 · 4 comments
Open

Self closing tags are not supported (<br />) #3101

Goye opened this issue Oct 4, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Goye
Copy link

Goye commented Oct 4, 2022

Hey everyone hope all is going well,

I am trying to use the line break element without success, even if I try using the function form does not work. I guess this is happening will all these kinds of tags

Do you know what the problem might be? Or which file can I modify to fix it?

Thank you so much,

Screenshots

Screen Shot 2022-10-03 at 7 17 33 PM

Code snippet

{t({
	key: 'about.whoWeAre.lowFees.description',
	parameters: {
		s: <s />,
		strong: <strong />,
		br: <br />,
	},
})}

Enviorement

"@tolgee/react": "^4.9.2",
"react": "^17.0.2",
"next": "12.1.0",

@stepan662
Copy link
Collaborator

Hey, we are now using format.js for parsing tags and it doesn't support this, so now we don't have an easy way how to enable it. https://formatjs.io/docs/intl-messageformat#rich-text-support. We might change this by implementing our custom tag parser. Another thing is that we are preparing a new core library now, so after we release that, we might look at this again.

@Goye
Copy link
Author

Goye commented Oct 4, 2022

Thanks for letting me know! @stepan662

@Goye Goye changed the title Self closing tag are not supported (<br />) Self closing tags are not supported (<br />) Oct 4, 2022
@bpetermann
Copy link

Hi,

just wanted to ask if there are any updates on this?

Thanks in advance!

@stepan662
Copy link
Collaborator

stepan662 commented Apr 3, 2023

Hey, sorry not yet. Will try to get to this, as I had multiple requests.
In mean time, you can use <br></br>, it's a bit ugly, but it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants