aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/meta/metadoc_from_src.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/meta/metadoc_from_src.d')
-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;
}
}