aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/in_source_files.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-12-05 11:41:09 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2020-01-13 16:06:43 -0500
commit9a91485c10e059dee1374e152e4b068cd9d3866c (patch)
tree4eaa00d4e7e8fb5d576142d364657d5b67d3b766 /org/in_source_files.org
parentyaml config, provide default if not read (diff)
0.9.2 @safe & @trusted first pass
Diffstat (limited to 'org/in_source_files.org')
-rw-r--r--org/in_source_files.org16
1 files changed, 10 insertions, 6 deletions
diff --git a/org/in_source_files.org b/org/in_source_files.org
index 4c61ecc..907820c 100644
--- a/org/in_source_files.org
+++ b/org/in_source_files.org
@@ -267,7 +267,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)) {
@@ -276,7 +276,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;
@@ -288,7 +288,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;
@@ -402,7 +406,7 @@ split is on first match of level A~ (which is required)
#+name: meta_markup_source_raw_doc_header_and_content_split
#+BEGIN_SRC d
-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);
@@ -421,7 +425,7 @@ final private char[][] header0Content1(in string src_text) {
#+name: meta_markup_source_raw_source_line_array
#+BEGIN_SRC d
-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;
@@ -457,7 +461,7 @@ auto markupSourceReadIn(in string fn_src) {
#+name: meta_markup_source_raw_tuple_of_header_and_body
#+BEGIN_SRC d
-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);