aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/source
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-05-14 11:35:24 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2019-08-19 14:42:43 -0400
commit24c9ed3645178a6ee2abbd9201fa4643dba068e2 (patch)
tree37cd2dbe489d8ab850fd814cdec63004c9a3150c /src/doc_reform/source
parentdoc_abstraction reduce use of return ref, check (diff)
review, reduce use of auto
Diffstat (limited to 'src/doc_reform/source')
-rw-r--r--src/doc_reform/source/read_config_files.d26
-rw-r--r--src/doc_reform/source/read_source_files.d6
2 files changed, 16 insertions, 16 deletions
diff --git a/src/doc_reform/source/read_config_files.d b/src/doc_reform/source/read_config_files.d
index fc5ce2f..dbcda7c 100644
--- a/src/doc_reform/source/read_config_files.d
+++ b/src/doc_reform/source/read_config_files.d
@@ -13,7 +13,7 @@ static template configReadInSiteTOML() {
final string configReadInSiteTOML(M,E)(M manifest, E env) {
auto conf_file_details = ConfigFilePaths!()(manifest, env);
string conf_toml = conf_file_details.config_filename_site_toml;
- auto possible_config_path_locations = conf_file_details.possible_config_path_locations.config_local_site;
+ string[] possible_config_path_locations = conf_file_details.possible_config_path_locations.config_local_site;
string config_file_str;
debug(io) {
writeln("WARNING (io debug) in config filename: ", conf_toml);
@@ -48,7 +48,7 @@ static template configReadInDocTOML() {
final string configReadInDocTOML(M,E)(M manifest, E env) {
auto conf_file_details = ConfigFilePaths!()(manifest, env);
string conf_toml = conf_file_details.config_filename_document_toml;
- auto possible_config_path_locations = conf_file_details.possible_config_path_locations.sisu_document_make;
+ string[] possible_config_path_locations = conf_file_details.possible_config_path_locations.sisu_document_make;
string config_file_str;
debug(io) {
writeln("WARNING (io debug) in config filename: ", conf_toml);
@@ -81,7 +81,7 @@ static template configTOML() {
doc_reform.source.paths_source,
std.file,
std.path;
- auto configTOML(string configuration, string conf_toml_filename) {
+ TOMLDocument configTOML(string configuration, string conf_toml_filename) {
TOMLDocument _toml_conf;
try {
_toml_conf = parseTOML(configuration); // parseTOML(cast(string)(configuration));
@@ -102,10 +102,10 @@ static template readConfigSite() {
string config_file_str;
string conf_filename = "NONE";
auto _conf_file_details = ConfigFilePaths!()(_manifest, _env);
- auto possible_config_path_locations = _conf_file_details.possible_config_path_locations.config_local_site;
+ string[] possible_config_path_locations = _conf_file_details.possible_config_path_locations.config_local_site;
foreach(conf_fn; [_conf_file_details.config_filename_site_toml]) {
foreach(pth; possible_config_path_locations) {
- auto conf_file = asNormalizedPath(chainPath(pth.to!string, conf_fn)).array;
+ char[] conf_file = asNormalizedPath(chainPath(pth.to!string, conf_fn)).array;
conf_filename = conf_fn;
if (config_file_str.length > 0) {
// conf_filename = conf_fn;
@@ -132,7 +132,7 @@ static template readConfigSite() {
string filetype() {
return conf_filename.extension.chompPrefix(".");
}
- auto content() {
+ string content() {
return config_file_str;
}
}
@@ -149,7 +149,7 @@ static template readConfigDoc() {
string config_file_str;
string conf_filename = "NONE";
auto _conf_file_details = ConfigFilePaths!()(_manifest, _env);
- auto possible_config_path_locations = _conf_file_details.possible_config_path_locations.sisu_document_make;
+ string[] possible_config_path_locations = _conf_file_details.possible_config_path_locations.sisu_document_make;
foreach(conf_fn; [_conf_file_details.config_filename_document_toml]) {
foreach(pth; possible_config_path_locations) {
auto conf_file = asNormalizedPath(chainPath(pth.to!string, conf_fn)).array;
@@ -193,11 +193,11 @@ static template configReadSiteTOML() {
std.file,
std.path;
import toml;
- final auto configReadSiteTOML(M,E)(M _manifest, E _env) {
- auto _configuration = configReadInSiteTOML!()(_manifest, _env);
+ final TOMLDocument configReadSiteTOML(M,E)(M _manifest, E _env) {
+ string _configuration = configReadInSiteTOML!()(_manifest, _env);
auto _conf_file_details = ConfigFilePaths!()(_manifest, _env);
string _conf_toml = _conf_file_details.config_filename_site_toml;
- auto _toml_conf = configTOML!()(_configuration, _conf_toml);
+ TOMLDocument _toml_conf = configTOML!()(_configuration, _conf_toml);
return _toml_conf;
}
}
@@ -208,11 +208,11 @@ static template configReadDocTOML() {
std.file,
std.path;
import toml;
- final auto configReadDocTOML(M,E)(M _manifest, E _env) {
- auto _configuration = configReadInDocTOML!()(_manifest, _env);
+ final TOMLDocument configReadDocTOML(M,E)(M _manifest, E _env) {
+ string _configuration = configReadInDocTOML!()(_manifest, _env);
auto _conf_file_details = ConfigFilePaths!()(_manifest, _env);
string _conf_toml = _conf_file_details.config_filename_document_toml;
- auto _toml_conf = configTOML!()(_configuration, _conf_toml);
+ TOMLDocument _toml_conf = configTOML!()(_configuration, _conf_toml);
return _toml_conf;
}
}
diff --git a/src/doc_reform/source/read_source_files.d b/src/doc_reform/source/read_source_files.d
index 5c1e6fb..0bd7b8c 100644
--- a/src/doc_reform/source/read_source_files.d
+++ b/src/doc_reform/source/read_source_files.d
@@ -17,7 +17,7 @@ static template DocReformRawMarkupContent() {
string[] _images=[];
auto _extract_images(S)(S content_block) {
string[] images_;
- auto _content_block = content_block.to!string;
+ string _content_block = content_block.to!string;
if (auto m = _content_block.matchAll(rgx.image)) {
images_ ~= m.captures[1].to!string;
}
@@ -159,7 +159,7 @@ static template DocReformRawMarkupContent() {
) {
mixin DocReformRgxInitFlags;
char[][] contents_insert;
- auto type1 = flags_type_init;
+ int[string] type1 = flags_type_init;
auto fn_pth_full = fn_src.match(rgx.src_pth_sst_or_ssm);
auto markup_src_file_path = fn_pth_full.captures[1];
foreach (line; markup_sourcefile_insert_content) {
@@ -245,7 +245,7 @@ static template DocReformRawMarkupContent() {
import std.algorithm;
mixin DocReformRgxInitFlags;
char[][] contents;
- auto type = flags_type_init;
+ int[string] type = flags_type_init;
auto fn_pth_full = fn_src.match(rgx.src_pth_sst_or_ssm);
auto markup_src_file_path = fn_pth_full.captures[1];
char[][] contents_insert;