mjml2json icon indicating copy to clipboard operation
mjml2json copied to clipboard

Ensure regex matches the exact tag.

Open joshfoskett opened this issue 4 years ago • 0 comments

Currently, the regex will match the beginning of the tag (e.g. <mj-image*), instead of looking for an exact match. This works fine if you're using the default MJML components. However, if you have a custom component, like mj-image-variable, it will look for <mj-image*, which means it'll match <mj-image-variable, causing issues.

Current regex: https://regex101.com/r/OouqpK/1

Updated regex: https://regex101.com/r/e4fEY6/1/

joshfoskett avatar Jan 28 '21 19:01 joshfoskett