branca
branca copied to clipboard
Add `Text`: a string abstraction to replace vanilla string objects
Initial discussion present in: https://github.com/python-visualization/folium/issues/1907
The Text
class will be used wherever plain strings are used (popup labels, tooltip text etc).
Currently, the only feature is to enable escaping characters (specifically: backticks, backslashes and double quotes). I chose these three for the time being since I saw them being used in some capacity in the codebase.
This PR is incomplete (need to add magic dunders, more examples, extension template to other operations, test cases etc) but I wanted to open a draft PR so we can begin our discussion without much ado.