aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2018-07-06 11:27:23 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:15 -0400
commitcf5e80c5c5355dfb40f8abd1350fb4d3869316a6 (patch)
treedf35f70c5ecc097f29e504e63f166d5e3d54bece /src
parentdecendants (diff)
parent ocn
Diffstat (limited to 'src')
-rw-r--r--src/sdp/meta/metadoc_from_src.d52
1 files changed, 34 insertions, 18 deletions
diff --git a/src/sdp/meta/metadoc_from_src.d b/src/sdp/meta/metadoc_from_src.d
index f202b7c..050089e 100644
--- a/src/sdp/meta/metadoc_from_src.d
+++ b/src/sdp/meta/metadoc_from_src.d
@@ -1510,6 +1510,7 @@ template SiSUdocAbstraction() {
if (obj.metainfo.is_a == "heading") {
obj.metainfo.markedup_ancestors = _get_ancestors_markup(obj, _ancestors_markup);
obj.metainfo.collapsed_ancestors = _get_ancestors_collapsed(obj, _ancestors_collapsed);
+ obj.metainfo.parent_ocn = obj.metainfo.markedup_ancestors[obj.metainfo.parent_lev_markup];
}
}
debug(ancestors) {
@@ -1520,9 +1521,12 @@ template SiSUdocAbstraction() {
if (the_endnotes_section.length > 1) {
html_segnames ~= "endnotes";
html_segnames_ptr = html_segnames_ptr_cntr;
- foreach (ref section; the_endnotes_section) {
- if (section.metainfo.heading_lev_markup == 4) {
- section.ptr.html_segnames = html_segnames_ptr;
+ foreach (ref obj; the_endnotes_section) {
+ if (obj.metainfo.is_a == "heading") {
+ obj.metainfo.parent_ocn = obj.metainfo.markedup_ancestors[obj.metainfo.parent_lev_markup];
+ }
+ if (obj.metainfo.heading_lev_markup == 4) {
+ obj.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1531,9 +1535,12 @@ template SiSUdocAbstraction() {
if (the_glossary_section.length > 1) {
html_segnames ~= "glossary";
html_segnames_ptr = html_segnames_ptr_cntr;
- foreach (ref section; the_glossary_section) {
- if (section.metainfo.heading_lev_markup == 4) {
- section.ptr.html_segnames = html_segnames_ptr;
+ foreach (ref obj; the_glossary_section) {
+ if (obj.metainfo.is_a == "heading") {
+ obj.metainfo.parent_ocn = obj.metainfo.markedup_ancestors[obj.metainfo.parent_lev_markup];
+ }
+ if (obj.metainfo.heading_lev_markup == 4) {
+ obj.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1542,9 +1549,12 @@ template SiSUdocAbstraction() {
if (the_bibliography_section.length > 1) {
html_segnames ~= "bibliography";
html_segnames_ptr = html_segnames_ptr_cntr;
- foreach (ref section; the_bibliography_section) {
- if (section.metainfo.heading_lev_markup == 4) {
- section.ptr.html_segnames = html_segnames_ptr;
+ foreach (ref obj; the_bibliography_section) {
+ if (obj.metainfo.is_a == "heading") {
+ obj.metainfo.parent_ocn = obj.metainfo.markedup_ancestors[obj.metainfo.parent_lev_markup];
+ }
+ if (obj.metainfo.heading_lev_markup == 4) {
+ obj.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1553,15 +1563,18 @@ template SiSUdocAbstraction() {
if (the_bookindex_section["scroll"].length > 1) {
html_segnames ~= "bookindex";
html_segnames_ptr = html_segnames_ptr_cntr;
- foreach (ref section; the_bookindex_section["scroll"]) {
- if (section.metainfo.heading_lev_markup == 4) {
- section.ptr.html_segnames = html_segnames_ptr;
+ foreach (ref obj; the_bookindex_section["scroll"]) {
+ if (obj.metainfo.is_a == "heading") {
+ obj.metainfo.parent_ocn = obj.metainfo.markedup_ancestors[obj.metainfo.parent_lev_markup];
+ }
+ if (obj.metainfo.heading_lev_markup == 4) {
+ obj.ptr.html_segnames = html_segnames_ptr;
break;
}
}
- foreach (ref section; the_bookindex_section["seg"]) {
- if (section.metainfo.heading_lev_markup == 4) {
- section.ptr.html_segnames = html_segnames_ptr;
+ foreach (ref obj; the_bookindex_section["seg"]) {
+ if (obj.metainfo.heading_lev_markup == 4) {
+ obj.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1570,9 +1583,12 @@ template SiSUdocAbstraction() {
if (the_blurb_section.length > 1) {
html_segnames ~= "blurb";
html_segnames_ptr = html_segnames_ptr_cntr;
- foreach (ref section; the_blurb_section) {
- if (section.metainfo.heading_lev_markup == 4) {
- section.ptr.html_segnames = html_segnames_ptr;
+ foreach (ref obj; the_blurb_section) {
+ if (obj.metainfo.is_a == "heading") {
+ obj.metainfo.parent_ocn = obj.metainfo.markedup_ancestors[obj.metainfo.parent_lev_markup];
+ }
+ if (obj.metainfo.heading_lev_markup == 4) {
+ obj.ptr.html_segnames = html_segnames_ptr;
break;
}
}