@maizzle/framework 5.0.5 → 5.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maizzle/framework",
3
- "version": "5.0.5",
3
+ "version": "5.0.6",
4
4
  "description": "Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -103,12 +103,16 @@ const rewriteVMLs = (html, url) => {
103
103
  * Handle other sources inside MSO comments
104
104
  */
105
105
 
106
- // Make a | pipe-separated list of all the default tags and use it to create a regex
106
+ // Make a pipe-separated list of all the default tags and use it to create a regex
107
107
  const uniqueSourceAttributes = [
108
108
  ...new Set(Object.values(defaultTags).flatMap(Object.keys))
109
109
  ].join('|')
110
110
 
111
- const sourceAttrRegex = new RegExp(`\\b(${uniqueSourceAttributes})="([^"]+)"`, 'g')
111
+ /**
112
+ * This regex uses a negative lookbehind to avoid matching VML elements
113
+ * like <v:image> and <v:fill>, which are already handled above.
114
+ */
115
+ const sourceAttrRegex = new RegExp(`(?<!<v:image|fill[^>]*]*)\\b(${uniqueSourceAttributes})="([^"]+)"`, 'g')
112
116
 
113
117
  // Replace all the source attributes inside MSO comments
114
118
  html = html.replace(/<!--\[if [^\]]+\]>[\s\S]*?<!\[endif\]-->/g, (msoBlock) => {