5e-Framework
5e-Framework copied to clipboard
Convert repeated code blocks to User Defined Functions
Is your feature request related to a problem? Please describe. Some code blocks show up repeatedly throughout the codebase. It creates a cluttered codebase
Describe the solution you'd like Convert repeated blocks into User Defined Functions.
Describe alternatives you've considered Doing nothing is a valid option.
Additional context The capitalize function is the most obvious candidate for conversion. The following code shows up ~50 times
[h:CapitalName=capitalize(subclass)]
[h:CapitalName=replace(CapitalName,"(?<=\\s)Of(?=\\s)","of")]
[h:CapitalName=replace(CapitalName,"(?<=\\s)A(?=n?\\s)","a")]
[h:CapitalName=replace(CapitalName,"(?<=\\s)Th(?=(?:e|at|ose)\\s)","th")]
[h:CapitalName=replace(CapitalName,"'S(?=\\s)","'s")]
https://lmwcs.com/rptools/wiki/defineFunction
oh yeah, good idea, i'll do that