aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_in/read_source_files.d
diff options
context:
space:
mode:
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