aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2018-07-02 15:14:32 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:15 -0400
commitffc3747ff10f260a7ff3705681fdbaefc055e120 (patch)
tree64a98332894efdea4abead09512a48fd1af3c6f1 /src/sdp
parentobj.metainfo node type info, ancestors (diff)
cosmetic
Diffstat (limited to 'src/sdp')
-rw-r--r--src/sdp/meta/conf_make_meta_json.d21
-rw-r--r--src/sdp/meta/metadoc_from_src.d2
-rw-r--r--src/sdp/meta/object_setter.d64
3 files changed, 24 insertions, 63 deletions
diff --git a/src/sdp/meta/conf_make_meta_json.d b/src/sdp/meta/conf_make_meta_json.d
index a496f07..bf67c62 100644
--- a/src/sdp/meta/conf_make_meta_json.d
+++ b/src/sdp/meta/conf_make_meta_json.d
@@ -134,26 +134,19 @@ static template contentJSONtoSiSUstruct() {
switch (_json.object["make"]["auto_num_top_at_level"].str) {
case "A":
break;
- case "B":
- _struct_composite.make_str.auto_num_top_lv = 1;
+ case "B": _struct_composite.make_str.auto_num_top_lv = 1;
break;
- case "C":
- _struct_composite.make_str.auto_num_top_lv = 2;
+ case "C": _struct_composite.make_str.auto_num_top_lv = 2;
break;
- case "D":
- _struct_composite.make_str.auto_num_top_lv = 3;
+ case "D": _struct_composite.make_str.auto_num_top_lv = 3;
break;
- case "1":
- _struct_composite.make_str.auto_num_top_lv = 4;
+ case "1": _struct_composite.make_str.auto_num_top_lv = 4;
break;
- case "2":
- _struct_composite.make_str.auto_num_top_lv = 5;
+ case "2": _struct_composite.make_str.auto_num_top_lv = 5;
break;
- case "3":
- _struct_composite.make_str.auto_num_top_lv = 6;
+ case "3": _struct_composite.make_str.auto_num_top_lv = 6;
break;
- case "4":
- _struct_composite.make_str.auto_num_top_lv = 7;
+ case "4": _struct_composite.make_str.auto_num_top_lv = 7;
break;
default:
break;
diff --git a/src/sdp/meta/metadoc_from_src.d b/src/sdp/meta/metadoc_from_src.d
index ee82257..962fef9 100644
--- a/src/sdp/meta/metadoc_from_src.d
+++ b/src/sdp/meta/metadoc_from_src.d
@@ -5409,7 +5409,6 @@ template SiSUdocAbstraction() {
|| (contents_am[cntr].metainfo.is_a == "block")
|| (contents_am[cntr].metainfo.is_a == "verse"));
assert(cntr >= previous_count);
- previous_count=cntr;
assert(
(contents_am[cntr].text).match(
rgx.inline_notes_delimiter_al_regular_number_note)
@@ -5417,6 +5416,7 @@ template SiSUdocAbstraction() {
}
body {
mixin InternalMarkup;
+ previous_count=cntr;
static auto mkup = InlineMarkup();
static auto munge = ObjInlineMarkupMunge();
foreach(
diff --git a/src/sdp/meta/object_setter.d b/src/sdp/meta/object_setter.d
index 09ce2ee..a60d2b7 100644
--- a/src/sdp/meta/object_setter.d
+++ b/src/sdp/meta/object_setter.d
@@ -22,34 +22,22 @@ template ObjectSetter() {
int o_n_book_index = 0;
int o_n_blurb = 0;
string object_number_substantive() const @property {
- return (o_n_substantive==0)
- ? ""
- : o_n_substantive.to!string;
+ return (o_n_substantive==0) ? "" : o_n_substantive.to!string;
}
string object_number_non_substantive() const @property {
- return (o_n_non_substantive==0)
- ? ""
- : o_n_non_substantive.to!string;
+ return (o_n_non_substantive==0) ? "" : o_n_non_substantive.to!string;
}
string object_number_glossary() const @property {
- return (o_n_glossary==0)
- ? ""
- : o_n_glossary.to!string;
+ return (o_n_glossary==0) ? "" : o_n_glossary.to!string;
}
string object_number_bibliography() const @property {
- return (o_n_bibliography==0)
- ? ""
- : o_n_bibliography.to!string;
+ return (o_n_bibliography==0) ? "" : o_n_bibliography.to!string;
}
string object_number_book_index() const @property {
- return (o_n_book_index==0)
- ? ""
- : o_n_book_index.to!string;
+ return (o_n_book_index==0) ? "" : o_n_book_index.to!string;
}
string object_number_blurb() const @property {
- return (o_n_blurb==0)
- ? ""
- : o_n_blurb.to!string;
+ return (o_n_blurb==0) ? "" : o_n_blurb.to!string;
}
string object_number_off = "";
bool visible_object_number = false;
@@ -59,9 +47,7 @@ template ObjectSetter() {
string[string][string] node;
int ocn = 0;
string object_number() const @property {
- return (ocn==0)
- ? ""
- : ocn.to!string;
+ return (ocn==0) ? "" : ocn.to!string;
}
int o_n_type = 0;
int heading_lev_markup = 9;
@@ -69,33 +55,15 @@ template ObjectSetter() {
string marked_up_level() const @property {
string _out;
switch (heading_lev_markup) {
- case 0:
- _out = "A";
- break;
- case 1:
- _out = "B";
- break;
- case 2:
- _out = "C";
- break;
- case 3:
- _out = "D";
- break;
- case 4:
- _out = "1";
- break;
- case 5:
- _out = "2";
- break;
- case 6:
- _out = "3";
- break;
- case 7:
- _out = "4";
- break;
- default:
- _out = "";
- break;
+ case 0: _out = "A"; break;
+ case 1: _out = "B"; break;
+ case 2: _out = "C"; break;
+ case 3: _out = "D"; break;
+ case 4: _out = "1"; break;
+ case 5: _out = "2"; break;
+ case 6: _out = "3"; break;
+ case 7: _out = "4"; break;
+ default: _out = ""; break;
}
return _out;
}