diff options
author | Ralph Amissah <ralph@amissah.com> | 2016-09-06 20:47:02 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:13 -0400 |
commit | 8ddeddffb0f5323932f6f44c6005496075a9ad73 (patch) | |
tree | f59f9c2d291b977a7c4e92044adf2fae7a50e20f /org/ao_abstract_doc_source.org | |
parent | minor shuffling (diff) |
naming of para indent attributes
Diffstat (limited to 'org/ao_abstract_doc_source.org')
-rw-r--r-- | org/ao_abstract_doc_source.org | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/org/ao_abstract_doc_source.org b/org/ao_abstract_doc_source.org index b570f83..b2f38c8 100644 --- a/org/ao_abstract_doc_source.org +++ b/org/ao_abstract_doc_source.org @@ -638,8 +638,8 @@ if ((type["heading"] == State.on) // bullet // ); header_set_common(line_occur, an_object, type); - indent["first"] = "0"; - indent["second"] = "0"; + indent["hang_position"] = "0"; + indent["base_position"] = "0"; bullet = false; processing.remove("verse"); ++counter; @@ -2319,8 +2319,8 @@ auto para_match( } type["para"] = State.on; an_object["obj"] ~= line ~= "\n"; - indent["first"] = to!string(m.captures[1]); - indent["second"] = "0"; + indent["hang_position"] = to!string(m.captures[1]); + indent["base_position"] = "0"; bullet = false; } else if (matchFirst(line, rgx.para_bullet)) { debug(parabullet) { // para bullet @@ -2328,8 +2328,8 @@ auto para_match( } type["para"] = State.on; an_object["obj"] ~= line; - indent["first"] = "0"; - indent["second"] = "0"; + indent["hang_position"] = "0"; + indent["base_position"] = "0"; bullet = true; } else if (auto m = matchFirst(line, rgx.para_indent_hang)) { debug(paraindenthang) { // para indent hang @@ -2337,8 +2337,8 @@ auto para_match( } type["para"] = State.on; an_object["obj"] ~= line; - indent["first"] = to!string(m.captures[1]); - indent["second"] = to!string(m.captures[2]); + indent["hang_position"] = to!string(m.captures[1]); + indent["base_position"] = to!string(m.captures[2]); bullet = false; } else if (auto m = matchFirst(line, rgx.para_bullet_indent)) { debug(parabulletindent) { // para bullet indent @@ -2346,15 +2346,15 @@ auto para_match( } type["para"] = State.on; an_object["obj"] ~= line; - indent["first"] = to!string(m.captures[1]); - indent["second"] = "0"; + indent["hang_position"] = to!string(m.captures[1]); + indent["base_position"] = "0"; bullet = true; } else { // !line.empty type["para"] = State.on; an_object["obj"] ~= line; - indent["first"] = "0"; - indent["second"] = "0"; + indent["hang_position"] = "0"; + indent["base_position"] = "0"; bullet = false; } ++line_occur["para"]; @@ -2401,23 +2401,23 @@ struct ObjAttributes { obj_txt["munge"]=obj_txt_in; if (matchFirst(obj_txt_in, rgx.para_bullet)) { obj_txt["attrib"] =" \"bullet\": \"true\"," - ~ " \"indent_first\": 0," + ~ " \"indent_start\": 0," ~ " \"indent_rest\": 0,"; } else if (auto m = matchFirst(obj_txt_in, rgx.para_bullet_indent)) { obj_txt["attrib"] =" \"bullet\": \"true\"," - ~ " \"indent_first\": " ~ to!string(m.captures[1]) ~ "," + ~ " \"indent_start\": " ~ to!string(m.captures[1]) ~ "," ~ " \"indent_rest\": " ~ to!string(m.captures[1]) ~ ","; } else if (auto m = matchFirst(obj_txt_in, rgx.para_indent_hang)) { obj_txt["attrib"] =" \"bullet\": \"false\"," - ~ " \"indent_first\": " ~ to!string(m.captures[1]) ~ "," + ~ " \"indent_start\": " ~ to!string(m.captures[1]) ~ "," ~ " \"indent_rest\": " ~ to!string(m.captures[2]) ~ ","; } else if (auto m = matchFirst(obj_txt_in, rgx.para_indent)) { obj_txt["attrib"] =" \"bullet\": \"false\"," - ~ " \"indent_first\": " ~ to!string(m.captures[1]) ~ "," + ~ " \"indent_start\": " ~ to!string(m.captures[1]) ~ "," ~ " \"indent_rest\": " ~ to!string(m.captures[1]) ~ ","; } else { obj_txt["attrib"] =" \"bullet\": \"false\"," - ~ " \"indent_first\": 0," + ~ " \"indent_start\": 0," ~ " \"indent_rest\": 0,"; } return obj_txt["attrib"]; @@ -3107,8 +3107,8 @@ struct BookIndexReportSection { bi_tmp = replaceFirst(bi_tmp, rgx.trailing_linebreak, ""); type="para"; attrib=""; - indent["first"] = "0"; - indent["second"] = "1"; + indent["hang_position"] = "0"; + indent["base_position"] = "1"; attrib=""; // bookindex_section ~= // set_abstract_object.contents_para( @@ -3869,8 +3869,8 @@ struct HeadingAttrib { int lev_collapsed_number = 9; } struct ParaAttrib { - int indent_first = 0; - int indent_second = 0; + int indent_start = 0; + int indent_rest = 0; bool bullet = false; } struct BlockAttrib { @@ -3954,14 +3954,14 @@ auto contents_para( in bool bullet ) { ObjComposite object_set; - object_set.use = "content"; - object_set.of = "para"; - object_set.is_a = "para"; - object_set.object = object; - object_set.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); - object_set.para_attrib.indent_first = 0; // indent["first"]; - object_set.para_attrib.indent_second = 0; // indent["second"]; - object_set.para_attrib.bullet = false; + object_set.use = "content"; + object_set.of = "para"; + object_set.is_a = "para"; + object_set.object = object.strip; + object_set.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); + object_set.para_attrib.indent_start = 0; // indent["hang_position"]; + object_set.para_attrib.indent_rest = 0; // indent["base_position"]; + object_set.para_attrib.bullet = false; // object_set.node_structure.node = node; return object_set; } |