canvas-native
Advanced tools
Comparing version 2.4.0 to 2.4.1
@@ -49,3 +49,3 @@ 'use strict'; | ||
if (!prev || prev.type !== this.type) { | ||
result = '```\n' + result; | ||
result = '```' + (this.language || '') + '\n' + result; | ||
} | ||
@@ -52,0 +52,0 @@ |
@@ -31,3 +31,3 @@ import Type from './type'; | ||
if (!prev || prev.type !== this.type) { | ||
result = `\`\`\`\n${result}`; | ||
result = `\`\`\`${this.language || ''}\n${result}`; | ||
} | ||
@@ -34,0 +34,0 @@ |
{ | ||
"name": "canvas-native", | ||
"description": "Utilities for working with the native Canvas format", | ||
"version": "2.4.0", | ||
"version": "2.4.1", | ||
"author": "Jonathan Clem <jonathan@usecanvas.com>", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/usecanvas/canvas-native/issues", |
@@ -55,2 +55,8 @@ import Code from '../../../lib/types/code'; | ||
it('prepends a fence with lang at the beginning of a code block', () => { | ||
line = Code.match(wrap('code-ruby') + 'alert("ok");'); | ||
expect(line.toMarkdown(Paragraph.match('Foo'), line)) | ||
.to.eql('```ruby\nalert("ok");'); | ||
}); | ||
it('prepends a fence at the beginning of a document', () => { | ||
@@ -57,0 +63,0 @@ expect(line.toMarkdown(null, line)) |
126219
3570