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

docs-and-graphs

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docs-and-graphs - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

2

package.json
{
"name": "docs-and-graphs",
"version": "0.1.11",
"version": "0.1.12",
"type": "module",

@@ -5,0 +5,0 @@ "description": "",

@@ -19,11 +19,14 @@ // [[hello|world]] -> {value:'hello', alias:'world'}

// Matches things like [something](http://example.com) and just http://example.com
const linkRegex = /(?:\[([^\]]+)\]\((https?:\/\/[^\s]+)\))|(https?:\/\/[^\s]+)$/
function parseExternalLinks (text) {
// @TODO find a lib to do these sort of things.
const matches = text.match(linkRegex)
if (matches) {
return {
alias: matches[1], value: matches[2] || matches[3],
alias: matches[1], value: (matches[2] || matches[3]).replace(/>$/, ''),
}
}

@@ -30,0 +33,0 @@ }

@@ -26,3 +26,5 @@ export default {

<http://example.com> <https://example2.com>
`,
}

@@ -23,3 +23,5 @@ import { expect } from 'expect'

'[protocol unknown](hello)',
'[protocol unknown](file://)'
'[protocol unknown](file://)',
'<http://example.org>',
'<https://example.org>'
]

@@ -26,0 +28,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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