diff options
Diffstat (limited to 'src/sdp/source')
-rw-r--r-- | src/sdp/source/paths_source.d | 13 | ||||
-rw-r--r-- | src/sdp/source/read_config_files.d | 21 | ||||
-rw-r--r-- | src/sdp/source/read_source_files.d | 9 |
3 files changed, 23 insertions, 20 deletions
diff --git a/src/sdp/source/paths_source.d b/src/sdp/source/paths_source.d index 8d3aefe..5637c80 100644 --- a/src/sdp/source/paths_source.d +++ b/src/sdp/source/paths_source.d @@ -180,6 +180,19 @@ template PathMatters() { } else {_k = "en"; } return _k; } + string doc_uid() { + string _uid; + if (is_pod && !(pod_name.empty)) { + if (pod_name.baseName == filename_base) { + _uid = filename_base ~ "." ~ filename_extension ~ _sep ~ lng; + } else { + _uid = pod_name.baseName ~ _sep ~ filename_base ~ "." ~ filename_extension ~ _sep ~ lng; + } + } else { + _uid = _sep ~ filename_base ~ "." ~ filename_extension ~ _sep ~ lng; + } + return _uid; + } string docname_composite_unique_per_src_doc() { /+ z pod name if any + src filename + lng code diff --git a/src/sdp/source/read_config_files.d b/src/sdp/source/read_config_files.d index 9d976a5..56ba065 100644 --- a/src/sdp/source/read_config_files.d +++ b/src/sdp/source/read_config_files.d @@ -32,10 +32,8 @@ static template configReadInSiteTOML() { config_file_str = conf_file.readText; break; } - } - catch (ErrnoException ex) { - } - catch (FileException ex) { + } catch (ErrnoException ex) { + } catch (FileException ex) { } } return config_file_str; @@ -69,10 +67,8 @@ static template configReadInDocTOML() { config_file_str = conf_file.readText; break; } - } - catch (ErrnoException ex) { - } - catch (FileException ex) { + } catch (ErrnoException ex) { + } catch (FileException ex) { } } return config_file_str; @@ -89,8 +85,7 @@ static template configTOML() { TOMLDocument _toml_conf; try { _toml_conf = parseTOML(configuration); // parseTOML(cast(string)(configuration)); - } - catch(ErrnoException e) { + } catch(ErrnoException e) { stderr.writeln("Toml problem with content for ", conf_toml_filename); stderr.writeln(e.msg); } @@ -172,10 +167,8 @@ static template readConfigDoc() { config_file_str = conf_file.readText; break; } - } - catch (ErrnoException ex) { - } - catch (FileException ex) { + } catch (ErrnoException ex) { + } catch (FileException ex) { } } if (config_file_str.length > 0) { break; } diff --git a/src/sdp/source/read_source_files.d b/src/sdp/source/read_source_files.d index 28a660a..271adfa 100644 --- a/src/sdp/source/read_source_files.d +++ b/src/sdp/source/read_source_files.d @@ -85,13 +85,10 @@ static template SiSUrawMarkupContent() { } source_txt_str = fn_src.readText; } - } - catch (ErrnoException ex) { - } - catch (UTFException ex) { + } catch (ErrnoException ex) { + } catch (UTFException ex) { // Handle validation errors - } - catch (FileException ex) { + } catch (FileException ex) { // Handle errors } std.utf.validate(source_txt_str); |