diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2019-05-14 11:35:24 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2019-08-19 14:42:43 -0400 |
commit | 24c9ed3645178a6ee2abbd9201fa4643dba068e2 (patch) | |
tree | 37cd2dbe489d8ab850fd814cdec63004c9a3150c /src/doc_reform/meta/conf_make_meta_structs.d | |
parent | doc_abstraction reduce use of return ref, check (diff) |
review, reduce use of auto
Diffstat (limited to 'src/doc_reform/meta/conf_make_meta_structs.d')
-rw-r--r-- | src/doc_reform/meta/conf_make_meta_structs.d | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/doc_reform/meta/conf_make_meta_structs.d b/src/doc_reform/meta/conf_make_meta_structs.d index e7b9a5b..e214565 100644 --- a/src/doc_reform/meta/conf_make_meta_structs.d +++ b/src/doc_reform/meta/conf_make_meta_structs.d @@ -16,8 +16,8 @@ mixin DocReformRgxInit; static auto _rgx = Rgx(); mixin InternalMarkup; auto _mkup = InlineMarkup(); -auto url_markup(string line) { - auto line_ = line +string url_markup(string line) { + string line_ = line .replaceAll( _rgx.smid_inline_link_markup_regular, ("$1" @@ -58,30 +58,30 @@ struct ConfCompositeMakeStr { string texpdf_font; } struct confCompositeMakeBuild { - auto bold(string _mk) { + string[] bold(string _mk) { string[] _out; if (_mk) { _out = [ (cast(string) (`(` ~ _mk.dup ~ `)`)), "*{$1}*", "<b>$1</b>"]; } return _out; } - auto breaks(string _mk) { + string breaks(string _mk) { return _mk; } - auto cover_image(string _mk) { + string cover_image(string _mk) { return _mk; } - auto css(string _mk) { + string css(string _mk) { return _mk; } - auto emphasis(string _mk) { + string[] emphasis(string _mk) { string[] _out; if (_mk) { _out = [ (cast(string) (`(` ~ _mk.dup ~ `)`)), "!{$1}!", "<em>$1</em>" ]; } return _out; } - auto footer(string[] _mk) { + string[] footer(string[] _mk) { string line_; string[] _mk2; foreach (line; _mk) { @@ -89,35 +89,35 @@ struct confCompositeMakeBuild { } return _mk2; } - auto headings(string[] _mk) { + string[] headings(string[] _mk) { return _mk; } - auto home_button_image(string[] _mk) { + string[] home_button_image(string[] _mk) { return _mk; } - auto home_button_text(string _mk) { + string home_button_text(string _mk) { return url_markup(_mk); } - auto italics(string _mk) { + string[] italics(string _mk) { string[] _out; if (_mk) { _out = [ (cast(string) (`(` ~ _mk.dup ~ `)`)), "/{$1}/", "<i>$1</i>" ]; } return _out; } - auto auto_num_top_at_level(string _mk) { + string auto_num_top_at_level(string _mk) { return _mk; } - auto auto_num_top_lv(int _mk) { + int auto_num_top_lv(int _mk) { return _mk; } - auto auto_num_depth(int _mk) { + int auto_num_depth(int _mk) { return _mk; } - auto substitute(string[][] _mk) { + string[][] substitute(string[][] _mk) { return _mk; } - auto texpdf_font(string _mk) { + string texpdf_font(string _mk) { return _mk; } } @@ -235,7 +235,7 @@ struct ConfCompositePlus { ConfCompositeMakeStr make_str; ConfCompositeSiteLocal conf; } -static auto ptr_head_main +static string[] ptr_head_main = [ "classify", "creator", @@ -248,7 +248,7 @@ static auto ptr_head_main "rights", "title" ]; -static auto ptr_head_sub_classify +static string[] ptr_head_sub_classify = [ "dewey", "keywords", @@ -256,7 +256,7 @@ static auto ptr_head_sub_classify "subject", "topic_register" ]; -static auto ptr_head_sub_creator +static string[] ptr_head_sub_creator = [ "author", "author_email", @@ -264,7 +264,7 @@ static auto ptr_head_sub_creator "illustrator", "translator" ]; -static auto ptr_head_sub_date +static string[] ptr_head_sub_date = [ "added_to_site", "available", @@ -274,14 +274,14 @@ static auto ptr_head_sub_date "published", "valid" ]; -static auto ptr_head_sub_identifier +static string[] ptr_head_sub_identifier = [ "isbn", "oclc", "pg" ]; /+ make +/ -static auto ptr_head_sub_make +static string[] ptr_head_sub_make = [ "cover_image", "home_button_image", @@ -296,27 +296,27 @@ static auto ptr_head_sub_make "texpdf_font", "css" ]; -static auto ptr_head_sub_notes +static string[] ptr_head_sub_notes = [ "abstract", "description" ]; -static auto ptr_head_sub_original +static string[] ptr_head_sub_original = [ "language", "source", "title" ]; -static auto ptr_head_sub_publisher +static string[] ptr_head_sub_publisher = [ "name" ]; -static auto ptr_head_sub_rights +static string[] ptr_head_sub_rights = [ "copyright", "cover", "illustrations", "license" ]; -static auto ptr_head_sub_title +static string[] ptr_head_sub_title = [ "edition", "full", @@ -325,5 +325,5 @@ static auto ptr_head_sub_title "note", "sub" ]; -auto config_jsonstr = `{ +JSONValue config_jsonstr = `{ }`; |