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

posthtml-rename-id

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

posthtml-rename-id - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4-alpha.0

CHANGELOG.md

20

index.js

@@ -80,7 +80,5 @@ /* eslint-disable no-cond-assign, default-case */

let idObj;
switch (attrName) {
case 'href':
case 'xlink:href':
case 'xlink:href': {
if (value.substring(0, 1) !== '#') {

@@ -91,3 +89,3 @@ break;

id = value.substring(1);
idObj = mappedIds[id];
const idObj = mappedIds[id];
if (idObj) {

@@ -98,15 +96,3 @@ idObj.referenced = false;

break;
case 'for':
if (node.tag !== 'label') {
break;
}
id = value;
idObj = mappedIds[id];
if (idObj) {
idObj.referenced = false;
attrs[attrName] = idObj.id;
}
break;
}
}

@@ -113,0 +99,0 @@ });

{
"name": "posthtml-rename-id",
"version": "1.0.3",
"description": "PostHTML plugin to rename id attribute and it's references",
"main": "index.js",
"version": "1.0.4-alpha.0",
"description": "PostHTML plugin to rename id attributes and it's references",
"license": "MIT",
"repository": "https://github.com/kisenka/svg-baker/packages/posthtml-rename-id",
"files": [
"README.md",
"index.js"
],
"author": "kisenka",
"license": "MIT",
"repository": "kisenka/posthtml-rename-id",
"bugs": "https://github.com/kisenka/posthtml-rename-id/issues",
"homepage": "https://github.com/kisenka/posthtml-rename-id#readme",
"dependencies": {
"escape-string-regexp": "^1.0.5"
"escape-string-regexp": "1.0.5"
},
"devDependencies": {
"mocha": "^4.0.1",
"postsvg": "^2.0.0"
},
"scripts": {
"test": "mocha"
"test": "mocha -r $MOCHA_SETUP_PATH"
}
}

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

# PostHTML rename id plugin
# PostHTML rename plugin

@@ -31,3 +31,4 @@ Plugin to rename id attributes and it's references.

});
// => <div id="prefix_qwe"></div> <a href="#prefix_qwe"></a>
// <div id="prefix_qwe"></div> <a href="#prefix_qwe"></a>
```

@@ -34,0 +35,0 @@

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