aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/meta_conf_make_meta.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/meta_conf_make_meta.org')
-rw-r--r--org/meta_conf_make_meta.org141
1 files changed, 65 insertions, 76 deletions
diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org
index 71f9124..a0440e3 100644
--- a/org/meta_conf_make_meta.org
+++ b/org/meta_conf_make_meta.org
@@ -499,64 +499,59 @@ if ("make" in _json.object) {
) {
_struct_composite.make_str.emphasis = _json.object["make"]["emphasis"].str;
}
- if ("footer" in _json.object["make"]
- && (_json.object["make"]["footer"].type().to!string == "string")
- ) {
- 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;
+ if ("footer" in _json.object["make"]) {
+ if (_json.object["make"]["footer"].type().to!string == "string") {
+ 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 (_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;
}
- _struct_composite.make_str.footer = _match_footer_array;
- }
- if ("headings" in _json.object["make"]
- && (_json.object["make"]["headings"].type().to!string == "string")
- ) {
- 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;
+ }
+ if ("headings" in _json.object["make"]) {
+ if (_json.object["make"]["headings"].type().to!string == "string") {
+ 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 (_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;
}
- _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")
- ) {
- 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;
+ }
+ if ("home_button_image" in _json.object["make"]) {
+ if (_json.object["make"]["home_button_image"].type().to!string == "string") {
+ 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 (_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;
}
- _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;
- } 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;
+ if ("home_button_text" in _json.object["make"]) {
+ if (_json.object["make"]["home_button_text"].type().to!string == "string") {
+ _struct_composite.make_str.home_button_text = _json.object["make"]["home_button_text"].str;
+ } else if (_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;
+ }
+ string _match_home_button_text_str = (_match_home_button_text_array).join("; ");
+ _struct_composite.make_str.home_button_text = _match_home_button_text_str;
}
- string _match_home_button_text_str = (_match_home_button_text_array).join("; ");
- _struct_composite.make_str.home_button_text = _match_home_button_text_str;
}
if ("italics" in _json.object["make"]
&& (_json.object["make"]["italics"].type().to!string == "string")
@@ -588,35 +583,29 @@ if ("make" in _json.object) {
break;
}
}
- if ("auto_num_depth" in _json.object["make"]
- && (_json.object["make"]["auto_num_depth"].type().to!string == "INTEGER")
- ) {
- _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.auto_num_depth = _json.object["make"]["auto_num_depth"].str.to!int;
+ if ("auto_num_depth" in _json.object["make"]) {
+ if (_json.object["make"]["auto_num_depth"].type().to!string == "int") { // TODO watch this match
+ _struct_composite.make_str.auto_num_depth = _json.object["make"]["auto_num_depth"].integer.to!int;
+ } else if (_json.object["make"]["auto_num_depth"].type().to!string == "string") {
+ _struct_composite.make_str.auto_num_depth = _json.object["make"]["auto_num_depth"].str.to!int;
+ }
}
if ("substitute" in _json.object["make"]) {
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];
+ if (_json.object["make"]["substitute"].type().to!string == "array") {
+ if (_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"][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]];
+ }
}
- } 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;