New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-remark-jh-inline-svg

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-remark-jh-inline-svg - npm Package Compare versions

Comparing version

to
0.1.1

9

index.js

@@ -11,3 +11,3 @@ const visit = require('unist-util-visit')

visit(markdownAST, 'image', (node) => {
const { url } = node
const { url, alt, title } = node

@@ -24,5 +24,10 @@ if (url.endsWith('.svg')) {

if (alt) html = html.replace(/<title>.*<\/title>/, `<title>${alt}</title>`);
if (html) {
node.type = 'html'
node.value = `${html}`
node.value = `<figure>
${html.trim()}
${title ? `<figcaption>${title}</figcaption>` : ''}
</figure>`
}

@@ -29,0 +34,0 @@ }

{
"name": "gatsby-remark-jh-inline-svg",
"version": "0.1.0",
"version": "0.1.1",
"description": "Gatsby plugin to inline SVGs in Jonathan Harrell's site",

@@ -5,0 +5,0 @@ "main": "index.js",