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

repo2pdf

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

repo2pdf - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"name": "repo2pdf",
"version": "2.0.0",
"version": "2.0.1",
"description": "A Node.js utility for generating a PDF document from a GitHub repository",

@@ -5,0 +5,0 @@ "main": "dist/clone.js",

@@ -361,9 +361,13 @@ #!/usr/bin/env node

try {
highlightedCode = hljs.highlight(data, {
language: addHighlighting ? extension : "plaintext",
}).value
// Check if language is supported before attempting to highlight
if (addHighlighting && hljs.getLanguage(extension)) {
highlightedCode = hljs.highlight(data, { language: extension }).value
} else {
// Use plaintext highlighting if language is not supported
highlightedCode = hljs.highlight(data, { language: "plaintext" }).value
}
} catch (error) {
highlightedCode = hljs.highlight(data, {
language: "plaintext",
}).value
console.error(`Error highlighting code: ${error}`)
// Use plaintext highlighting if an error occurs
highlightedCode = hljs.highlight(data, { language: "plaintext" }).value
}

@@ -370,0 +374,0 @@ const hlData = htmlToJson(highlightedCode)

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