From 1c73ddf3894085c646b55d63e61a2483e03a3b4d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 9 Feb 2018 22:03:10 -0500 Subject: 0.24.0 toml or sdlang for configuration --- src/sdp/meta/rgx.d | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/sdp/meta/rgx.d') diff --git a/src/sdp/meta/rgx.d b/src/sdp/meta/rgx.d index fe9e36d..35d6970 100644 --- a/src/sdp/meta/rgx.d +++ b/src/sdp/meta/rgx.d @@ -53,6 +53,8 @@ static template SiSUrgxInit() { static variable_doc_title = ctRegex!(`@title`); static variable_doc_author = ctRegex!(`@author|@creator`); static raw_author_munge = ctRegex!(`(\S.+?),\s+(.+)`,"i"); + static sdlang_header_meta_title = ctRegex!(`^\s*title\s+["\\]`, "m"); + static toml_header_meta_title = ctRegex!(`^\s*(title\s*=\s*"|\[title\])`, "m"); /+ head +/ static native_subhead_creator = ctRegex!(`^(?:author|translator|illustrator)$`, "m"); static native_subhead_title = ctRegex!(`^(?:main|sub(?:title)?|full|language|edition|note)$`, "m"); @@ -171,6 +173,7 @@ static template SiSUrgxInit() { static break_page_line_across = ctRegex!(`^=[.]{2}=$`); static break_string = ctRegex!(`』`); static parent = ctRegex!(`([0-7]):([0-9]+)`); + static header_regex_content = ctRegex!(`([0-7]):([0-9]+)`); /+ json +/ static tailing_comma = ctRegex!(`,$`, "m"); /+ biblio tags +/ @@ -197,7 +200,9 @@ static template SiSUrgxInit() { static nbsp_and_space = ctRegex!(` [ ]`, "mg"); static nbsp_char_and_space = ctRegex!(`░[ ]`, "mg"); static src_pth_sst_or_ssm = ctRegex!(`^(?P[/]?(?:[a-zA-Z0-9._-]+/)*)(?P[a-zA-Z0-9._-]+[.]ss[tm])$`); + static src_pth_pod_sst_or_ssm = ctRegex!(`^(?P[/]?(?:[a-zA-Z0-9._-]+/)*)media/text/[a-z]{2}/(?P[a-zA-Z0-9._-]+[.]ss[tm])$`); static src_pth_contents = ctRegex!(`^(?P[/]?(?:[a-zA-Z0-9._-]+/)*)(?P[a-zA-Z0-9._-]+)/sisupod[.]manifest$`); + static src_pth_pod_root = ctRegex!(`^(?P(?:[/]?(?:[a-zA-Z0-9._-]+/)*)(sisupod))$`); static src_pth_zip = ctRegex!(`^(?P[/]?(?:[a-zA-Z0-9._-]+/)*)(?P[a-zA-Z0-9._-]+[.]zip)$`); static src_pth_unzip_pod = ctRegex!(`^(?Pmedia/text/[a-z]{2}/)*(?P[a-zA-Z0-9._-]+[.]ss[im])$`); static src_pth_types = @@ -212,7 +217,8 @@ static template SiSUrgxInit() { static src_fn_find_inserts = ctRegex!(`^(?P[a-zA-Z0-9._-]+/)*(?P[a-zA-Z0-9._-]+[.]ss[im])$`); static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*(?P[a-zA-Z0-9._-]+/)*(?P[a-zA-Z0-9._-]+[.]ss[ti])$`); static src_base_parent_dir_name = ctRegex!(`[/](?P(?:[a-zA-Z0-9._-]+))(?:/media/text/[a-z]{2})$`); // formalizes dir structure - static src_formalised_file_path_parts = ctRegex!(`(?P(?:[/a-zA-Z0-9._-]+?)(?P[a-zA-Z0-9._-]+))(?:/media/text/[a-z]{2})$`); // formalized dir structure + static src_base_parent_path = ctRegex!(`(?P(?:[/a-zA-Z0-9._-]+))(?:/media/text/[a-z]{2})$`); // formalizes dir structure + static src_formalised_file_path_parts = ctRegex!(`(?P(?:[/a-zA-Z0-9._-]+?)(?P[a-zA-Z0-9._-]+))(?:/media/text/[a-z]{2})$`); // formalizes dir structure /+ inline markup footnotes endnotes +/ static inline_notes_al = ctRegex!(`【(?:[*+]\s+|\s*)(.+?)】`, "mg"); static inline_notes_al_gen = ctRegex!(`【.+?】`, "m"); @@ -258,6 +264,7 @@ static template SiSUrgxInit() { static inline_italics_line = ctRegex!(`^/_ (?P.+?)((?: [\\]{2}|[~]#){0,2}$)`); static inline_underscore_line = ctRegex!(`^__ (?P.+?)((?: [\\]{2}|[~]#){0,2}$)`); static inline_fontface_clean = ctRegex!(`[*!_/^,+#■"-]\{|\}[*!_/^,+#■"-]`, "mg"); + static no_header_rgx = ctRegex!(`^=NULL$`); /+ table delimiters +/ static table_delimiter_col = ctRegex!("[ ]*[┊][ ]*", "mg"); static table_delimiter_row = ctRegex!("[ ]*\n", "mg"); -- cgit v1.2.3