diff options
Diffstat (limited to 'src/doc_reform/source/paths_source.d')
-rw-r--r-- | src/doc_reform/source/paths_source.d | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/doc_reform/source/paths_source.d b/src/doc_reform/source/paths_source.d index 4b4abf7..6efca00 100644 --- a/src/doc_reform/source/paths_source.d +++ b/src/doc_reform/source/paths_source.d @@ -10,7 +10,9 @@ import std.array, std.regex, std.stdio, std.conv : to; -import doc_reform.meta.rgx; +import + doc_reform.meta.defaults, + doc_reform.meta.rgx; template PodManifest() { mixin DocReformRgxInit; static auto rgx = Rgx(); @@ -60,7 +62,9 @@ template PodManifest() { } template PathMatters() { mixin DocReformRgxInit; - static auto rgx = Rgx(); + mixin InternalMarkup; + static auto rgx = Rgx(); + static auto mkup = InlineMarkup(); auto PathMatters(O,E)( O _opt_actions, E _env, @@ -153,7 +157,6 @@ template PathMatters() { string _fns = _fns; // required here by dmd & not by ldc (for D:2078) auto _opt_actions = _opt_actions; auto _env = _env; - string _sep = "␣"; struct SRC_ { bool is_pod() { return (_manifest.pod_manifest_path.length > 0) ? true : false; @@ -187,12 +190,12 @@ template PathMatters() { string _uid; if (is_pod && !(pod_name_with_path.empty)) { if (pod_name_with_path.baseName == filename_base) { - _uid = filename_base ~ "." ~ filename_extension ~ _sep ~ lng; + _uid = filename_base ~ "." ~ filename_extension ~ mkup.sep ~ lng; } else { - _uid = pod_name_with_path.baseName ~ _sep ~ filename_base ~ "." ~ filename_extension ~ _sep ~ lng; + _uid = pod_name_with_path.baseName ~ mkup.sep ~ filename_base ~ "." ~ filename_extension ~ mkup.sep ~ lng; } } else { - _uid = _sep ~ filename_base ~ "." ~ filename_extension ~ _sep ~ lng; + _uid = mkup.sep ~ filename_base ~ "." ~ filename_extension ~ mkup.sep ~ lng; } return _uid; } @@ -206,18 +209,18 @@ template PathMatters() { +/ string _fn; if (pod_name_with_path.baseName == filename_base) { - _fn = filename_base ~ _sep ~ filename_extension ~ _sep ~ lng; + _fn = filename_base ~ mkup.sep ~ filename_extension ~ mkup.sep ~ lng; } else if (!(pod_name_with_path.empty)) { - _fn = pod_name_with_path.baseName ~ _sep ~ filename_base ~ _sep ~ filename_extension ~ _sep ~ lng; + _fn = pod_name_with_path.baseName ~ mkup.sep ~ filename_base ~ mkup.sep ~ filename_extension ~ mkup.sep ~ lng; } else { - _fn = "_" ~ _sep ~ filename_base ~ _sep ~ filename_extension ~ _sep ~ lng; + _fn = "_" ~ mkup.sep ~ filename_base ~ mkup.sep ~ filename_extension ~ mkup.sep ~ lng; } return _fn; } string docname_composite_unique_per_src_pod() { /+ z pod name if any + src filename (without lng code) - filename ~ _sep ~ lng + filename ~ mkup.sep ~ lng * unique per src pod used by - pod (multilingual collection) @@ -225,11 +228,11 @@ template PathMatters() { +/ string _fn; if (pod_name_with_path.baseName == filename_base) { - _fn = filename_base ~ _sep ~ filename_extension; + _fn = filename_base ~ mkup.sep ~ filename_extension; } else if (!(pod_name_with_path.empty)) { - _fn = pod_name_with_path.baseName ~ _sep ~ filename_base ~ _sep ~ filename_extension; + _fn = pod_name_with_path.baseName ~ mkup.sep ~ filename_base ~ mkup.sep ~ filename_extension; } else { - _fn = "_" ~ _sep ~ filename_base ~ _sep ~ filename_extension; + _fn = "_" ~ mkup.sep ~ filename_base ~ mkup.sep ~ filename_extension; } return _fn; } |