5e-Framework icon indicating copy to clipboard operation
5e-Framework copied to clipboard

Convert repeated code blocks to User Defined Functions

Open KyleFS opened this issue 4 years ago • 1 comments

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

KyleFS avatar Jun 24 '20 02:06 KyleFS

oh yeah, good idea, i'll do that

rtakehara avatar Jun 26 '20 04:06 rtakehara