enketo-transformer
Advanced tools
Comparing version 1.4.2 to 1.4.3
@@ -5,2 +5,6 @@ ## Change Log | ||
[1.4.3] - 2015-08-26 | ||
##### Fixed | ||
- Default directionality ltr if first text element contains only whitespaces. | ||
[1.4.2] - 2015-08-10 | ||
@@ -7,0 +11,0 @@ ------------------------ |
{ | ||
"name": "enketo-transformer", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "Library that transforms ODK-compliant XForms in a format that enketo-core consumes", | ||
@@ -5,0 +5,0 @@ "main": "src/transformer.js", |
@@ -235,6 +235,7 @@ "use strict"; | ||
// If not found, find any span with that lang attribute. | ||
// TODO: the element returned should not only contain whitespace (newline chars, spaces) | ||
var langSampleEl = doc.get( '/root/form//span[contains(@class, "or-hint") and @lang="' + lang + '" and text()]' ) || | ||
doc.get( '/root/form//span[@lang="' + lang + '" and text()]' ); | ||
return ( langSampleEl ) ? langSampleEl.text() : 'nothing'; | ||
return ( langSampleEl && langSampleEl.text().trim().length ) ? langSampleEl.text() : 'nothing'; | ||
} | ||
@@ -241,0 +242,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
87029
633