diff options
| author | Ralph Amissah <ralph@amissah.com> | 2016-11-11 15:23:16 -0500 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:13 -0400 | 
| commit | 7d1cc45d0c3ac8f3258a022d7dd153c10d292c2d (patch) | |
| tree | 0b941d3acb776cf87819e1f5fac18caca6742ecc /org | |
| parent | document sections (diff) | |
para attribute: indent, variable type change, check consequences
Diffstat (limited to 'org')
| -rw-r--r-- | org/ao_abstract_doc_source.org | 70 | 
1 files changed, 35 insertions, 35 deletions
| diff --git a/org/ao_abstract_doc_source.org b/org/ao_abstract_doc_source.org index 0de77a2..6bdd46b 100644 --- a/org/ao_abstract_doc_source.org +++ b/org/ao_abstract_doc_source.org @@ -79,7 +79,7 @@ long counter, previous_count;  int[string] line_occur;  int verse_line, heading_pointer;  /+ paragraph attributes +/ -string[string] indent; +int[string] indent;  bool bullet = true;  string content_non_header = "8";  auto obj_im = ObjInlineMarkup(); @@ -302,8 +302,8 @@ if there is a glossary section you need to:    type["biblio_section"] = State.off;    type["blurb_section"] = State.off;    indent=[ -    "hang_position" : "0", -    "base_position" : "0", +    "hang_position" : 0, +    "base_position" : 0,    ];    bullet = false;    type["para"] = State.on; @@ -373,8 +373,8 @@ if there is a blurb section you need to:    type["biblio_section"] = State.off;    type["blurb_section"] = State.on;    indent=[ -    "hang_position" : "0", -    "base_position" : "0", +    "hang_position" : 0, +    "base_position" : 0,    ];    bullet = false;    type["para"] = State.on; @@ -781,8 +781,8 @@ if ((type["heading"] == State.on)      );    _common_reset_(line_occur, an_object, type);    indent=[ -    "hang_position" : "0", -    "base_position" : "0", +    "hang_position" : 0, +    "base_position" : 0,    ];    bullet = false;    processing.remove("verse"); @@ -1009,7 +1009,7 @@ foreach (entry; biblio_ordered) {        out_,                                                // nugget/object        "",                                                  // attrib        0,                                                   // obj_cite_number -      ([ "hang_position" : "0", "base_position" : "1", ]),     // indent +      ([ "hang_position" : 0, "base_position" : 1, ]),     // indent        false      );  } @@ -2581,7 +2581,7 @@ auto _para_match_(    char[] line,    ref string[string] an_object,    ref string an_object_key, -  ref string[string] indent, +  ref int[string] indent,    ref bool bullet,    ref int[string] type,    ref int[string] line_occur, @@ -2591,16 +2591,16 @@ auto _para_match_(      type["para"] = State.on;      an_object[an_object_key] ~= line; // body_nugget      indent=[ -      "hang_position" : "0", -      "base_position" : "0", +      "hang_position" : 0, +      "base_position" : 0,      ];      bullet = false;      if (auto m = matchFirst(line, rgx.para_indent)) {        debug(paraindent) {                    // para indent          writeln(line);        } -      indent["hang_position"] = to!string(m.captures[1]); -      indent["base_position"] = "0"; +      indent["hang_position"] = to!int(m.captures[1]); +      indent["base_position"] = 0;      } else if (matchFirst(line, rgx.para_bullet)) {        debug(parabullet) {                    // para bullet          writeln(line); @@ -2611,16 +2611,16 @@ auto _para_match_(          writeln(line);        }        indent=[ -        "hang_position" : to!string(m.captures[1]), -        "base_position" : to!string(m.captures[2]), +        "hang_position" : to!int(m.captures[1]), +        "base_position" : to!int(m.captures[2]),        ];      } else if (auto m = matchFirst(line, rgx.para_bullet_indent)) {        debug(parabulletindent) {              // para bullet indent          writeln(line);        }        indent=[ -        "hang_position" : to!string(m.captures[1]), -        "base_position" : "0", +        "hang_position" : to!int(m.captures[1]), +        "base_position" : 0,        ];        bullet = true;      } @@ -2927,7 +2927,7 @@ struct ObjInlineMarkup {      heading_toc_ = _clean_heading_toc_(heading_toc_);      auto attrib="";      string toc_txt_; -    string[string] indent; +    int[string] indent;      auto set_abstract_object = ObjectAbstractSet();      if (to!int(obj_["lev_markup_number"]) > 0) {        toc_txt_ = format( @@ -2936,8 +2936,8 @@ struct ObjInlineMarkup {          obj_cite_number,        );        indent=[ -        "hang_position" : obj_["lev_markup_number"], -        "base_position" : obj_["lev_markup_number"], +        "hang_position" : to!int(obj_["lev_markup_number"]), +        "base_position" : to!int(obj_["lev_markup_number"]),        ];        toc_txt_ = format(          "{ %s }#%s", @@ -2955,8 +2955,8 @@ struct ObjInlineMarkup {          );      } else {        indent=[ -        "hang_position" : "0", -        "base_position" : "0", +        "hang_position" : 0, +        "base_position" : 0,        ];        the_table_of_contents_section["scroll"] ~=          set_abstract_object.contents_para( @@ -2971,8 +2971,8 @@ struct ObjInlineMarkup {      switch (to!int(obj_["lev_markup_number"])) {      case 0:        indent=[ -        "hang_position" : "0", -        "base_position" : "0", +        "hang_position" : 0, +        "base_position" : 0,        ];        the_table_of_contents_section["seg"] ~=          set_abstract_object.contents_para( @@ -2986,8 +2986,8 @@ struct ObjInlineMarkup {        break;      case 1: .. case 3:        indent=[ -        "hang_position" : obj_["lev_markup_number"], -        "base_position" : obj_["lev_markup_number"], +        "hang_position" : to!int(obj_["lev_markup_number"]), +        "base_position" : to!int(obj_["lev_markup_number"]),        ];        toc_txt_ = format(          "%s", @@ -3010,8 +3010,8 @@ struct ObjInlineMarkup {          segment_object_belongs_to,        );        indent=[ -        "hang_position" : obj_["lev_markup_number"], -        "base_position" : obj_["lev_markup_number"], +        "hang_position" : to!int(obj_["lev_markup_number"]), +        "base_position" : to!int(obj_["lev_markup_number"]),        ];        the_table_of_contents_section["seg"] ~=          set_abstract_object.contents_para( @@ -3031,8 +3031,8 @@ struct ObjInlineMarkup {          obj_cite_number,        );        indent=[ -        "hang_position" : obj_["lev_markup_number"], -        "base_position" : obj_["lev_markup_number"], +        "hang_position" : to!int(obj_["lev_markup_number"]), +        "base_position" : to!int(obj_["lev_markup_number"]),        ];        the_table_of_contents_section["seg"] ~=          set_abstract_object.contents_para( @@ -3725,7 +3725,7 @@ struct BookIndexReportSection {      string lev;      int lev_markup_number, lev_collapsed_number;      string attrib; -    string[string] indent; +    int[string] indent;      auto set_abstract_object = ObjectAbstractSet();      auto mainkeys =        bookindex_unordered_hashes.byKey.array.sort().release; @@ -3819,8 +3819,8 @@ struct BookIndexReportSection {          type="para";          attrib="";          indent=[ -          "hang_position" : "0", -          "base_position" : "1", +          "hang_position" : 0, +          "base_position" : 1,          ];          bookindex_section["scroll"] ~=            set_abstract_object.contents_para( @@ -3970,7 +3970,7 @@ struct NotesSection {      string type;      string lev, lev_markup_number, lev_collapsed_number;      string attrib; -    string[string] indent; +    int[string] indent;      if (endnotes_["seg"].length > 0) {        attrib="";        lev="B"; @@ -4779,7 +4779,7 @@ auto contents_para(    in string object,    in string attrib,    in int obj_cite_number, -  in string[string] indent, +  in int[string] indent,    in bool bullet  ) {    ObjComposite object_set; | 
