Socket
Socket
Sign inDemoInstall

adf-to-md

Package Overview
Dependencies
194
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

39

index.js

@@ -16,5 +16,13 @@ 'use strict';

case 'heading':
return `${'#'.repeat(node.attrs.level)} ${node.content.map(node => _convert(node, warnings)).join('')}`;
case 'hardBreak':
return '\n';
case 'inlineCard':
case 'blockCard':
case 'embedCard':
return `[${node.attrs.url}](${node.attrs.url})`;
case 'blockquote':

@@ -52,2 +60,28 @@ return `> ${node.content.map(node => _convert(node, warnings)).join('\n> ')}`;

case 'rule':
return '\n\n---\n';
case 'emoji':
return node.attrs.shortName;
case 'table':
return node.content.map(node => _convert(node)).join('');
case 'tableRow': {
let output = '|';
let thCount = 0;
output += node.content.map((subNode) => {
thCount += subNode.type === 'tableHeader' ? 1 : 0;
return _convert(subNode);
}).join('');
output += thCount ? `\n${'|:-:'.repeat(thCount)}|\n` : '\n';
return output;
}
case 'tableHeader':
return `${node.content.map(node => _convert(node)).join('')}|`;
case 'tableCell':
return `${node.content.map(node => _convert(node)).join('')}|`;
default:

@@ -103,3 +137,6 @@ console.log('adding warning for', node.type);

return _convert(adf, warnings);
return {
result: _convert(adf, warnings),
warnings,
};
};

@@ -106,0 +143,0 @@

2

package.json
{
"name": "adf-to-md",
"version": "1.0.0",
"version": "1.1.0",
"description": "Converter to turn Atlassian Document Format (ADF) objects into Markdown",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc