From e973365c4b74be2b2cff9be970ccba5928dbe368 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 22 May 2019 10:50:33 -0400 Subject: 0.7.3 start to look at document harvest (initial stub) --- src/doc_reform/meta/rgx.d | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/doc_reform/meta/rgx.d') diff --git a/src/doc_reform/meta/rgx.d b/src/doc_reform/meta/rgx.d index 373400f..544b432 100644 --- a/src/doc_reform/meta/rgx.d +++ b/src/doc_reform/meta/rgx.d @@ -7,6 +7,7 @@ static template DocReformRgxInit() { static struct Rgx { /+ misc +/ static true_dollar = ctRegex!(`\$`, "gm"); + static sep = ctRegex!(`␣`, "gm"); static flag_action = ctRegex!(`^(--[a-z][a-z0-9-]+)$`); static flag_action_str = ctRegex!(` (--[a-z][a-z0-9-]+)`); static within_quotes = ctRegex!(`"(.+?)"`, "m"); @@ -43,7 +44,7 @@ static template DocReformRgxInit() { /+ header +/ static variable_doc_title = ctRegex!(`@title`); static variable_doc_author = ctRegex!(`@author|@creator`); - static raw_author_munge = ctRegex!(`(\S.+?),\s+(.+)`,"i"); + static raw_author_munge = ctRegex!(`(?P\S.+?),\s+(?P.+)`,"i"); static toml_header_meta_title = ctRegex!(`^\s*(title\s*=\s*"|\[title\])`, "m"); /+ heading & paragraph operators +/ static heading_a = ctRegex!(`^:?[A][~] `, "m"); @@ -191,6 +192,10 @@ static template DocReformRgxInit() { static bi_main_term_plus_rest_split = ctRegex!(`\s*:\s*`); static bi_sub_terms_plus_object_number_offset_split = ctRegex!(`\s*\|\s*`); static bi_term_and_object_numbers_match = ctRegex!(`^(.+?)\+(\d+)`); + static topic_register_main_terms_split = ctRegex!(`\s*;\s*`); + static topic_register_main_term_plus_rest_split = ctRegex!(`\s*:\s*`); + static topic_register_sub_terms_split = ctRegex!(`\s*\|\s*`); + static topic_register_multiple_sub_terms_split = ctRegex!(`␣([^|␣]+(?:\|[^|␣]+)+)`); /+ language codes +/ auto language_codes = ctRegex!("(am|bg|bn|br|ca|cs|cy|da|de|el|en|eo|es|et|eu|fi|fr|ga|gl|he|hi|hr|hy|ia|is|it|ja|ko|la|lo|lt|lv|ml|mr|nl|no|nn|oc|pl|pt|pt_BR|ro|ru|sa|se|sk|sl|sq|sr|sv|ta|te|th|tk|tr|uk|ur|vi|zh)"); -- cgit v1.2.3