Closed sebastianludwig closed 6 years ago
👍
I'm happy with this solution. It's unfortunate that we have to handle the two cases in two separate ways, but we can blame Android for that as they handle strings in two different ways.
This looks great! Thanks so much for all of the investigations and the fix for this complicated issue. One minor suggestion for how to improve the README. If you have time to fix that up, great! Otherwise I'll merge this in the next day or two and update it myself.
Actually, I'll get this merged now.
Previously discussed in #212.
The original issue was that Twine escaped all
<
with<
. This made it impossible to use references to styled strings directly in a layout file. #216 changed this behaviour to always leave styling tags alone and never escape<b>
and friends. This however made it very cumbersome to combine placeholders with styling. Previous to #216 it was possible to writeas suggested by the documentation.
Currently (after #216) users have to write
This PR tries to fix the introduced regression and offer the best of both worlds:
getText()
getText()
+fromHtml
wayTL;DR: We made it worse, this makes it better.
As you were involved in the previous discussion @Aqua-Ye, @jpm-polymorph, any thoughts about this?