canvas-native
Advanced tools
Comparing version 2.0.3 to 2.1.0
@@ -33,2 +33,6 @@ 'use strict'; | ||
if (!current.toMarkdown) { | ||
continue; | ||
} | ||
result.push(current.toMarkdown(prev, next)); | ||
@@ -35,0 +39,0 @@ } |
@@ -57,2 +57,6 @@ 'use strict'; | ||
if (!klass.matchMarkdown) { | ||
continue; | ||
} | ||
if (line = klass.matchMarkdown(source, context)) { | ||
@@ -59,0 +63,0 @@ break; |
@@ -9,2 +9,10 @@ 'use strict'; | ||
var _typesBlockquote = require('../types/blockquote'); | ||
var _typesBlockquote2 = _interopRequireDefault(_typesBlockquote); | ||
var _typesComment = require('../types/comment'); | ||
var _typesComment2 = _interopRequireDefault(_typesComment); | ||
var _typesChecklist = require('../types/checklist'); | ||
@@ -50,3 +58,3 @@ | ||
exports['default'] = [_typesChecklist2['default'], _typesCode2['default'], _typesTitle2['default'], _typesHeading2['default'], _typesHorizontalRule2['default'], _typesImage2['default'], _typesLinkDefinition2['default'], _typesOrderedList2['default'], _typesUnorderedList2['default'], _typesParagraph2['default']]; | ||
exports['default'] = [_typesChecklist2['default'], _typesComment2['default'], _typesBlockquote2['default'], _typesCode2['default'], _typesTitle2['default'], _typesHeading2['default'], _typesHorizontalRule2['default'], _typesImage2['default'], _typesLinkDefinition2['default'], _typesOrderedList2['default'], _typesUnorderedList2['default'], _typesParagraph2['default']]; | ||
module.exports = exports['default']; |
@@ -8,2 +8,6 @@ import Scanner from '../scanner'; | ||
for (const [prev, current, next] of scanner) { | ||
if (!current.toMarkdown) { | ||
continue; | ||
} | ||
result.push(current.toMarkdown(prev, next)); | ||
@@ -10,0 +14,0 @@ } |
@@ -32,2 +32,6 @@ import PARSE_ORDER from './parse-order'; | ||
for (const klass of PARSE_ORDER) { | ||
if (!klass.matchMarkdown) { | ||
continue; | ||
} | ||
if ((line = klass.matchMarkdown(source, context))) { | ||
@@ -34,0 +38,0 @@ break; |
@@ -0,1 +1,3 @@ | ||
import Blockquote from '../types/blockquote'; | ||
import Comment from '../types/comment'; | ||
import Checklist from '../types/checklist'; | ||
@@ -14,2 +16,4 @@ import Code from '../types/code'; | ||
Checklist, | ||
Comment, | ||
Blockquote, | ||
Code, | ||
@@ -16,0 +20,0 @@ Title, |
{ | ||
"name": "canvas-native", | ||
"description": "Utilities for working with the native Canvas format", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"author": "Jonathan Clem <jonathan@usecanvas.com>", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/usecanvas/canvas-native/issues", |
@@ -1,5 +0,6 @@ | ||
import format from '../../../lib/formatters/html'; | ||
import parse from '../../../lib/parsers/native'; | ||
import { expect } from 'chai'; | ||
import { trim } from '../../helpers'; | ||
import format from '../../../lib/formatters/html'; | ||
import parse from '../../../lib/parsers/native'; | ||
import { expect } from 'chai'; | ||
import { trim } from '../../helpers'; | ||
import { wrap } from '../../../lib/brackets'; | ||
@@ -19,2 +20,16 @@ describe('formatters/html', () => { | ||
}); | ||
it('skips comments', () => { | ||
const doc = parse([ | ||
'Foo', | ||
'Bar', | ||
`${wrap('comment-theuser')}// Foo`, | ||
'Baz', | ||
].join('\n')); | ||
expect(format(doc)).to.eql(trim(`\ | ||
<p>Foo</p> | ||
<p>Bar</p> | ||
<p>Baz</p>\n`)); | ||
}); | ||
}); |
@@ -29,2 +29,5 @@ import parse from '../../../lib/parsers/markdown'; | ||
> Foo | ||
> Bar | ||
Paragraph`); | ||
@@ -48,2 +51,4 @@ | ||
`${wrap('code')}end`, | ||
`${wrap('blockquote')}> Foo`, | ||
`${wrap('blockquote')}> Bar`, | ||
'Paragraph', | ||
@@ -50,0 +55,0 @@ ]); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114725
68
3157