enketo-transformer
Advanced tools
Comparing version 1.6.2 to 1.6.3
@@ -5,2 +5,7 @@ ## Change Log | ||
[1.6.3] - 2015-10-24 | ||
----------------------- | ||
##### Fixed | ||
- String containing just a \<span\> without other markdown, is not converted. | ||
[1.6.2] - 2015-10-23 | ||
@@ -7,0 +12,0 @@ ----------------------- |
{ | ||
"name": "enketo-transformer", | ||
"version": "1.6.2", | ||
"version": "1.6.3", | ||
"description": "Library/app that transforms ODK-compliant XForms into a format that enketo-core consumes", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -263,3 +263,4 @@ 'use strict'; | ||
var key; | ||
var original = textNode.text(); | ||
// text() will convert > to > | ||
var original = textNode.text().replace( '<', '<' ).replace( '>', '>' ); | ||
var rendered = markdown.toHtml( original ); | ||
@@ -266,0 +267,0 @@ if ( original !== rendered ) { |
@@ -100,2 +100,18 @@ /* global describe, require, it*/ | ||
describe( 'renders markdown', function() { | ||
it( 'takes into account that libxmljs Element.text() converts htmlentities', function() { | ||
var xform = fs.readFileSync( './test/forms/external.xml', 'utf8' ); | ||
var result = transformer.transform( { | ||
xform: xform | ||
} ); | ||
return Promise.all( [ | ||
expect( result ).to.eventually.have.property( 'form' ) | ||
.and.to.not.contain( '<span style="color:pink;">Intro</span>' ), | ||
expect( result ).to.eventually.have.property( 'form' ) | ||
.and.to.contain( '<span style="color:pink;">Intro</span>' ) | ||
] ); | ||
} ); | ||
} ); | ||
describe( 'manipulates media sources', function() { | ||
@@ -102,0 +118,0 @@ |
Sorry, the diff of this file is not supported yet
107862
980