aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-01-18 18:21:18 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commitf1d8aac5386f98c912ede3db57999eeeed841f3c (patch)
tree243fd25b4c7b9d1a4d5cda03af4f33fa875da4d7 /src
parentsome reorganising, moved doc sections sequence keys, tuple change (diff)
reset ocn on new document (much more re-initializing necessary)
Diffstat (limited to 'src')
-rw-r--r--src/sdp/ao_abstract_doc_source.d16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d
index d8eb7d2..9bb5def 100644
--- a/src/sdp/ao_abstract_doc_source.d
+++ b/src/sdp/ao_abstract_doc_source.d
@@ -696,7 +696,9 @@ template SiSUdocAbstraction() {
if ((type["heading"] == State.on)
&& (line_occur["heading"] > State.off)) {
/+ heading object (current line empty) +/
- obj_cite_number = ocn_emit(type["ocn_status"]);
+ obj_cite_number = (to!int(an_object["lev_markup_number"]) == 0)
+ ? (ocn_emit(3))
+ : (obj_cite_number = ocn_emit(type["ocn_status"]));
an_object["bookindex_nugget"] =
("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
bookindex_unordered_hashes =
@@ -2842,11 +2844,15 @@ template SiSUdocAbstraction() {
struct OCNemitter {
int obj_cite_number, obj_cite_number_;
int ocn_emitter(int ocn_status_flag)
- in { assert(ocn_status_flag <= 2); }
+ in { assert(ocn_status_flag <= 3); }
body {
- obj_cite_number=(ocn_status_flag == 0)
- ? ++obj_cite_number_
- : 0;
+ if (ocn_status_flag == 3) {
+ obj_cite_number = obj_cite_number_ = 1;
+ } else {
+ obj_cite_number=(ocn_status_flag == 0)
+ ? ++obj_cite_number_
+ : 0;
+ }
assert(obj_cite_number >= 0);
return obj_cite_number;
}