is-html-tag-opening 4.0.19 → 4.0.23

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2010-2024 Roy Revelt and other contributors
3
+ Copyright (c) 2010-2025 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -60,6 +60,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
60
60
 
61
61
  MIT License.
62
62
 
63
- Copyright © 2010-2024 Roy Revelt and other contributors.
63
+ Copyright © 2010-2025 Roy Revelt and other contributors.
64
64
 
65
65
  <p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * @name is-html-tag-opening
3
3
  * @fileoverview Does an HTML tag start at given position?
4
- * @version 4.0.19
4
+ * @version 4.0.23
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/is-html-tag-opening/}
8
8
  */
9
9
 
10
- import{matchRight as x,matchRightIncl as N}from"string-match-left-right";import{left as c}from"string-left-right";var d={allowCustomTagNames:!1,skipOpeningBracket:!1},m="\\",g=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function b(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}import{left as T}from"string-left-right";function p(e,t){return e[t]==="<"||e[T(e,t)]==="<"}var f="4.0.19";var K=f;function U(e,t=0,h){if(typeof e!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(t)||t<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof t}", value being ${JSON.stringify(t,null,4)}`);let n={...d,...h},i="[\\\\ \\t\\r\\n/]*",r="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",w=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+${i}\\/?${i}>`,"g"),k=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*${i}>`,"g"),E=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),D=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${r}]+[-${r}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),y=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),O=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${r}]+[-${r}]*\\s*\\/?\\s*>`,"g"),R=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),v=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),$=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${i}[${r}]+)+${i}[\\\\/=>]`,""),V=new RegExp("^\\/\\s*\\w+s*>"),s=t?e.slice(t):e,a=c(e,t),l=!1,o=!1,B={cb:b,i:!0,trimCharsBeforeMatching:["/",m,"!"," "," ",`
11
- `,"\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||s[0]==="<"&&s[1]?.trim())&&($.test(s)||/^<\w+$/.test(s))||k.test(s)&&p(e,t)||D.test(s)||O.test(s)&&p(e,t)||v.test(s)||e[t]==="/"&&e[a]!=="<"&&V.test(s))&&(o=!0):(((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||(s[0]==="<"||s[0]==="/"&&(!e[a]||e[a]!=="<"))&&s[1]?.trim())&&$.test(s)||w.test(s)&&p(e,t)||E.test(s)||y.test(s)&&p(e,t)||R.test(s))&&(l=!0),l&&N(e,t,g,{cb:u=>u===void 0?((e[t]==="<"&&e[t+1]?.trim()||e[t-1]==="<")&&(o=!0),!0):u.toUpperCase()===u.toLowerCase()&&!/\d/.test(u)&&u!=="=",i:!0,trimCharsBeforeMatching:["<","/",m,"!"," "," ",`
12
- `,"\r"]})&&(o=!0)),!o&&e[t]==="<"&&e[t+1]?.trim()&&x(e,t,g,B)&&(o=!0),typeof e=="string"&&t<e.length&&o}export{d as defaults,U as isOpening,K as version};
10
+ import{matchRight as N,matchRightIncl as x}from"string-match-left-right";import{left as c}from"string-left-right";var d={allowCustomTagNames:!1,skipOpeningBracket:!1},m="\\",g=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function b(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}import{left as T}from"string-left-right";function p(e,t){return e[t]==="<"||e[T(e,t)]==="<"}var f="4.0.23";var K=f;function U(e,t=0,h){if(typeof e!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(t)||t<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof t}", value being ${JSON.stringify(t,null,4)}`);let n={...d,...h},i="[\\\\ \\t\\r\\n/]*",r="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",w=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+${i}\\/?${i}>`,"g"),k=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*${i}>`,"g"),E=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),D=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${r}]+[-${r}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),y=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),O=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${r}]+[-${r}]*\\s*\\/?\\s*>`,"g"),R=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),v=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),$=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${i}[${r}]+)+${i}[\\\\/=>]`,""),V=new RegExp("^\\/\\s*\\w+s*>"),s=t?e.slice(t):e,a=c(e,t),l=!1,o=!1,B={cb:b,i:!0,trimCharsBeforeMatching:["/",m,"!"," "," ",`
11
+ `,"\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||s[0]==="<"&&s[1]?.trim())&&($.test(s)||/^<\w+$/.test(s))||k.test(s)&&p(e,t)||D.test(s)||O.test(s)&&p(e,t)||v.test(s)||e[t]==="/"&&e[a]!=="<"&&V.test(s))&&(o=!0):(((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||(s[0]==="<"||s[0]==="/"&&(!e[a]||e[a]!=="<"))&&s[1]?.trim())&&$.test(s)||w.test(s)&&p(e,t)||E.test(s)||y.test(s)&&p(e,t)||R.test(s))&&(l=!0),l&&x(e,t,g,{cb:u=>u===void 0?((e[t]==="<"&&e[t+1]?.trim()||e[t-1]==="<")&&(o=!0),!0):u.toUpperCase()===u.toLowerCase()&&!/\d/.test(u)&&u!=="=",i:!0,trimCharsBeforeMatching:["<","/",m,"!"," "," ",`
12
+ `,"\r"]})&&(o=!0)),!o&&e[t]==="<"&&e[t+1]?.trim()&&N(e,t,g,B)&&(o=!0),typeof e=="string"&&t<e.length&&o}export{d as defaults,U as isOpening,K as version};
@@ -1,25 +1,25 @@
1
1
  /**
2
2
  * @name is-html-tag-opening
3
3
  * @fileoverview Does an HTML tag start at given position?
4
- * @version 4.0.19
4
+ * @version 4.0.23
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/is-html-tag-opening/}
8
8
  */
9
9
 
10
- "use strict";var isHtmlTagOpening=(()=>{var te=Object.create;var S=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var ne=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,ie=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable;var _=(e,t,s)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,D=(e,t)=>{for(var s in t||(t={}))q.call(t,s)&&_(e,s,t[s]);if(F)for(var s of F(t))se.call(t,s)&&_(e,s,t[s]);return e};var ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oe=(e,t)=>{for(var s in t)S(e,s,{get:t[s],enumerable:!0})},W=(e,t,s,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ne(t))!q.call(e,n)&&n!==s&&S(e,n,{get:()=>t[n],enumerable:!(o=re(t,n))||o.enumerable});return e};var H=(e,t,s)=>(s=e!=null?te(ie(e)):{},W(t||!e||!e.__esModule?S(s,"default",{value:e,enumerable:!0}):s,e)),le=e=>W(S({},"__esModule",{value:!0}),e);var x=ae(($e,J)=>{"use strict";J.exports=ue;function E(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function ue(e){if(e=e||{},e.circles)return fe(e);return e.proto?o:s;function t(n,a){for(var i=Object.keys(n),r=new Array(i.length),u=0;u<i.length;u++){var l=i[u],c=n[l];typeof c!="object"||c===null?r[l]=c:c instanceof Date?r[l]=new Date(c):ArrayBuffer.isView(c)?r[l]=E(c):r[l]=a(c)}return r}function s(n){if(typeof n!="object"||n===null)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return t(n,s);if(n instanceof Map)return new Map(t(Array.from(n),s));if(n instanceof Set)return new Set(t(Array.from(n),s));var a={};for(var i in n)if(Object.hasOwnProperty.call(n,i)!==!1){var r=n[i];typeof r!="object"||r===null?a[i]=r:r instanceof Date?a[i]=new Date(r):r instanceof Map?a[i]=new Map(t(Array.from(r),s)):r instanceof Set?a[i]=new Set(t(Array.from(r),s)):ArrayBuffer.isView(r)?a[i]=E(r):a[i]=s(r)}return a}function o(n){if(typeof n!="object"||n===null)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return t(n,o);if(n instanceof Map)return new Map(t(Array.from(n),o));if(n instanceof Set)return new Set(t(Array.from(n),o));var a={};for(var i in n){var r=n[i];typeof r!="object"||r===null?a[i]=r:r instanceof Date?a[i]=new Date(r):r instanceof Map?a[i]=new Map(t(Array.from(r),o)):r instanceof Set?a[i]=new Set(t(Array.from(r),o)):ArrayBuffer.isView(r)?a[i]=E(r):a[i]=o(r)}return a}}function fe(e){var t=[],s=[];return e.proto?a:n;function o(i,r){for(var u=Object.keys(i),l=new Array(u.length),c=0;c<u.length;c++){var $=u[c],b=i[$];if(typeof b!="object"||b===null)l[$]=b;else if(b instanceof Date)l[$]=new Date(b);else if(ArrayBuffer.isView(b))l[$]=E(b);else{var m=t.indexOf(b);m!==-1?l[$]=s[m]:l[$]=r(b)}}return l}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return o(i,n);if(i instanceof Map)return new Map(o(Array.from(i),n));if(i instanceof Set)return new Set(o(Array.from(i),n));var r={};t.push(i),s.push(r);for(var u in i)if(Object.hasOwnProperty.call(i,u)!==!1){var l=i[u];if(typeof l!="object"||l===null)r[u]=l;else if(l instanceof Date)r[u]=new Date(l);else if(l instanceof Map)r[u]=new Map(o(Array.from(l),n));else if(l instanceof Set)r[u]=new Set(o(Array.from(l),n));else if(ArrayBuffer.isView(l))r[u]=E(l);else{var c=t.indexOf(l);c!==-1?r[u]=s[c]:r[u]=n(l)}}return t.pop(),s.pop(),r}function a(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return o(i,a);if(i instanceof Map)return new Map(o(Array.from(i),a));if(i instanceof Set)return new Set(o(Array.from(i),a));var r={};t.push(i),s.push(r);for(var u in i){var l=i[u];if(typeof l!="object"||l===null)r[u]=l;else if(l instanceof Date)r[u]=new Date(l);else if(l instanceof Map)r[u]=new Map(o(Array.from(l),a));else if(l instanceof Set)r[u]=new Set(o(Array.from(l),a));else if(ArrayBuffer.isView(l))r[u]=E(l);else{var c=t.indexOf(l);c!==-1?r[u]=s[c]:r[u]=a(l)}}return t.pop(),s.pop(),r}}});var be={};oe(be,{defaults:()=>T,isOpening:()=>de,version:()=>he});function P(e){return typeof e!="string"?e:e.length?[e]:[]}var U=H(x(),1);var ve=(0,U.default)();function L(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function C(e){return typeof e=="string"}function Q(e,t){return L(e)&&C(t)&&t in e}var K={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},ce=e=>e+1;function me(e,t,s,o,n=!1,a=ce){var p;let i=typeof s=="function"?s():s;if(+t<0&&n&&i==="EOL")return i;let r=D(D({},K),o);if(t>=e.length&&!n)return!1;let u=n?1:s.length,l=0,c=!1,$=!1,b=!1,m=r.maxMismatches,f=t,y=!1,g=!1,d=!1;function w(){return l===1&&m<r.maxMismatches-1}for(;e[f];){let h=a(f);if(r.trimBeforeMatching&&e[f].trim()===""){if(!e[h]&&n&&s==="EOL")return!0;f=a(f);continue}if(r&&!r.i&&((p=r==null?void 0:r.trimCharsBeforeMatching)!=null&&p.includes(e[f]))||r!=null&&r.i&&r.trimCharsBeforeMatching&&r.trimCharsBeforeMatching.map(A=>A.toLowerCase()).includes(e[f].toLowerCase())){if(n&&s==="EOL"&&!e[h])return!0;f=a(f);continue}let M=h>f?s[s.length-u]:s[u-1];if(!r.i&&e[f]===M||r.i&&e[f].toLowerCase()===M.toLowerCase()){if(y||(y=!0),b||(b=!0),u===s.length){if(g=!0,m!==r.maxMismatches)return!1}else u===1&&(d=!0);if(u-=1,l++,w())return!1;if(!u)return l!==s.length||m===r.maxMismatches||!c?f:!1}else if(!c&&!l&&(c=!0),r.maxMismatches&&m&&f){m-=1;for(let A=0;A<=m;A++){let v=h>f?s[s.length-u+1+A]:s[u-2-A],O=e[a(f)];if(v&&(!r.i&&e[f]===v||r.i&&e[f].toLowerCase()===v.toLowerCase())&&(!r.firstMustMatch||u!==s.length)){if(l++,w())return!1;u-=2,y=!0;break}else if(O&&v&&(!r.i&&O===v||r.i&&O.toLowerCase()===v.toLowerCase())&&(!r.firstMustMatch||u!==s.length)){if(!l&&!r.hungry)return!1;u-=1,y=!0;break}else if(v===void 0&&m>=0&&y&&(!r.firstMustMatch||g)&&(!r.lastMustMatch||d))return f}y||($=f)}else return f===0&&u===1&&!r.lastMustMatch&&b?0:!1;if($!==!1&&$!==f&&($=!1),u<1)return f;f=a(f)}if(u>0)return n&&i==="EOL"?!0:r&&r.maxMismatches>=u&&b?$||0:!1}function z(e,t,s,o,n){var c,$,b;if(L(n)&&Q(n,"trimBeforeMatching")&&n&&typeof n.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${e}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(n.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let a=D(D({},K),n);if(typeof a.trimCharsBeforeMatching=="string"&&(a.trimCharsBeforeMatching=P(a.trimCharsBeforeMatching)),a.trimCharsBeforeMatching=a.trimCharsBeforeMatching.map(m=>C(m)?m:String(m)),!C(t)||!t.length)return!1;if(!Number.isInteger(s)||s<0)throw new Error(`string-match-left-right/${e}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof s}, equal to:
11
- ${JSON.stringify(s,null,4)}`);let i,r;if(C(o))i=[o];else if(Array.isArray(o))i=o;else if(!o)i=o;else if(typeof o=="function")i=[],i.push(o);else throw new Error(`string-match-left-right/${e}(): [THROW_ID_05] the third argument, whatToMatch, is neither string nor array of strings! It's ${typeof o}, equal to:
12
- ${JSON.stringify(o,null,4)}`);if(n&&!L(n))throw new Error(`string-match-left-right/${e}(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof n}", and equal to:
13
- ${JSON.stringify(n,null,4)}`);let u=0,l="";if((c=a==null?void 0:a.trimCharsBeforeMatching)!=null&&c.some((m,f)=>m.length>1?(u=f,l=m,!0):!1))throw new Error(`string-match-left-right/${e}(): [THROW_ID_07] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ${u} is longer than 1 character, ${l.length} (equals to ${l}). Please split it into separate characters and put into array as separate elements.`);if(!i||!Array.isArray(i)||Array.isArray(i)&&!i.length||Array.isArray(i)&&i.length===1&&C(i[0])&&!i[0].trim()){if(typeof a.cb=="function"){let f,y=s;if((e==="matchLeftIncl"||e==="matchRight")&&(y+=1),e[5]==="L")for(let p=y;p--;){let h=t[p];if((!a.trimBeforeMatching||a.trimBeforeMatching&&(h!=null&&h.trim()))&&(!(($=a.trimCharsBeforeMatching)!=null&&$.length)||h!==void 0&&!a.trimCharsBeforeMatching.includes(h))){f=p;break}}else if(e.startsWith("matchRight"))for(let p=y;p<t.length;p++){let h=t[p];if((!a.trimBeforeMatching||a.trimBeforeMatching&&h.trim())&&(!((b=a.trimCharsBeforeMatching)!=null&&b.length)||!a.trimCharsBeforeMatching.includes(h))){f=p;break}}if(f===void 0)return!1;let g=t[f],d=f+1,w="";return d&&d>0&&(w=t.slice(0,d)),e[5]==="L"||f&&f>0&&(w=t.slice(f)),a.cb(g,w,f)}let m="";throw n||(m=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${e}(): [THROW_ID_08] the third argument, "whatToMatch", was given as an empty string. This means, you intend to match purely by a callback. The callback was not set though, the opts key "cb" is not set!${m}`)}for(let m=0,f=i.length;m<f;m++){r=typeof i[m]=="function";let y=i[m],g,d,w="",p=s;e==="matchRight"?p+=1:e==="matchLeft"&&(p-=1);let h=me(t,p,y,a,r,M=>e[5]==="L"?M-1:M+1);if(h&&r&&typeof y=="function"&&y()==="EOL")return y()&&(!a.cb||a.cb(g,w,d))?y():!1;if(Number.isInteger(h)&&(d=e.startsWith("matchLeft")?h-1:h+1,e[5]==="L"?w=t.slice(0,h):w=t.slice(d)),d<0&&(d=void 0),t[d]&&(g=t[d]),Number.isInteger(h)&&(!a.cb||a.cb(g,w,d)))return y}return!1}function G(e,t,s,o){return z("matchRightIncl",e,t,s,o)}function Z(e,t,s,o){return z("matchRight",e,t,s,o)}var Y=H(x(),1);var Re=(0,Y.default)();var j="\xA0";function pe({str:e,idx:t,stopAtNewlines:s,stopAtRawNbsp:o}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),t<1))return null;if(e[~-t]&&(e[~-t].trim()||s&&`
14
- \r`.includes(e[~-t])||o&&e[~-t]===j))return~-t;if(e[t-2]&&(e[t-2].trim()||s&&`
15
- \r`.includes(e[t-2])||o&&e[t-2]===j))return t-2;for(let n=t;n--;)if(e[n]&&(e[n].trim()||s&&`
16
- \r`.includes(e[n])||o&&e[n]===j))return n;return null}function B(e,t=0){return pe({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}var T={allowCustomTagNames:!1,skipOpeningBracket:!1},I="\\",V=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function X(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}function N(e,t){return e[t]==="<"||e[B(e,t)]==="<"}var ee="4.0.19";var he=ee;function de(e,t=0,s){var A,v,O;if(typeof e!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(t)||t<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof t}", value being ${JSON.stringify(t,null,4)}`);let o=D(D({},T),s),n="[\\\\ \\t\\r\\n/]*",a="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",i=new RegExp(`^<${o.skipOpeningBracket?"?":""}${n}\\w+${n}\\/?${n}>`,"g"),r=new RegExp(`^<${o.skipOpeningBracket?"?":""}${n}[${a}]+[-${a}]*${n}>`,"g"),u=new RegExp(`^<${o.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),l=new RegExp(`^<${o.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${a}]+[-${a}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),c=new RegExp(`^<${o.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),$=new RegExp(`^<${o.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${a}]+[-${a}]*\\s*\\/?\\s*>`,"g"),b=new RegExp(`^<${o.skipOpeningBracket?"?":""}${n}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),m=new RegExp(`^<${o.skipOpeningBracket?"?":""}${n}[${a}]+[-${a}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),f=new RegExp(`^<${o.skipOpeningBracket?"?\\/?":""}(${n}[${a}]+)+${n}[\\\\/=>]`,""),y=new RegExp("^\\/\\s*\\w+s*>"),g=t?e.slice(t):e,d=B(e,t),w=!1,p=!1,h={cb:X,i:!0,trimCharsBeforeMatching:["/",I,"!"," "," ",`
17
- `,"\r"]};return o.allowCustomTagNames?((o.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[B(e,d)]==="<")||g[0]==="<"&&((A=g[1])!=null&&A.trim()))&&(f.test(g)||/^<\w+$/.test(g))||r.test(g)&&N(e,t)||l.test(g)||$.test(g)&&N(e,t)||m.test(g)||e[t]==="/"&&e[d]!=="<"&&y.test(g))&&(p=!0):(((o.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[B(e,d)]==="<")||(g[0]==="<"||g[0]==="/"&&(!e[d]||e[d]!=="<"))&&((v=g[1])!=null&&v.trim()))&&f.test(g)||i.test(g)&&N(e,t)||u.test(g)||c.test(g)&&N(e,t)||b.test(g))&&(w=!0),w&&G(e,t,V,{cb:R=>{var k;return R===void 0?((e[t]==="<"&&((k=e[t+1])!=null&&k.trim())||e[t-1]==="<")&&(p=!0),!0):R.toUpperCase()===R.toLowerCase()&&!/\d/.test(R)&&R!=="="},i:!0,trimCharsBeforeMatching:["<","/",I,"!"," "," ",`
18
- `,"\r"]})&&(p=!0)),!p&&e[t]==="<"&&((O=e[t+1])!=null&&O.trim())&&Z(e,t,V,h)&&(p=!0),typeof e=="string"&&t<e.length&&p}return le(be);})();
10
+ "use strict";var isHtmlTagOpening=(()=>{var te=Object.create;var D=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var ne=Object.getOwnPropertyNames,H=Object.getOwnPropertySymbols,ie=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable;var F=(e,t,n)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v=(e,t)=>{for(var n in t||(t={}))_.call(t,n)&&F(e,n,t[n]);if(H)for(var n of H(t))se.call(t,n)&&F(e,n,t[n]);return e};var oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ue=(e,t)=>{for(var n in t)D(e,n,{get:t[n],enumerable:!0})},q=(e,t,n,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of ne(t))!_.call(e,u)&&u!==n&&D(e,u,{get:()=>t[u],enumerable:!(l=re(t,u))||l.enumerable});return e};var W=(e,t,n)=>(n=e!=null?te(ie(e)):{},q(t||!e||!e.__esModule?D(n,"default",{value:e,enumerable:!0}):n,e)),ae=e=>q(D({},"__esModule",{value:!0}),e);var S=oe(($e,J)=>{"use strict";J.exports=le;function B(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function le(e){if(e=e||{},e.circles)return ce(e);let t=new Map;if(t.set(Date,i=>new Date(i)),t.set(Map,(i,s)=>new Map(l(Array.from(i),s))),t.set(Set,(i,s)=>new Set(l(Array.from(i),s))),e.constructorHandlers)for(let i of e.constructorHandlers)t.set(i[0],i[1]);let n=null;return e.proto?c:u;function l(i,s){let r=Object.keys(i),o=new Array(r.length);for(let m=0;m<r.length;m++){let f=r[m],p=i[f];typeof p!="object"||p===null?o[f]=p:p.constructor!==Object&&(n=t.get(p.constructor))?o[f]=n(p,s):ArrayBuffer.isView(p)?o[f]=B(p):o[f]=s(p)}return o}function u(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))return l(i,u);if(i.constructor!==Object&&(n=t.get(i.constructor)))return n(i,u);let s={};for(let r in i){if(Object.hasOwnProperty.call(i,r)===!1)continue;let o=i[r];typeof o!="object"||o===null?s[r]=o:o.constructor!==Object&&(n=t.get(o.constructor))?s[r]=n(o,u):ArrayBuffer.isView(o)?s[r]=B(o):s[r]=u(o)}return s}function c(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))return l(i,c);if(i.constructor!==Object&&(n=t.get(i.constructor)))return n(i,c);let s={};for(let r in i){let o=i[r];typeof o!="object"||o===null?s[r]=o:o.constructor!==Object&&(n=t.get(o.constructor))?s[r]=n(o,c):ArrayBuffer.isView(o)?s[r]=B(o):s[r]=c(o)}return s}}function ce(e){let t=[],n=[],l=new Map;if(l.set(Date,r=>new Date(r)),l.set(Map,(r,o)=>new Map(c(Array.from(r),o))),l.set(Set,(r,o)=>new Set(c(Array.from(r),o))),e.constructorHandlers)for(let r of e.constructorHandlers)l.set(r[0],r[1]);let u=null;return e.proto?s:i;function c(r,o){let m=Object.keys(r),f=new Array(m.length);for(let p=0;p<m.length;p++){let g=m[p],a=r[g];if(typeof a!="object"||a===null)f[g]=a;else if(a.constructor!==Object&&(u=l.get(a.constructor)))f[g]=u(a,o);else if(ArrayBuffer.isView(a))f[g]=B(a);else{let b=t.indexOf(a);b!==-1?f[g]=n[b]:f[g]=o(a)}}return f}function i(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return c(r,i);if(r.constructor!==Object&&(u=l.get(r.constructor)))return u(r,i);let o={};t.push(r),n.push(o);for(let m in r){if(Object.hasOwnProperty.call(r,m)===!1)continue;let f=r[m];if(typeof f!="object"||f===null)o[m]=f;else if(f.constructor!==Object&&(u=l.get(f.constructor)))o[m]=u(f,i);else if(ArrayBuffer.isView(f))o[m]=B(f);else{let p=t.indexOf(f);p!==-1?o[m]=n[p]:o[m]=i(f)}}return t.pop(),n.pop(),o}function s(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return c(r,s);if(r.constructor!==Object&&(u=l.get(r.constructor)))return u(r,s);let o={};t.push(r),n.push(o);for(let m in r){let f=r[m];if(typeof f!="object"||f===null)o[m]=f;else if(f.constructor!==Object&&(u=l.get(f.constructor)))o[m]=u(f,s);else if(ArrayBuffer.isView(f))o[m]=B(f);else{let p=t.indexOf(f);p!==-1?o[m]=n[p]:o[m]=s(f)}}return t.pop(),n.pop(),o}}});var be={};ue(be,{defaults:()=>j,isOpening:()=>de,version:()=>he});function P(e){return typeof e!="string"?e:e.length?[e]:[]}var U=W(S(),1);var Ae=(0,U.default)();function L(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function C(e){return typeof e=="string"}function Q(e,t){return L(e)&&C(t)&&t in e}var K={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},fe=e=>e+1;function me(e,t,n,l,u=!1,c=fe){var h;let i=typeof n=="function"?n():n;if(+t<0&&u&&i==="EOL")return i;let s=v(v({},K),l);if(t>=e.length&&!u)return!1;let r=u?1:n.length,o=0,m=!1,f=!1,p=!1,g=s.maxMismatches,a=t,b=!1,d=!1,w=!1;function $(){return o===1&&g<s.maxMismatches-1}for(;e[a];){let y=c(a);if(s.trimBeforeMatching&&e[a].trim()===""){if(!e[y]&&u&&n==="EOL")return!0;a=c(a);continue}if(s&&!s.i&&((h=s==null?void 0:s.trimCharsBeforeMatching)!=null&&h.includes(e[a]))||s!=null&&s.i&&s.trimCharsBeforeMatching&&s.trimCharsBeforeMatching.map(O=>O.toLowerCase()).includes(e[a].toLowerCase())){if(u&&n==="EOL"&&!e[y])return!0;a=c(a);continue}let k=y>a?n[n.length-r]:n[r-1];if(!s.i&&e[a]===k||s.i&&e[a].toLowerCase()===k.toLowerCase()){if(b||(b=!0),p||(p=!0),r===n.length){if(d=!0,g!==s.maxMismatches)return!1}else r===1&&(w=!0);if(r-=1,o++,$())return!1;if(!r)return o!==n.length||g===s.maxMismatches||!m?a:!1}else if(!m&&!o&&(m=!0),s.maxMismatches&&g&&a){g-=1;for(let O=0;O<=g;O++){let A=y>a?n[n.length-r+1+O]:n[r-2-O],E=e[c(a)];if(A&&(!s.i&&e[a]===A||s.i&&e[a].toLowerCase()===A.toLowerCase())&&(!s.firstMustMatch||r!==n.length)){if(o++,$())return!1;r-=2,b=!0;break}else if(E&&A&&(!s.i&&E===A||s.i&&E.toLowerCase()===A.toLowerCase())&&(!s.firstMustMatch||r!==n.length)){if(!o&&!s.hungry)return!1;r-=1,b=!0;break}else if(A===void 0&&g>=0&&b&&(!s.firstMustMatch||d)&&(!s.lastMustMatch||w))return a}b||(f=a)}else return a===0&&r===1&&!s.lastMustMatch&&p?0:!1;if(f!==!1&&f!==a&&(f=!1),r<1)return a;a=c(a)}if(r>0)return u&&i==="EOL"?!0:s&&s.maxMismatches>=r&&p?f||0:!1}function z(e,t,n,l,u){var m,f,p;if(L(u)&&Q(u,"trimBeforeMatching")&&u&&typeof u.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${e}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(u.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let c=v(v({},K),u);if(typeof c.trimCharsBeforeMatching=="string"&&(c.trimCharsBeforeMatching=P(c.trimCharsBeforeMatching)),c.trimCharsBeforeMatching=c.trimCharsBeforeMatching.map(g=>C(g)?g:String(g)),!C(t)||!t.length)return!1;if(!Number.isInteger(n)||n<0)throw new Error(`string-match-left-right/${e}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof n}, equal to:
11
+ ${JSON.stringify(n,null,4)}`);let i,s;if(C(l))i=[l];else if(Array.isArray(l))i=l;else if(!l)i=l;else if(typeof l=="function")i=[],i.push(l);else throw new Error(`string-match-left-right/${e}(): [THROW_ID_05] the third argument, whatToMatch, is neither string nor array of strings! It's ${typeof l}, equal to:
12
+ ${JSON.stringify(l,null,4)}`);if(u&&!L(u))throw new Error(`string-match-left-right/${e}(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof u}", and equal to:
13
+ ${JSON.stringify(u,null,4)}`);let r=0,o="";if((m=c==null?void 0:c.trimCharsBeforeMatching)!=null&&m.some((g,a)=>g.length>1?(r=a,o=g,!0):!1))throw new Error(`string-match-left-right/${e}(): [THROW_ID_07] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ${r} is longer than 1 character, ${o.length} (equals to ${o}). Please split it into separate characters and put into array as separate elements.`);if(!i||!Array.isArray(i)||Array.isArray(i)&&!i.length||Array.isArray(i)&&i.length===1&&C(i[0])&&!i[0].trim()){if(typeof c.cb=="function"){let a,b=n;if((e==="matchLeftIncl"||e==="matchRight")&&(b+=1),e[5]==="L")for(let h=b;h--;){let y=t[h];if((!c.trimBeforeMatching||c.trimBeforeMatching&&(y!=null&&y.trim()))&&(!((f=c.trimCharsBeforeMatching)!=null&&f.length)||y!==void 0&&!c.trimCharsBeforeMatching.includes(y))){a=h;break}}else if(e.startsWith("matchRight"))for(let h=b;h<t.length;h++){let y=t[h];if((!c.trimBeforeMatching||c.trimBeforeMatching&&y.trim())&&(!((p=c.trimCharsBeforeMatching)!=null&&p.length)||!c.trimCharsBeforeMatching.includes(y))){a=h;break}}if(a===void 0)return!1;let d=t[a],w=a+1,$="";return w&&w>0&&($=t.slice(0,w)),e[5]==="L"||a&&a>0&&($=t.slice(a)),c.cb(d,$,a)}let g="";throw u||(g=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${e}(): [THROW_ID_08] the third argument, "whatToMatch", was given as an empty string. This means, you intend to match purely by a callback. The callback was not set though, the opts key "cb" is not set!${g}`)}for(let g=0,a=i.length;g<a;g++){s=typeof i[g]=="function";let b=i[g],d,w,$="",h=n;e==="matchRight"?h+=1:e==="matchLeft"&&(h-=1);let y=me(t,h,b,c,s,k=>e[5]==="L"?k-1:k+1);if(y&&s&&typeof b=="function"&&b()==="EOL")return b()&&(!c.cb||c.cb(d,$,w))?b():!1;if(Number.isInteger(y)&&(w=e.startsWith("matchLeft")?y-1:y+1,e[5]==="L"?$=t.slice(0,y):$=t.slice(w)),w<0&&(w=void 0),t[w]&&(d=t[w]),Number.isInteger(y)&&(!c.cb||c.cb(d,$,w)))return b}return!1}function G(e,t,n,l){return z("matchRightIncl",e,t,n,l)}function Z(e,t,n,l){return z("matchRight",e,t,n,l)}var Y=W(S(),1);var Re=(0,Y.default)();var x="\xA0";function ge({str:e,idx:t,stopAtNewlines:n,stopAtRawNbsp:l}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),t<1))return null;if(e[~-t]&&(e[~-t].trim()||n&&`
14
+ \r`.includes(e[~-t])||l&&e[~-t]===x))return~-t;if(e[t-2]&&(e[t-2].trim()||n&&`
15
+ \r`.includes(e[t-2])||l&&e[t-2]===x))return t-2;for(let u=t;u--;)if(e[u]&&(e[u].trim()||n&&`
16
+ \r`.includes(e[u])||l&&e[u]===x))return u;return null}function M(e,t=0){return ge({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}var j={allowCustomTagNames:!1,skipOpeningBracket:!1},T="\\",I=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function X(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}function N(e,t){return e[t]==="<"||e[M(e,t)]==="<"}var ee="4.0.23";var he=ee;function de(e,t=0,n){var O,A,E;if(typeof e!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(t)||t<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof t}", value being ${JSON.stringify(t,null,4)}`);let l=v(v({},j),n),u="[\\\\ \\t\\r\\n/]*",c="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",i=new RegExp(`^<${l.skipOpeningBracket?"?":""}${u}\\w+${u}\\/?${u}>`,"g"),s=new RegExp(`^<${l.skipOpeningBracket?"?":""}${u}[${c}]+[-${c}]*${u}>`,"g"),r=new RegExp(`^<${l.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),o=new RegExp(`^<${l.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${c}]+[-${c}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),m=new RegExp(`^<${l.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),f=new RegExp(`^<${l.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${c}]+[-${c}]*\\s*\\/?\\s*>`,"g"),p=new RegExp(`^<${l.skipOpeningBracket?"?":""}${u}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),g=new RegExp(`^<${l.skipOpeningBracket?"?":""}${u}[${c}]+[-${c}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),a=new RegExp(`^<${l.skipOpeningBracket?"?\\/?":""}(${u}[${c}]+)+${u}[\\\\/=>]`,""),b=new RegExp("^\\/\\s*\\w+s*>"),d=t?e.slice(t):e,w=M(e,t),$=!1,h=!1,y={cb:X,i:!0,trimCharsBeforeMatching:["/",T,"!"," "," ",`
17
+ `,"\r"]};return l.allowCustomTagNames?((l.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[M(e,w)]==="<")||d[0]==="<"&&((O=d[1])!=null&&O.trim()))&&(a.test(d)||/^<\w+$/.test(d))||s.test(d)&&N(e,t)||o.test(d)||f.test(d)&&N(e,t)||g.test(d)||e[t]==="/"&&e[w]!=="<"&&b.test(d))&&(h=!0):(((l.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[M(e,w)]==="<")||(d[0]==="<"||d[0]==="/"&&(!e[w]||e[w]!=="<"))&&((A=d[1])!=null&&A.trim()))&&a.test(d)||i.test(d)&&N(e,t)||r.test(d)||m.test(d)&&N(e,t)||p.test(d))&&($=!0),$&&G(e,t,I,{cb:R=>{var V;return R===void 0?((e[t]==="<"&&((V=e[t+1])!=null&&V.trim())||e[t-1]==="<")&&(h=!0),!0):R.toUpperCase()===R.toLowerCase()&&!/\d/.test(R)&&R!=="="},i:!0,trimCharsBeforeMatching:["<","/",T,"!"," "," ",`
18
+ `,"\r"]})&&(h=!0)),!h&&e[t]==="<"&&((E=e[t+1])!=null&&E.trim())&&Z(e,t,I,y)&&(h=!0),typeof e=="string"&&t<e.length&&h}return ae(be);})();
19
19
  /**
20
20
  * @name arrayiffy-if-string
21
21
  * @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
22
- * @version 5.0.8
22
+ * @version 5.0.10
23
23
  * @author Roy Revelt, Codsen Ltd
24
24
  * @license MIT
25
25
  * {@link https://codsen.com/os/arrayiffy-if-string/}
@@ -27,7 +27,7 @@ ${JSON.stringify(n,null,4)}`);let u=0,l="";if((c=a==null?void 0:a.trimCharsBefor
27
27
  /**
28
28
  * @name codsen-utils
29
29
  * @fileoverview Various utility functions
30
- * @version 1.6.4
30
+ * @version 1.6.8
31
31
  * @author Roy Revelt, Codsen Ltd
32
32
  * @license MIT
33
33
  * {@link https://codsen.com/os/codsen-utils/}
@@ -35,7 +35,7 @@ ${JSON.stringify(n,null,4)}`);let u=0,l="";if((c=a==null?void 0:a.trimCharsBefor
35
35
  /**
36
36
  * @name string-match-left-right
37
37
  * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
38
- * @version 9.0.19
38
+ * @version 9.0.23
39
39
  * @author Roy Revelt, Codsen Ltd
40
40
  * @license MIT
41
41
  * {@link https://codsen.com/os/string-match-left-right/}
@@ -43,7 +43,7 @@ ${JSON.stringify(n,null,4)}`);let u=0,l="";if((c=a==null?void 0:a.trimCharsBefor
43
43
  /**
44
44
  * @name string-left-right
45
45
  * @fileoverview Looks up the first non-whitespace character to the left/right of a given index
46
- * @version 6.0.17
46
+ * @version 6.0.21
47
47
  * @author Roy Revelt, Codsen Ltd
48
48
  * @license MIT
49
49
  * {@link https://codsen.com/os/string-left-right/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "is-html-tag-opening",
3
- "version": "4.0.19",
3
+ "version": "4.0.23",
4
4
  "description": "Does an HTML tag start at given position?",
5
5
  "keywords": [
6
6
  "bracket",
@@ -20,7 +20,7 @@
20
20
  "homepage": "https://codsen.com/os/is-html-tag-opening",
21
21
  "repository": {
22
22
  "type": "git",
23
- "url": "https://github.com/codsen/codsen.git",
23
+ "url": "git+https://github.com/codsen/codsen.git",
24
24
  "directory": "packages/is-html-tag-opening"
25
25
  },
26
26
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "examples": "node '../../ops/scripts/run-examples.js'",
47
47
  "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
48
48
  "letspublish": "npm publish || :",
49
- "lint": "eslint . --ext .js --ext .ts --fix",
49
+ "lint": "eslint . --fix",
50
50
  "perf": "node perf/check.js",
51
51
  "prep": "echo 'ready'",
52
52
  "prettier": "prettier",
@@ -73,10 +73,10 @@
73
73
  }
74
74
  },
75
75
  "dependencies": {
76
- "string-left-right": "^6.0.17",
77
- "string-match-left-right": "^9.0.19"
76
+ "string-left-right": "^6.0.21",
77
+ "string-match-left-right": "^9.0.23"
78
78
  },
79
79
  "devDependencies": {
80
- "test-mixer": "^4.1.14"
80
+ "test-mixer": "^4.1.18"
81
81
  }
82
82
  }
package/types/index.d.ts CHANGED
@@ -14,4 +14,5 @@ declare function isOpening(
14
14
  opts?: Partial<Opts>,
15
15
  ): boolean;
16
16
 
17
- export { type Opts, defaultOpts as defaults, isOpening, version };
17
+ export { defaultOpts as defaults, isOpening, version };
18
+ export type { Opts };