From c3a2508f2acfdffbde46e237071c9775ce2ff519 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 28 Feb 2018 17:18:16 -0500 Subject: header make unmarked headings --- src/sdp/meta/conf_make_meta_json.d | 12 +++++++++++- 1 file changed, 11 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 2ccf2c3..916dd33 100644 --- a/src/sdp/meta/conf_make_meta_json.d +++ b/src/sdp/meta/conf_make_meta_json.d @@ -71,7 +71,17 @@ static template contentJSONtoSiSUstruct() { if ("headings" in _json.object["make"] && (_json.object["make"]["headings"].type().to!string == "STRING") ) { - _struct_composite.make_str.headings = _json.object["make"]["headings"].str; + char[][] __match_headings_array + = (cast(char[]) _json.object["make"]["headings"].str) + .split(_rgx.make_heading_delimiter); + _struct_composite.make_str.headings = __match_headings_array.to!(string[]); + } else if ("headings" in _json.object["make"] + && _json.object["make"]["headings"].type().to!string == "ARRAY") { + string[] _match_headings_array; + foreach (_match_heading; _json.object["make"]["headings"].arrayNoRef) { + _match_headings_array ~= _match_heading.str; + } + _struct_composite.make_str.headings = _match_headings_array; } if ("home_button_image" in _json.object["make"] && (_json.object["make"]["home_button_image"].type().to!string == "STRING") -- cgit v1.2.3