diff options
author | Ralph Amissah <ralph@amissah.com> | 2016-09-07 11:18:55 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:13 -0400 |
commit | 218764073c8c82c57a80d9547b4d6dbefa496b13 (patch) | |
tree | 9c286ec81c9cad6531f53d8eae263582cc7ab0dd /org/ao_abstract_doc_source.org | |
parent | 0.6.8 work on heading & anchor tag attributes, re-fix header_make headings (diff) |
screen output, just use writeln etc. keep simple
Diffstat (limited to 'org/ao_abstract_doc_source.org')
-rw-r--r-- | org/ao_abstract_doc_source.org | 75 |
1 files changed, 34 insertions, 41 deletions
diff --git a/org/ao_abstract_doc_source.org b/org/ao_abstract_doc_source.org index 6bbf233..c3ae02d 100644 --- a/org/ao_abstract_doc_source.org +++ b/org/ao_abstract_doc_source.org @@ -161,13 +161,6 @@ int tell_lo(int obj_cite_number, in char[] line) { ); return 0; } -int tell_l(string color, in char[] line) { - writefln( - "* %s", - line - ); - return 0; -} string[string] obj_cite_number_poem = [ "start" : "", "end" : "" @@ -408,7 +401,7 @@ if (matchFirst(line, rgx.block_open)) { // blocks closed, unless followed by book index debug(check) { // block writeln(__LINE__); - tell_l("red", line); + writeln(line); } assert( matchFirst(line, rgx.book_index) @@ -444,7 +437,7 @@ if (matchFirst(line, rgx.block_open)) { if (auto m = matchFirst(line, rgx.comment)) { /+ matched comment +/ debug(comment) { - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; contents_the_objects ~= @@ -494,7 +487,7 @@ if (matchFirst(line, rgx.block_open)) { } else if (line_occur["heading"] > State.off) { /+ heading +/ debug(heading) { // heading - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; ++line_occur["heading"]; @@ -507,7 +500,7 @@ if (matchFirst(line, rgx.block_open)) { } else if (line_occur["para"] > State.off) { /+ paragraph +/ debug(para) { - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line; ++line_occur["para"]; @@ -584,7 +577,7 @@ if ((type["heading"] == State.on) ); // track previous heading and make assertions debug(objectrelated1) { // check - tell_l("blue", line); + writeln(line); // writeln(an_object["obj"]); // writeln(contents_am[counter]["obj_cite_number"], " ", contents_am[counter]["obj"]); // writeln(m.hit, "\n"); @@ -694,7 +687,7 @@ if (contents_the_objects.length > 0) { #+name: abs_post #+BEGIN_SRC d debug(objectrelated2) { // check - tell_l("blue", line); + writeln(line); // writeln(__FILE__, ":", __LINE__); // writeln(counter); // // contents_am[0..counter] @@ -909,13 +902,13 @@ auto check_obj_cite_number_status(char[] line, ref int[string] type) { if (matchFirst(line, rgx.obj_cite_number_off_block)) { type["obj_cite_number_status_multi_obj"] = TriState.on; debug(ocnoff) { - tell_l("fuchsia", line); + writeln(line); } } if (matchFirst(line, rgx.obj_cite_number_off_block_dh)) { type["obj_cite_number_status_multi_obj"] = TriState.closing; debug(ocnoff) { - tell_l("fuchsia", line); + writeln(line); } } } else { @@ -938,7 +931,7 @@ auto check_obj_cite_number_status(char[] line, ref int[string] type) { type["obj_cite_number_status_multi_obj"] = TriState.off; type["obj_cite_number_status"] = TriState.off; debug(ocnoff) { - tell_l("green", line); + writeln(line); } } } @@ -1130,28 +1123,28 @@ auto code_block( if (type["curly_code"] == TriState.on) { if (matchFirst(line, rgx.block_curly_code_close)) { debug(code) { // code (curly) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["code"] = TriState.closing; type["curly_code"] = TriState.off; } else { debug(code) { // code (curly) line - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // code (curly) line } } else if (type["tic_code"] == TriState.on) { if (matchFirst(line, rgx.block_tic_close)) { debug(code) { // code (tic) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["code"] = TriState.closing; type["tic_code"] = TriState.off; } else { debug(code) { // code (tic) line - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // code (tic) line } @@ -1579,28 +1572,28 @@ auto group_block( if (type["curly_group"] == State.on) { if (matchFirst(line, rgx.block_curly_group_close)) { debug(group) { // group (curly) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["group"] = TriState.closing; type["curly_group"] = TriState.off; } else { debug(group) { // group - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build group array (or string) } } else if (type["tic_group"] == TriState.on) { if (matchFirst(line, rgx.block_tic_close)) { debug(group) { // group (tic) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["group"] = TriState.closing; type["tic_group"] = TriState.off; } else { debug(group) { // group - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build group array (or string) } @@ -1621,28 +1614,28 @@ auto block_block( if (type["curly_block"] == TriState.on) { if (matchFirst(line, rgx.block_curly_block_close)) { debug(block) { // block (curly) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["block"] = TriState.closing; type["curly_block"] = TriState.off; } else { debug(block) { // block - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build block array (or string) } } else if (type["tic_block"] == TriState.on) { if (matchFirst(line, rgx.block_tic_close)) { debug(block) { // block (tic) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["block"] = TriState.closing; type["tic_block"] = TriState.off; } else { debug(block) { // block - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build block array (or string) } @@ -1659,28 +1652,28 @@ auto quote_block(char[] line, ref string[string] an_object, ref int[string] type if (type["curly_quote"] == TriState.on) { if (matchFirst(line, rgx.block_curly_quote_close)) { debug(quote) { // quote (curly) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["quote"] = TriState.closing; type["curly_quote"] = TriState.off; } else { debug(quote) { // quote - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build quote array (or string) } } else if (type["tic_quote"] == TriState.on) { if (matchFirst(line, rgx.block_tic_close)) { debug(quote) { // quote (tic) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["quote"] = TriState.closing; type["tic_quote"] = TriState.off; } else { debug(quote) { // quote - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build quote array (or string) } @@ -1697,28 +1690,28 @@ auto table_block(char[] line, ref string[string] an_object, ref int[string] type if (type["curly_table"] == TriState.on) { if (matchFirst(line, rgx.block_curly_table_close)) { debug(table) { // table (curly) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["table"] = TriState.closing; type["curly_table"] = TriState.off; } else { debug(table) { // table - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build table array (or string) } } else if (type["tic_table"] == TriState.on) { if (matchFirst(line, rgx.block_tic_close)) { debug(table) { // table (tic) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["table"] = TriState.closing; type["tic_table"] = TriState.off; } else { debug(table) { // table - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build table array (or string) } @@ -2287,7 +2280,7 @@ auto heading_matched( debug(heading) { // heading // writeln(m.captures[1], " ", m.captures[2], "\n"); // figure inclusion of post capture text // writeln(m.hit, "\n"); - tell_l("yellow", strip(line)); + writeln(strip(line)); } } } @@ -2311,7 +2304,7 @@ auto para_match( // (fl ag_type["heading"] = true) && if (auto m = matchFirst(line, rgx.para_indent)) { debug(paraindent) { // para indent - tell_l("blue", line); + writeln(line); } type["para"] = State.on; an_object["obj"] ~= line ~= "\n"; @@ -2320,7 +2313,7 @@ auto para_match( bullet = false; } else if (matchFirst(line, rgx.para_bullet)) { debug(parabullet) { // para bullet - tell_l("blue", line); + writeln(line); } type["para"] = State.on; an_object["obj"] ~= line; @@ -2329,7 +2322,7 @@ auto para_match( bullet = true; } else if (auto m = matchFirst(line, rgx.para_indent_hang)) { debug(paraindenthang) { // para indent hang - tell_l("blue", line); + writeln(line); } type["para"] = State.on; an_object["obj"] ~= line; @@ -2338,7 +2331,7 @@ auto para_match( bullet = false; } else if (auto m = matchFirst(line, rgx.para_bullet_indent)) { debug(parabulletindent) { // para bullet indent - tell_l("blue", line); + writeln(line); } type["para"] = State.on; an_object["obj"] ~= line; |