Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xiee/utils

Package Overview
Dependencies
Maintainers
1
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xiee/utils - npm Package Compare versions

Comparing version 1.3.12 to 1.3.13

31

js/math-code.js

@@ -1,20 +0,13 @@

(function() {
var i, text, code, codes = document.getElementsByTagName('code');
for (i = 0; i < codes.length;) {
code = codes[i];
if (code.parentNode.tagName !== 'PRE' && code.childElementCount === 0) {
text = code.textContent;
if (/^\$[^$]/.test(text) && /[^$]\$$/.test(text)) {
text = text.replace(/^\$/, '\\(').replace(/\$$/, '\\)');
code.textContent = text;
}
if (/^\\\((.|\s)+\\\)$/.test(text) || /^\\\[(.|\s)+\\\]$/.test(text) ||
/^\$(.|\s)+\$$/.test(text) ||
/^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(text)) {
code.outerHTML = code.innerHTML; // remove <code></code>
continue;
}
}
i++;
[...document.getElementsByTagName('code')].forEach(code => {
if (code.parentNode.tagName === 'PRE' || code.childElementCount > 0) return;
const text = code.textContent;
if (/^\$[^$]/.test(text) && /[^$]\$$/.test(text)) {
text = text.replace(/^\$/, '\\(').replace(/\$$/, '\\)');
code.textContent = text;
}
})();
if (/^\\\((.|\s)+\\\)$/.test(text) || /^\\\[(.|\s)+\\\]$/.test(text) ||
/^\$(.|\s)+\$$/.test(text) ||
/^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(text)) {
code.outerHTML = code.innerHTML; // remove <code></code>
}
});

@@ -1,1 +0,1 @@

!function(){var e,t,n,$=document.getElementsByTagName("code");for(e=0;e<$.length;)"PRE"!==(n=$[e]).parentNode.tagName&&0===n.childElementCount&&(t=n.textContent,/^\$[^$]/.test(t)&&/[^$]\$$/.test(t)&&(t=t.replace(/^\$/,"\\(").replace(/\$$/,"\\)"),n.textContent=t),/^\\\((.|\s)+\\\)$/.test(t)||/^\\\[(.|\s)+\\\]$/.test(t)||/^\$(.|\s)+\$$/.test(t)||/^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(t))?n.outerHTML=n.innerHTML:e++}();
[...document.getElementsByTagName("code")].forEach((e=>{if("PRE"===e.parentNode.tagName||e.childElementCount>0)return;const t=e.textContent;/^\$[^$]/.test(t)&&/[^$]\$$/.test(t)&&(t=t.replace(/^\$/,"\\(").replace(/\$$/,"\\)"),e.textContent=t),(/^\\\((.|\s)+\\\)$/.test(t)||/^\\\[(.|\s)+\\\]$/.test(t)||/^\$(.|\s)+\$$/.test(t)||/^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(t))&&(e.outerHTML=e.innerHTML)}));
{
"name": "@xiee/utils",
"version": "1.3.12",
"version": "1.3.13",
"description": "Miscellaneous tools and utilities to manipulate HTML pages",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc