diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2019-12-17 13:22:51 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2020-01-13 16:06:43 -0500 |
commit | 9c42b4567f35aceacce1298a6d4789d6789e5bfe (patch) | |
tree | 90d698066a2f895a152bb942ecdeed5faeff50af /src/doc_reform/io_in | |
parent | present per document metadata (diff) |
specify Tuple content for read in files, remove traits.std
Diffstat (limited to 'src/doc_reform/io_in')
-rw-r--r-- | src/doc_reform/io_in/read_source_files.d | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/doc_reform/io_in/read_source_files.d b/src/doc_reform/io_in/read_source_files.d index 933868b..bf8702b 100644 --- a/src/doc_reform/io_in/read_source_files.d +++ b/src/doc_reform/io_in/read_source_files.d @@ -44,23 +44,21 @@ static template spineRawMarkupContent() { auto raw = MarkupRawUnit(); string[] insert_file_list; string[] images_list; - auto t + Tuple!(char[], char[][], string[], string[]) t = raw.markupSourceHeaderContentRawLineTupleArray(source_txt_str); auto header_raw = t[0]; auto sourcefile_body_content = t[1]; if (fn_src.match(rgx.src_fn_master)) { // filename with path needed if master file (.ssm) not otherwise auto ins = Inserts(); - auto tu + Tuple!(char[][], string[], string[]) tu = ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); - static assert(!isTypeTuple!(tu)); sourcefile_body_content = tu[0]; insert_file_list = tu[1].dup; images_list = tu[2].dup; } else if (_opt_action.source || _opt_action.pod) { auto ins = Inserts(); - auto tu + Tuple!(char[][], string[], string[]) tu = ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); - static assert(!isTypeTuple!(tu)); images_list = tu[2].dup; } string header_type = ""; @@ -127,14 +125,14 @@ static template spineRawMarkupContent() { auto source_txt_str = readInMarkupSource(fn_src); return source_txt_str; } - auto markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) @safe { + Tuple!(char[], char[][], string[], string[]) markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) @safe { string[] file_insert_list = []; string[] images_list = []; char[][] hc = header0Content1(source_txt_str); char[] header = hc[0]; char[] source_txt = hc[1]; - auto source_line_arr = markupSourceLineArray(source_txt); - auto t = tuple( + char[][] source_line_arr = markupSourceLineArray(source_txt); + Tuple!(char[], char[][], string[], string[]) t = tuple( header, source_line_arr, file_insert_list, @@ -151,8 +149,8 @@ static template spineRawMarkupContent() { "not a dr markup filename: «" ~ fn_src_insert ~ "»" ); - auto source_txt_str = readInMarkupSource(fn_src_insert); - auto source_line_arr = markupSourceLineArray(source_txt_str); + string source_txt_str = readInMarkupSource(fn_src_insert); + char[][] source_line_arr = markupSourceLineArray(source_txt_str); return source_line_arr; } } @@ -236,13 +234,13 @@ static template spineRawMarkupContent() { } } } // end src subdoc (inserts) loop - auto t = tuple( + Tuple!(char[][], string[]) t = tuple( contents_insert, _images ); return t; } - auto scan_master_src_for_insert_files_and_import_content(O)( + Tuple!(char[][], string[], string[]) scan_master_src_for_insert_files_and_import_content(O)( O _opt_action, char[][] sourcefile_body_content, string fn_src @@ -332,7 +330,7 @@ static template spineRawMarkupContent() { writeln(__LINE__); writeln(contents.length); } - auto t = tuple( + Tuple!(char[][], string[], string[]) t = tuple( contents, insert_file_list, images |