Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

enketo-transformer

Package Overview
Dependencies
Maintainers
1
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enketo-transformer - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

4

CHANGELOG.md

@@ -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 @@ ------------------------

2

package.json
{
"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 @@

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