From 6b3555e2ae0a7a93f7ab7be1b908a4c15350d460 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 3 Apr 2020 15:13:31 -0400 Subject: sql, sqlite internal site links --- src/doc_reform/meta/conf_make_meta_structs.d | 1 + src/doc_reform/meta/conf_make_meta_yaml.d | 10 +++++++++- src/doc_reform/meta/rgx.d | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src/doc_reform/meta') diff --git a/src/doc_reform/meta/conf_make_meta_structs.d b/src/doc_reform/meta/conf_make_meta_structs.d index 9707dab..3bab7d0 100644 --- a/src/doc_reform/meta/conf_make_meta_structs.d +++ b/src/doc_reform/meta/conf_make_meta_structs.d @@ -147,6 +147,7 @@ struct ConfCompositeSiteLocal { string w_srv_data_domain; // if not set same as webserv_domain string w_srv_data_root_part; string w_srv_data_root_url; + string w_srv_data_root_url_html; string w_srv_data_root_path; string w_srv_images_root_part; // string w_srv_url_doc_path; diff --git a/src/doc_reform/meta/conf_make_meta_yaml.d b/src/doc_reform/meta/conf_make_meta_yaml.d index 1b5ec70..c33b04a 100644 --- a/src/doc_reform/meta/conf_make_meta_yaml.d +++ b/src/doc_reform/meta/conf_make_meta_yaml.d @@ -243,9 +243,17 @@ template contentYAMLtoSpineStruct() { && _yaml["webserv"]["data_root_url"].type.string && _yaml["webserv"]["data_root_url"].tag.match(rgx.yaml_tag_is_str) ) { - _struct_composite.conf.w_srv_data_root_url = _yaml["webserv"]["data_root_url"].get!string; + _struct_composite.conf.w_srv_data_root_url = _yaml["webserv"]["data_root_url"].get!string; + _struct_composite.conf.w_srv_data_root_url_html = + _yaml["webserv"]["data_root_url"].get!string ~ "/" + ~ _manifested.src.language ~ "/" + ~ "html"; } else { _struct_composite.conf.w_srv_data_root_url = _struct_composite.conf.w_srv_data_root_part; + _struct_composite.conf.w_srv_data_root_url_html = + _struct_composite.conf.w_srv_data_root_part ~ "/" + ~ _manifested.src.language ~ "/" + ~ "html"; } if ("cgi_domain" in _yaml["webserv"] && _yaml["webserv"]["cgi_domain"].type.string diff --git a/src/doc_reform/meta/rgx.d b/src/doc_reform/meta/rgx.d index 94ef091..d4dd201 100644 --- a/src/doc_reform/meta/rgx.d +++ b/src/doc_reform/meta/rgx.d @@ -215,9 +215,10 @@ static template spineRgxIn() { static inline_link = ctRegex!(`┥(?P.+?)┝┤(?P#?(\S+?))├`, "mg"); static inline_link_empty = ctRegex!(`┥(?P.+?)┝┤├`, "mg"); static inline_link_number = ctRegex!(`┥(?P.+?)┝┤(?P[0-9]+)├`, "mg"); // not used - static inline_link_number_only = ctRegex!(`(┥.+?┝)┤(?P[0-9]+)├`, "mg"); + static inline_link_number_only = ctRegex!(`(?P┥.+?┝)┤(?P[0-9]+)├`, "mg"); static inline_link_stow_uri = ctRegex!(`┥(?P.+?)┝┤(?P[^ 0-9#┥┝┤├][^ 0-9┥┝┤├]+)├`, "mg"); // will not stow (stowed links) or object number internal links static inline_link_hash = ctRegex!(`┥(?P.+?)┝┤(?P#(?P\S+?))├`, "mg"); + static inline_link_seg_and_hash = ctRegex!(`┥(?P.+?)┝┤(?P[^/]+?#(?P.+?))├`, "mg"); static inline_link_clean = ctRegex!(`┤(?:.+?)├|[┥┝]`, "mg"); static inline_link_toc_to_backmatter = ctRegex!(`┤#(?Pendnotes|bibliography|bookindex|glossary|blurb)├`, "mg"); static url = ctRegex!(`https?://`, "mg"); -- cgit v1.2.3