From cf2fd4660ed50da2fbccec7912e429f1d5e37377 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 27 Feb 2018 15:40:05 -0500 Subject: 0.25.0 remove sdlang (headers, conf, make doc) --- src/sdp/meta/conf_make_meta_json.d | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/sdp/meta/conf_make_meta_json.d') diff --git a/src/sdp/meta/conf_make_meta_json.d b/src/sdp/meta/conf_make_meta_json.d index 0471dbf..c5585ce 100644 --- a/src/sdp/meta/conf_make_meta_json.d +++ b/src/sdp/meta/conf_make_meta_json.d @@ -75,7 +75,28 @@ static template contentJSONtoSiSUstruct() { _struct_composite.make_str.num_depth = _json.object["num_depth"][""].str; } if ("substitute" in _json.object["make"]) { - _struct_composite.make_str.substitute = _json.object["make"]["substitute"].arrayNoRef; + string[][] _sub; + if ( + (_json.object["make"]["substitute"].type().to!string == "ARRAY") + && (_json.object["make"]["substitute"][0].type().to!string == "ARRAY") + ) { + foreach (substitute_pair; _json.object["make"]["substitute"].arrayNoRef) { + if ((substitute_pair.type().to!string) == "ARRAY") { + if (!empty(substitute_pair[0].str) && !empty(substitute_pair[1].str)) { + _sub ~= [ substitute_pair[0].str, substitute_pair[1].str]; + } + } + } + } else if ( + (_json.object["make"]["substitute"].type().to!string == "ARRAY") + && (_json.object["make"]["substitute"][0].type().to!string == "STRING") + ) { + if (!empty(_json.object["make"]["substitute"][0].str) && !empty(_json.object["make"]["substitute"][1].str)) { + _sub = [[_json.object["make"]["substitute"][0].str, _json.object["make"]["substitute"][1].str]]; + } + } + // writeln(_sub); + _struct_composite.make_str.substitute = _sub; } if ("texpdf_font" in _json.object["make"]) { _struct_composite.make_str.texpdf_font = _json.object["make"]["texpdf_font"].str; -- cgit v1.2.3