multitemplate
multitemplate copied to clipboard
Support template delimiters
This adds support for custom delimiters in multitemplate. It only works currently for AddFromStrings and AddFromFiles, primarily because it's easy for anyone to simply use .Delims() themselves on the returned template if it's not a template made up of other templates. But if there is desire to make this broader-reaching, I could update it.
Note that my preferred way of doing this would have been to add the options to, for example, NewRenderer(), but since Renderer and DynamicRenderer are just type aliases for maps, that would have broken existing code since anyone relying on those types to still be maps would be out of luck (especially since this project doesn't use go module versioning).
I also have not yet updated the examples, readme, tests, etc. with this new feature. If this PR is desired, I can do all that work, but for now this gave me what I needed for my project to use custom delimiters with multitemplate.
Fixes #24
@parnic I need this feature for support custom delimiters and avoid trouble with other js libraries :)
@parnic I need this feature for support custom delimiters and avoid trouble with other js libraries :)
Have at it.
Hope to merge into the master branch earlier. ^_^