Interkarma / daggerfall-unity

Open source recreation of Daggerfall in the Unity engine
http://www.dfworkshop.net
MIT License
2.73k stars 331 forks source link

Added new terminator for macros that could be used for postfixes #2552

Closed Jagget closed 5 months ago

Jagget commented 10 months ago

Added new terminator for macros that could be used for postfixes

KABoissonneault commented 5 months ago

Alright I made myself a small test suite for running this. I tried these strings as a reference.

   "Hello",
   "Hello, %di!"
   "Hello %di, mate!"
   "Hello, %di|ern"
  "Hello, %di\\|ern"

Results before: image

Results after: image

The line with the \ is there in order to support the case where someone might want to print a special character immediately after a macro. This PR does not change how this is handled, so we can still add support for this in the future.

I think this is fine.