You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When upgrading to React 16.4 we noticed some weird behavior. Tags that used to be recognized by the bbcode-to-react parser were suddenly being displayed as text.
After doing some research, we found out that when registering tags for the parser, the first argument passed needs to be all lowercase. Even if the tag in the content string that is passed is not all lowercase.
So, if you register your tag like this, the tag will be recognized by the parser: parser.registerTag('centeredimage', ImageCenteredTag)
If you register your tag like this, the tag will not be recognized by the parser: parser.registerTag('centeredImage', ImageCenteredTag)
Interestingly, it doesn't matter which content string you pass to the parser, both will work. So the content string can be [centeredimage] or [centeredImage].
This is not a huge issue, and everything works as expected, but I just wanted to report these findings so other users can take note.
The text was updated successfully, but these errors were encountered:
When upgrading to React 16.4 we noticed some weird behavior. Tags that used to be recognized by the
bbcode-to-react
parser were suddenly being displayed as text.After doing some research, we found out that when registering tags for the parser, the first argument passed needs to be all lowercase. Even if the tag in the content string that is passed is not all lowercase.
So, if you register your tag like this, the tag will be recognized by the parser:
parser.registerTag('centeredimage', ImageCenteredTag)
If you register your tag like this, the tag will not be recognized by the parser:
parser.registerTag('centeredImage', ImageCenteredTag)
Interestingly, it doesn't matter which content string you pass to the parser, both will work. So the content string can be
[centeredimage]
or[centeredImage]
.This is not a huge issue, and everything works as expected, but I just wanted to report these findings so other users can take note.
The text was updated successfully, but these errors were encountered: