@emailens/engine 0.9.2 → 0.9.3

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/dist/index.js CHANGED
@@ -8772,8 +8772,9 @@ var PREHEADER_ACCESSORY_PATTERNS = [
8772
8772
  /color\s*:\s*transparent/,
8773
8773
  /line-height\s*:\s*0/
8774
8774
  ];
8775
+ var INVISIBLE_CHARS = /[​-‏⁠᠎­]/g;
8775
8776
  function isLikelyPreheader(style, text) {
8776
- if (text.length > 200) return false;
8777
+ if (text.replace(INVISIBLE_CHARS, "").trim().length > 200) return false;
8777
8778
  return PREHEADER_ACCESSORY_PATTERNS.some((p) => p.test(style));
8778
8779
  }
8779
8780
  function checkHiddenText($) {