aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_in/read_source_files.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2024-03-12 22:39:09 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2024-03-12 22:56:34 -0400
commite9e17be24eba558c30fcdc41ea5bb9a1da7fd4e7 (patch)
tree1ed3c4b528b0a8e54d0eb9babc391e562578c7b4 /src/doc_reform/io_in/read_source_files.d
parentnix flake & env upkeep (diff)
mark modules as @safe: (& identify what is not)
Diffstat (limited to 'src/doc_reform/io_in/read_source_files.d')
-rw-r--r--src/doc_reform/io_in/read_source_files.d21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/doc_reform/io_in/read_source_files.d b/src/doc_reform/io_in/read_source_files.d
index 36de9f3..73785c0 100644
--- a/src/doc_reform/io_in/read_source_files.d
+++ b/src/doc_reform/io_in/read_source_files.d
@@ -53,6 +53,7 @@
- if master file scan for addional files to import/insert
+/
module doc_reform.io_in.read_source_files;
+@safe:
template spineRawMarkupContent() {
import
std.file,
@@ -67,7 +68,7 @@ template spineRawMarkupContent() {
mixin spineRgxFiles;
static auto rgx_files = RgxFiles();
string[] _images=[];
- @safe string[] _extract_images(S)(S content_block) {
+ string[] _extract_images(S)(S content_block) {
string[] images_;
string _content_block = content_block.to!string;
if (auto m = _content_block.matchAll(rgx.image)) {
@@ -87,19 +88,19 @@ template spineRawMarkupContent() {
string[], "insert_files",
string[], "images"
);
- @safe auto spineRawMarkupContent(O,Fn)(O _opt_action, Fn fn_src) {
+ auto spineRawMarkupContent(O,Fn)(O _opt_action, Fn fn_src) {
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;
}
struct RawMarkupContent {
- @safe final sourceContent(in string fn_src) {
+ final sourceContent(in string fn_src) {
auto raw = MarkupRawUnit();
string source_txt_str
= raw.markupSourceReadIn(fn_src);
return source_txt_str;
}
- @safe final auto sourceContentSplitIntoHeaderAndBody(O)(
+ final auto sourceContentSplitIntoHeaderAndBody(O)(
O _opt_action,
in string source_txt_str,
in string fn_src=""
@@ -136,7 +137,7 @@ template spineRawMarkupContent() {
}
struct MarkupRawUnit {
import std.file;
- @safe final private string readInMarkupSource(in char[] fn_src) {
+ final private string readInMarkupSource(in char[] fn_src) {
enforce(
exists(fn_src) != 0,
"file not found: «" ~
@@ -177,7 +178,7 @@ template spineRawMarkupContent() {
= (cast(char[]) src_text).split(rgx.newline_eol_strip_preceding);
return source_line_arr;
}
- @safe string markupSourceReadIn(in string fn_src) {
+ string markupSourceReadIn(in string fn_src) {
static auto rgx_files = RgxFiles();
enforce(
fn_src.match(rgx_files.src_pth_sst_or_ssm),
@@ -187,7 +188,7 @@ template spineRawMarkupContent() {
string source_txt_str = readInMarkupSource(fn_src);
return source_txt_str;
}
- @safe HeaderContentInsertsImages markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) {
+ HeaderContentInsertsImages markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) {
string[] file_insert_list = [];
string[] images_list = [];
char[][] hc = header0Content1(source_txt_str);
@@ -202,7 +203,7 @@ template spineRawMarkupContent() {
);
return t;
}
- @safe final char[][] getInsertMarkupSourceContentRawLineArray(
+ final char[][] getInsertMarkupSourceContentRawLineArray(
in char[] fn_src_insert,
Regex!(char) rgx_file
) {
@@ -221,7 +222,7 @@ template spineRawMarkupContent() {
char[][], "insert_contents",
string[], "images"
);
- @safe ContentsAndImages scan_subdoc_source(O)(
+ ContentsAndImages scan_subdoc_source(O)(
O _opt_action,
char[][] markup_sourcefile_insert_content,
string fn_src
@@ -294,7 +295,7 @@ template spineRawMarkupContent() {
);
return t;
}
- @safe ContentsInsertsImages scan_master_src_for_insert_files_and_import_content(O)(
+ ContentsInsertsImages scan_master_src_for_insert_files_and_import_content(O)(
O _opt_action,
char[][] sourcefile_body_content,
string fn_src