From 9a91485c10e059dee1374e152e4b068cd9d3866c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 5 Dec 2019 11:41:09 -0500 Subject: 0.9.2 @safe & @trusted first pass --- src/doc_reform/io_in/read_source_files.d | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/doc_reform/io_in') diff --git a/src/doc_reform/io_in/read_source_files.d b/src/doc_reform/io_in/read_source_files.d index e443b01..aeb2382 100644 --- a/src/doc_reform/io_in/read_source_files.d +++ b/src/doc_reform/io_in/read_source_files.d @@ -15,7 +15,7 @@ static template spineRawMarkupContent() { mixin spineRgxInit; static auto rgx = Rgx(); string[] _images=[]; - auto _extract_images(S)(S content_block) { + auto _extract_images(S)(S content_block) @safe { string[] images_; string _content_block = content_block.to!string; if (auto m = _content_block.matchAll(rgx.image)) { @@ -24,7 +24,7 @@ static template spineRawMarkupContent() { return images_; } auto rawsrc = RawMarkupContent(); - auto spineRawMarkupContent(O,Fn)(O _opt_action, Fn fn_src) { + auto spineRawMarkupContent(O,Fn)(O _opt_action, Fn fn_src) @safe { auto _0_header_1_body_content_2_insert_filelist_tuple = rawsrc.sourceContentSplitIntoHeaderAndBody(_opt_action, rawsrc.sourceContent(fn_src), fn_src); return _0_header_1_body_content_2_insert_filelist_tuple; @@ -36,7 +36,11 @@ static template spineRawMarkupContent() { = raw.markupSourceReadIn(fn_src); return source_txt_str; } - final auto sourceContentSplitIntoHeaderAndBody(O)(O _opt_action, in string source_txt_str, in string fn_src="") { + final auto sourceContentSplitIntoHeaderAndBody(O)( + O _opt_action, + in string source_txt_str, + in string fn_src="" + ) { auto raw = MarkupRawUnit(); string[] insert_file_list; string[] images_list; @@ -99,7 +103,7 @@ static template spineRawMarkupContent() { std.utf.validate(source_txt_str); return source_txt_str; } - final private char[][] header0Content1(in string src_text) { + final private char[][] header0Content1(in string src_text) @trusted { // cast(char[]) /+ split string on _first_ match of "^:?A~\s" into [header, content] array/tuple +/ char[][] header_and_content; auto m = (cast(char[]) src_text).matchFirst(rgx.heading_a); @@ -112,7 +116,7 @@ static template spineRawMarkupContent() { ); return header_and_content; } - final private char[][] markupSourceLineArray(in char[] src_text) { + final private char[][] markupSourceLineArray(in char[] src_text) @trusted { // cast(char[]) char[][] source_line_arr = (cast(char[]) src_text).split(rgx.newline_eol_strip_preceding); return source_line_arr; @@ -127,7 +131,7 @@ static template spineRawMarkupContent() { auto source_txt_str = readInMarkupSource(fn_src); return source_txt_str; } - auto markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) { + auto markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) @safe { string[] file_insert_list = []; string[] images_list = []; char[][] hc = header0Content1(source_txt_str); -- cgit v1.2.3