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

canvas-native

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvas-native - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

6

lib/converters/json.js

@@ -76,3 +76,3 @@ export function convert(native) {

if (typeof line.level === 'number') {
if (line.isNesting) {
group.meta = { level: line.level };

@@ -99,3 +99,3 @@ }

if (typeof line.level === 'number') {
if (line.isNesting) {
return sameType && line.level === getNodeLevel(node);

@@ -110,3 +110,3 @@ }

if (typeof line.level !== 'number') {
if (!line.isNesting) {
return false;

@@ -113,0 +113,0 @@ }

@@ -10,2 +10,6 @@ export default class Type {

get isNesting() {
return typeof this.level === 'number' && this.groupType !== 'canvas';
}
get type() {

@@ -12,0 +16,0 @@ return this.constructor.name;

{
"name": "canvas-native",
"description": "Utilities for working with the native Canvas format",
"version": "1.2.0",
"version": "1.2.1",
"author": "Jonathan Clem <jonathan@usecanvas.com>",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/usecanvas/canvas-native/issues",

@@ -67,2 +67,34 @@ import { convert } from '../../../lib/converters/json';

it('does not nest under headers', () => {
const doc = parse([
'# Header',
`${wrap('unordered-list-1')}- UL-1-0`,
].join('\n'));
expect(convert(doc).content).to.eql([
{
type : 'heading',
meta : { level: 1 },
content: '# Header',
},
{
type : 'unordered-list',
meta : { level: 0 },
content: [
{
type: 'unordered-list',
meta: { level: 1 },
content: [
{
type : 'unordered-list-item',
meta : { level: 1 },
content: '- UL-1-0'
}
]
}
]
}
]);
});
it('handles nested lists', () => {

@@ -69,0 +101,0 @@ const doc = parse([

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