From 6538bfe8efd6da7b72c967ef79ee28fc303ef280 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Fri, 5 Mar 2021 13:42:23 +0100 Subject: [PATCH] Fix flattening for variables with _ in key --- CHANGELOG.md | 4 ++++ VERSION | 2 +- lib/Agrammon/DataSource/DB.pm6 | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c299230d..eeaaa8733 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Agrammon Change Log +- 6.0.0-rc2, 2021-03-05, fritz.zaucker@oetiker.ch + - Fix branching over multiple sub modules + - Fix flattening + **This is not complete yet.** - 6.0.0-rc1, 2021-02-25, fritz.zaucker@oetiker.ch diff --git a/VERSION b/VERSION index 3f76b8391..35f9a7154 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.0-rc1 +6.0.0-rc2 diff --git a/lib/Agrammon/DataSource/DB.pm6 b/lib/Agrammon/DataSource/DB.pm6 index f0f2a93f8..00e9762c8 100644 --- a/lib/Agrammon/DataSource/DB.pm6 +++ b/lib/Agrammon/DataSource/DB.pm6 @@ -81,6 +81,8 @@ class Agrammon::DataSource::DB does Agrammon::DB { } elsif $flattend-prefix && $var.starts-with($flattend-prefix ~ '_flattened') { my $key = $var.substr(($flattend-prefix ~ '_flattened00_').chars); + # TODO: flattened variables should be stored with _ instead of space + $key ~~ s:g/ ' ' /_/; $current-flattened.value-percentages{$key} = $value; } elsif $value eq 'branched' {