From 5f2592e10004cf4b943d10db6fe02790b8d411a1 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 9 May 2023 13:07:27 +0300 Subject: When a field is null during annotation, return an empty string Signed-off-by: Munyoki Kilyungi --- dump.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dump.scm b/dump.scm index 835a199..2bd9cdf 100755 --- a/dump.scm +++ b/dump.scm @@ -94,9 +94,12 @@ (symbol->string schema)) ((string? schema) schema) (else - (error "Use a string/symbol")))]) - (string->symbol - (format #f "~s~a" field schema)))) + (error "Use a string/symbol")))] + [string-field (if (number? field) (number->string field) field)]) + (if (string-null? string-field) + "" + (string->symbol + (format #f "~s~a" string-field schema))))) (define (string-split-substring str substr) "Split the string @var{str} into a list of substrings delimited by the -- cgit v1.2.3