diff options
| author | Ralph Amissah <ralph@amissah.com> | 2017-03-27 18:13:27 -0400 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:14 -0400 | 
| commit | 25ac32b30c6ba98b32006677e2633befaa69483a (patch) | |
| tree | b759654c0763f6ede950274e54aa775fc9e8d9f6 /src | |
| parent | 0.13.7 tables ao and html output, poem html output (diff) | |
output, move stuff about
Diffstat (limited to 'src')
| -rw-r--r-- | src/sdp/ao_abstract_doc_source.d | 6 | ||||
| -rw-r--r-- | src/sdp/output_epub.d | 14 | ||||
| -rw-r--r-- | src/sdp/output_html.d | 34 | ||||
| -rw-r--r-- | src/sdp/output_xhtmls.d | 86 | 
4 files changed, 70 insertions, 70 deletions
| diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d index de3d575..4b3ea1f 100644 --- a/src/sdp/ao_abstract_doc_source.d +++ b/src/sdp/ao_abstract_doc_source.d @@ -2528,7 +2528,7 @@ template SiSUdocAbstraction() {        comp_obj_block.inline_links               = substantive_obj_misc_tuple[sObj.links];        the_document_body_section                 ~= comp_obj_block;        type["blocks"]                            = TriState.off; -      type["table"]                             = TriState.off; +      type["quote"]                             = TriState.off;        object_reset(an_object);        processing.remove("verse");        ++cntr; @@ -2592,7 +2592,7 @@ template SiSUdocAbstraction() {            cntr,            heading_ptr-1,            an_object["is"] -         ); +        );        auto substantive_obj_misc_tuple =          obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);        an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; @@ -3757,7 +3757,7 @@ template SiSUdocAbstraction() {          break;        default:          /+ para, heading, group, block, verse +/ -        obj_txt["munge"]=x[0]; +        obj_txt["munge"]                  = x[0];          obj_notes_and_links["notes_reg"]  = x[1];          obj_notes_and_links["notes_star"] = x[2];          obj_notes_and_links["links"]      = x[3]; diff --git a/src/sdp/output_epub.d b/src/sdp/output_epub.d index 3724854..2cbe885 100644 --- a/src/sdp/output_epub.d +++ b/src/sdp/output_epub.d @@ -274,9 +274,7 @@ template outputEPub() {                break;              case "block":                switch (obj.is_a) { -              case "poem":                        // double check why both poem & verse -                break; -              case "verse": +              case "quote":                  doc_epub[segment_filename] ~= xhtml_format.nugget(obj);                  break;                case "group": @@ -285,17 +283,19 @@ template outputEPub() {                case "block":                  doc_epub[segment_filename] ~= xhtml_format.nugget(obj);                  break; -              case "quote": +              case "poem": +                break; +              case "verse":                  doc_epub[segment_filename] ~= xhtml_format.nugget(obj);                  break; +              case "code": +                doc_epub[segment_filename] ~= xhtml_format.code(obj); +                break;                case "table":                  auto t = xhtml_format.para_seg(obj, suffix);                  doc_epub[segment_filename] ~= t[0];                  doc_epub_endnotes[segment_filename] ~= t[1];                  break; -              case "code": -                doc_epub[segment_filename] ~= xhtml_format.code(obj); -                break;                default:                  if ((doc_matters.opt_action_bool["debug"])) {                    writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); diff --git a/src/sdp/output_html.d b/src/sdp/output_html.d index a05812f..9e66311 100644 --- a/src/sdp/output_html.d +++ b/src/sdp/output_html.d @@ -80,10 +80,8 @@ template outputHTML() {              break;            case "block":              switch (obj.is_a) { -            case "poem": -              break; -            case "verse": -              doc_html ~= xhtml_format.verse(obj); +            case "quote": +              doc_html ~= xhtml_format.nugget(obj);                break;              case "group":                doc_html ~= xhtml_format.nugget(obj); @@ -91,15 +89,17 @@ template outputHTML() {              case "block":                doc_html ~= xhtml_format.nugget(obj);                break; -            case "quote": -              doc_html ~= xhtml_format.nugget(obj); +            case "poem":                break; -            case "table": -              doc_html ~= xhtml_format.table(obj); +            case "verse": +              doc_html ~= xhtml_format.verse(obj);                break;              case "code":                doc_html ~= xhtml_format.code(obj);                break; +            case "table": +              doc_html ~= xhtml_format.table(obj); +              break;              default:                if ((doc_matters.opt_action_bool["debug"])) {                  writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); @@ -301,10 +301,8 @@ template outputHTML() {                break;              case "block":                switch (obj.is_a) { -              case "poem": -                break; -              case "verse": -                doc_html[segment_filename] ~= xhtml_format.verse(obj); +              case "quote": +                doc_html[segment_filename] ~= xhtml_format.nugget(obj);                  break;                case "group":                  doc_html[segment_filename] ~= xhtml_format.nugget(obj); @@ -312,16 +310,18 @@ template outputHTML() {                case "block":                  doc_html[segment_filename] ~= xhtml_format.nugget(obj);                  break; -              case "quote": -                doc_html[segment_filename] ~= xhtml_format.nugget(obj); +              case "poem":                  break; -              case "table": -                doc_html[segment_filename] ~= xhtml_format.table(obj); -                doc_html_endnotes[segment_filename] ~= ""; +              case "verse": +                doc_html[segment_filename] ~= xhtml_format.verse(obj);                  break;                case "code":                  doc_html[segment_filename] ~= xhtml_format.code(obj);                  break; +              case "table": +                doc_html[segment_filename] ~= xhtml_format.table(obj); +                doc_html_endnotes[segment_filename] ~= ""; +                break;                default:                  if ((doc_matters.opt_action_bool["debug"])) {                    writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); diff --git a/src/sdp/output_xhtmls.d b/src/sdp/output_xhtmls.d index 971dd95..f371121 100644 --- a/src/sdp/output_xhtmls.d +++ b/src/sdp/output_xhtmls.d @@ -419,40 +419,6 @@ template outputXHTMLs() {        );        return u;      } -    auto verse(O)(                           // using code from code block, review -      auto return ref const O    obj, -    ) { -      string _txt = obj.text; -      _txt = (_txt) -        .replaceAll(rgx.newline, "<br>\n") -        .replaceAll(rgx.two_spaces, " " ~ " " ~ " " ~ " ") -        .replaceAll(rgx.nbsp_and_space, " " ~ " "); -      string o; -      if (obj.obj_cite_number.empty) { -          o = format(q"¶  <div class="substance"> -            <p class="%s"> -    %s -          </p> -        </div>¶", -          obj.is_a, -          _txt -        ); -      } else { -        o = format(q"¶  <div class="substance"> -          <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> -          <p class="%s" id="%s"> -    %s -          </p> -        </div>¶", -          obj.obj_cite_number, -          obj.obj_cite_number, -          obj.is_a, -          obj.obj_cite_number, -          _txt -        ); -      } -      return o; -    }      auto nugget(O)(        auto return ref const O    obj,      ) { @@ -482,18 +448,38 @@ template outputXHTMLs() {        }        return o;      } -    auto endnote(O)( +    auto verse(O)(                           // using code from code block, review        auto return ref const O    obj,      ) { +      string _txt = obj.text; +      _txt = (_txt) +        .replaceAll(rgx.newline, "<br>\n") +        .replaceAll(rgx.two_spaces, " " ~ " " ~ " " ~ " ") +        .replaceAll(rgx.nbsp_and_space, " " ~ " ");        string o; -      o = format(q"¶    <p class="%s" indent="h%si%s"> -      %s -    </p>¶", -        obj.is_a, -        obj.indent_hang, -        obj.indent_base, -        obj.text -      ); +      if (obj.obj_cite_number.empty) { +          o = format(q"¶  <div class="substance"> +            <p class="%s"> +    %s +          </p> +        </div>¶", +          obj.is_a, +          _txt +        ); +      } else { +        o = format(q"¶  <div class="substance"> +          <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> +          <p class="%s" id="%s"> +    %s +          </p> +        </div>¶", +          obj.obj_cite_number, +          obj.obj_cite_number, +          obj.is_a, +          obj.obj_cite_number, +          _txt +        ); +      }        return o;      }      auto tablarize(O)( @@ -558,6 +544,20 @@ template outputXHTMLs() {        );        return o;      } +    auto endnote(O)( +      auto return ref const O    obj, +    ) { +      string o; +      o = format(q"¶    <p class="%s" indent="h%si%s"> +      %s +    </p>¶", +        obj.is_a, +        obj.indent_hang, +        obj.indent_base, +        obj.text +      ); +      return o; +    }      auto code(O)(        auto return ref const O  obj,      ) { | 
