aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/meta/conf_make_meta_json.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/meta/conf_make_meta_json.d')
-rw-r--r--src/sdp/meta/conf_make_meta_json.d23
1 files changed, 22 insertions, 1 deletions
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;