gizak / termui

Golang terminal dashboard
MIT License
13.06k stars 783 forks source link

Fix style parser to handle [ or ] in text without style #321

Open andrewarrow opened 1 year ago

andrewarrow commented 1 year ago

There is a problem with using [ or ] in text. Style Parser thinks you are going to supply a (style) block after and eats some of the chars:

https://github.com/gizak/termui/issues/311

This PR re-writes the logic to look for pairs or "](" and only processes style when needed and leaves normal [ or ] in text alone.