aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-01-15 10:02:27 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit4fb0979097a0dcfda7cd2cf3bc510d60d7e6e4e1 (patch)
treec2d7a126ddcced3bc33e682e0874df02d74467f5 /src/sdp.d
parentminor cleaning (diff)
some reorganising, moved doc sections sequence keys, tuple change
Diffstat (limited to 'src/sdp.d')
-rwxr-xr-xsrc/sdp.d36
1 files changed, 2 insertions, 34 deletions
diff --git a/src/sdp.d b/src/sdp.d
index f3fd07f..3a754b9 100755
--- a/src/sdp.d
+++ b/src/sdp.d
@@ -225,40 +225,8 @@ void main(string[] args) {
auto t = abs.abstract_doc_source(content_body, _dochead_make, _dochead_meta, _opt_action_bool);
static assert(!isTypeTuple!(t));
auto doc_abstraction = t[0]; // head ~ toc ~ contents ~ endnotes_seg ~ glossary ~ bibliography ~ bookindex ~blurb;
- string[] doc_html_segnames = t[1];
- string[][string] document_section_keys_sequenced = [
- "seg": ["head", "toc_seg", "body",],
- "scroll": ["head", "toc_scroll", "body",]
- ];
- if (doc_abstraction["endnotes"].length > 1) {
- document_section_keys_sequenced["seg"] ~= "endnotes";
- document_section_keys_sequenced["scroll"] ~= "endnotes";
- }
- if (doc_abstraction["glossary"].length > 1) {
- document_section_keys_sequenced["seg"] ~= "glossary";
- document_section_keys_sequenced["scroll"] ~= "glossary";
- }
- if (doc_abstraction["bibliography"].length > 1) {
- document_section_keys_sequenced["seg"] ~= "bibliography";
- document_section_keys_sequenced["scroll"] ~= "bibliography";
- }
- if (doc_abstraction["bookindex_seg"].length > 1) {
- document_section_keys_sequenced["seg"] ~= "bookindex_seg";
- }
- if (doc_abstraction["bookindex_scroll"].length > 1) {
- document_section_keys_sequenced["scroll"] ~= "bookindex_scroll";
- }
- if (doc_abstraction["blurb"].length > 1) {
- document_section_keys_sequenced["seg"] ~= "blurb";
- document_section_keys_sequenced["scroll"] ~= "blurb";
- }
- if ((_opt_action_bool["html"])
- || (_opt_action_bool["html_scroll"])
- || (_opt_action_bool["html_seg"])
- || (_opt_action_bool["epub"])) {
- document_section_keys_sequenced["seg"] ~= "tail";
- document_section_keys_sequenced["scroll"] ~= "tail";
- }
+ string[][string] document_section_keys_sequenced = t[1];
+ string[] doc_html_segnames = t[2];
struct DocumentMatters {
string[] keys_seq_seg() {
string[] _k = document_section_keys_sequenced["seg"];