From 15c5f7798a02267bc9c0cc55f3ebb88785f6ebe7 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Sun, 19 Nov 2023 08:29:53 +0000 Subject: [PATCH] Empty cells are 'null', "null" is a string --- .../indigo-plugin/src/indigoplugin/generators/EmbedData.scala | 2 +- .../test/src/indigoplugin/generators/EmbedDataTests.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indigo-plugin/indigo-plugin/src/indigoplugin/generators/EmbedData.scala b/indigo-plugin/indigo-plugin/src/indigoplugin/generators/EmbedData.scala index 523504100..2fea2b1f0 100644 --- a/indigo-plugin/indigo-plugin/src/indigoplugin/generators/EmbedData.scala +++ b/indigo-plugin/indigo-plugin/src/indigoplugin/generators/EmbedData.scala @@ -204,7 +204,7 @@ object DataType { private val isBoolean: Regex = """^(true|false)$""".r private val isDouble: Regex = """^([0-9]+?)\.([0-9]+)$""".r private val isInt: Regex = """^([0-9]+)$""".r - private val isNull: Regex = """^(null)$""".r + private val isNull: Regex = """^$""".r def decideType: String => DataType = { case isBoolean(v) => BooleanData(v.toBoolean) diff --git a/indigo-plugin/indigo-plugin/test/src/indigoplugin/generators/EmbedDataTests.scala b/indigo-plugin/indigo-plugin/test/src/indigoplugin/generators/EmbedDataTests.scala index 9f13db61c..254373936 100644 --- a/indigo-plugin/indigo-plugin/test/src/indigoplugin/generators/EmbedDataTests.scala +++ b/indigo-plugin/indigo-plugin/test/src/indigoplugin/generators/EmbedDataTests.scala @@ -84,7 +84,7 @@ class EmbedDataTests extends munit.FunSuite { } test("Extract row data - csv - simple") { - val row = " abc,123, def,456.5 ,ghi789,true ,.,null, ," + val row = " abc,123, def,456.5 ,ghi789,true ,.,, ," val actual = EmbedData.extractRowData(row, ",")