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.d50
1 files changed, 40 insertions, 10 deletions
diff --git a/src/sdp/meta/conf_make_meta_json.d b/src/sdp/meta/conf_make_meta_json.d
index e192c70..3a47f20 100644
--- a/src/sdp/meta/conf_make_meta_json.d
+++ b/src/sdp/meta/conf_make_meta_json.d
@@ -66,7 +66,17 @@ static template contentJSONtoSiSUstruct() {
if ("footer" in _json.object["make"]
&& (_json.object["make"]["footer"].type().to!string == "STRING")
) {
- _struct_composite.make_str.footer = _json.object["make"]["footer"].str;
+ char[][] __match_footer_array
+ = (cast(char[]) _json.object["make"]["footer"].str)
+ .split(_rgx.make_heading_delimiter);
+ _struct_composite.make_str.footer = __match_footer_array.to!(string[]);
+ } else if ("footer" in _json.object["make"]
+ && _json.object["make"]["footer"].type().to!string == "ARRAY") {
+ string[] _match_footer_array;
+ foreach (_match_heading; _json.object["make"]["footer"].arrayNoRef) {
+ _match_footer_array ~= _match_heading.str;
+ }
+ _struct_composite.make_str.footer = _match_footer_array;
}
if ("headings" in _json.object["make"]
&& (_json.object["make"]["headings"].type().to!string == "STRING")
@@ -86,12 +96,32 @@ static template contentJSONtoSiSUstruct() {
if ("home_button_image" in _json.object["make"]
&& (_json.object["make"]["home_button_image"].type().to!string == "STRING")
) {
- _struct_composite.make_str.home_button_image = _json.object["make"]["home_button_image"].str;
+ char[][] __match_home_button_image_array
+ = (cast(char[]) _json.object["make"]["home_button_image"].str)
+ .split(_rgx.make_heading_delimiter);
+ _struct_composite.make_str.home_button_image = __match_home_button_image_array.to!(string[]);
+ } else if ("home_button_image" in _json.object["make"]
+ && _json.object["make"]["home_button_image"].type().to!string == "ARRAY") {
+ string[] _match_home_button_image_array;
+ foreach (_match_heading; _json.object["make"]["home_button_image"].arrayNoRef) {
+ _match_home_button_image_array ~= _match_heading.str;
+ }
+ _struct_composite.make_str.home_button_image = _match_home_button_image_array;
}
if ("home_button_text" in _json.object["make"]
&& (_json.object["make"]["home_button_text"].type().to!string == "STRING")
) {
- _struct_composite.make_str.home_button_text = _json.object["make"]["home_button_text"].str;
+ char[][] __match_home_button_text_array
+ = (cast(char[]) _json.object["make"]["home_button_text"].str)
+ .split(_rgx.make_heading_delimiter);
+ _struct_composite.make_str.home_button_text = __match_home_button_text_array.to!(string[]);
+ } else if ("home_button_text" in _json.object["make"]
+ && _json.object["make"]["home_button_text"].type().to!string == "ARRAY") {
+ string[] _match_home_button_text_array;
+ foreach (_match_heading; _json.object["make"]["home_button_text"].arrayNoRef) {
+ _match_home_button_text_array ~= _match_heading.str;
+ }
+ _struct_composite.make_str.home_button_text = _match_home_button_text_array;
}
if ("italics" in _json.object["make"]
&& (_json.object["make"]["italics"].type().to!string == "STRING")
@@ -130,14 +160,14 @@ static template contentJSONtoSiSUstruct() {
break;
}
}
- if ("num_depth" in _json.object["make"]
- && (_json.object["make"]["num_depth"].type().to!string == "INTEGER")
+ if ("auto_num_depth" in _json.object["make"]
+ && (_json.object["make"]["auto_num_depth"].type().to!string == "INTEGER")
) {
- _struct_composite.make_str.num_depth = _json.object["make"]["num_depth"].integer.to!int;
- } else if ("num_depth" in _json.object["make"]
- && (_json.object["make"]["num_depth"].type().to!string == "STRING")
+ _struct_composite.make_str.auto_num_depth = _json.object["make"]["auto_num_depth"].integer.to!int;
+ } else if ("auto_num_depth" in _json.object["make"]
+ && (_json.object["make"]["auto_num_depth"].type().to!string == "STRING")
) {
- _struct_composite.make_str.num_depth = _json.object["make"]["num_depth"].str.to!int;
+ _struct_composite.make_str.auto_num_depth = _json.object["make"]["auto_num_depth"].str.to!int;
}
if ("substitute" in _json.object["make"]) {
string[][] _sub;
@@ -180,7 +210,7 @@ static template contentJSONtoSiSUstruct() {
_struct_composite.make.italics = _mk.italics(_struct_composite.make_str.italics);
_struct_composite.make.auto_num_top_at_level = _mk.auto_num_top_at_level(_struct_composite.make_str.auto_num_top_at_level);
_struct_composite.make.auto_num_top_lv = _mk.auto_num_top_lv(_struct_composite.make_str.auto_num_top_lv);
- _struct_composite.make.num_depth = _mk.num_depth(_struct_composite.make_str.num_depth);
+ _struct_composite.make.auto_num_depth = _mk.auto_num_depth(_struct_composite.make_str.auto_num_depth);
_struct_composite.make.substitute = _mk.substitute(_struct_composite.make_str.substitute);
_struct_composite.make.texpdf_font = _mk.texpdf_font(_struct_composite.make_str.texpdf_font);
}