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.2.8 to 1.2.9

30

js/fix-footnote.js
(function(d) {
function fix_footnote(tagName) {
let tags = d.getElementsByTagName(tagName), i, tag, tag2, n = 1, href;
for (i = 0; i < tags.length; i++) {
tag = tags[i];
if (tagName === 'sup') {
if (tag.className !== 'footnote-ref' || tag.id !== 'fnref:-') continue;
tag.id += n;
if (tag.children.length === 1) {
tag2 = tag.children[0];
href = tag2.getAttribute('href');
if (tag2.nodeName === 'A' && href === '#fn:-') {
tag2.setAttribute('href', href + n);
}
}
} else if (tagName === 'li') {
if (tag.id !== 'fn:-') continue;
tag.id += n;
tag2 = tag.lastChild; href = tag2.getAttribute('href');
if (tag2.nodeName === 'A' && href === '#fnref:-') {
tag2.setAttribute('href', href + n);
}
}
n++;
}
}
fix_footnote('sup'); fix_footnote('li');
// add [] to footnote numbers
d.querySelectorAll('sup[id^="fnref:"] > a.footnote-ref, a.footnote-ref > sup').forEach(el => {
if (/^[0-9]+$/.test(el.innerText)) el.innerText = ' [' + el.innerText + ']';
});
// move the return symbol into the previous <p>

@@ -29,0 +7,0 @@ d.querySelectorAll('.footnotes > ol > li > p ~ .footnote-return').forEach(el => {

2

package.json
{
"name": "@xiee/utils",
"version": "1.2.8",
"version": "1.2.9",
"description": "Miscellaneous tools and utilities to manipulate HTML pages",

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

@@ -78,3 +78,4 @@ This repo contains miscellaneous tools and utilities written in JavaScript. They

With `key-buttons.css`, the keys will be styled as boxes with shadows like
buttons.
buttons. You can learn more details [in this
post](https://yihui.org/en/2023/02/key-buttons/).

@@ -81,0 +82,0 @@ ## load-highlight.js

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