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

tidy-markdown

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

tidy-markdown - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

15

lib/index.js

@@ -275,3 +275,3 @@ // Generated by CoffeeScript 1.10.0

module.exports = function(dirtyMarkdown, options) {
var ast, content, html, j, k, l, len, len1, len2, link, links, m, name, node, nodes, optionalTitle, out, rawLinks, ref1, root, title, url, value;
var ast, content, error, html, j, k, l, len, len1, len2, link, links, m, name, node, nodes, optionalTitle, out, rawLinks, ref1, root, title, url, value;
if (options == null) {

@@ -287,7 +287,12 @@ options = {};

out = '';
content = fm(dirtyMarkdown);
if (Object.keys(content.attributes).length !== 0) {
out += '---\n' + yaml.safeDump(content.attributes).trim() + '\n---\n\n';
try {
content = fm(dirtyMarkdown);
if (Object.keys(content.attributes).length !== 0) {
out += '---\n' + yaml.safeDump(content.attributes).trim() + '\n---\n\n';
}
content = content.body;
} catch (error) {
content = dirtyMarkdown;
}
ast = marked.lexer(content.body);
ast = marked.lexer(content);
rawLinks = ast.links;

@@ -294,0 +299,0 @@ links = [];

{
"name": "tidy-markdown",
"description": "Fix ugly markdown.",
"version": "2.0.2",
"version": "2.0.3",
"author": "Sean Lang",

@@ -6,0 +6,0 @@ "bin": {

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