From 0079c34ce7a524d4b93ed56191b5e7cf6a380975 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 1 Nov 2016 10:06:47 -0400 Subject: 0.8.0 the document parts (& org babel tangle) --- src/sdp/ao_rgx.d | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/sdp/ao_rgx.d') diff --git a/src/sdp/ao_rgx.d b/src/sdp/ao_rgx.d index f65abb5..81a06b9 100644 --- a/src/sdp/ao_rgx.d +++ b/src/sdp/ao_rgx.d @@ -15,13 +15,14 @@ template RgxInit() { static book_index_go = ctRegex!("([0-9]+)(?:-[0-9]+)?"); static trailing_comma = ctRegex!(",[ ]*$"); static trailing_linebreak = ctRegex!(",[ ]{1,2}\\\\\\\\\n[ ]{4}$","m"); - static line_delimiter = ctRegex!("\n"); - static line_delimiter_ws_strip = ctRegex!("[ ]*\n[ ]*"); - static line_delimiter_only = ctRegex!("^\n"); - static para_delimiter = ctRegex!("\n[ ]*\n+"); - static levels_markup = ctRegex!(`^[A-D1-4]$`); - static levels_numbered = ctRegex!(`^[0-9]$`); - static levels_numbered_headings = ctRegex!(`^[0-7]$`); + static newline_eol_delimiter = ctRegex!("\n"); + static newline_eol_strip_preceeding = ctRegex!("[ ]*\n"); + static newline_eol_delimiter_only = ctRegex!("^\n"); + static line_delimiter_ws_strip = ctRegex!("[ ]*\n[ ]*"); + static para_delimiter = ctRegex!("\n[ ]*\n+"); + static levels_markup = ctRegex!(`^[A-D1-4]$`); + static levels_numbered = ctRegex!(`^[0-9]$`); + static levels_numbered_headings = ctRegex!(`^[0-7]$`); static src_pth = ctRegex!(`^(?P[a-zA-Z0-9._-]+/)*(?P[a-zA-Z0-9._-]+[.]ss[tm])$`); static src_fn = ctRegex!(`^([a-zA-Z0-9._-]+/)*(?P(?P[a-zA-Z0-9._-]+)[.](?Pss[tm]))$`); @@ -49,7 +50,8 @@ template RgxInit() { // static native_header_sub = ctRegex!(`^[ ]+:([a-z_]+):\s`); static native_header_meta_title = ctRegex!(`^@title:\s`, "m"); static variable_doc_title = ctRegex!(`@title`); - static variable_doc_author = ctRegex!(`@author`); + static variable_doc_author = ctRegex!(`@author|@creator`); + static raw_author_munge = ctRegex!(`(\S.+?),\s+(.+)`,"i"); /+ head +/ static native_subhead_creator = ctRegex!(`^(?:author|translator|illustrator)$`, "m"); static native_subhead_title = ctRegex!(`^(?:main|sub(?:title)?|full|language|edition|note)$`, "m"); @@ -63,7 +65,7 @@ template RgxInit() { static native_subhead_make = ctRegex!(`^(?:cover_image|home_button_image|home_button_text|footer|headings|num_top|num_depth|breaks|substitute|bold|italics|emphasis|texpdf_font|css)$`, "m"); /+ heading & paragraph operators +/ static heading_a = ctRegex!(`^:?[A][~] `, "m"); - static heading = ctRegex!(`^:?([A-D1-4])[~]([a-z0-9_.-]*[?]?) `); + static heading = ctRegex!(`^:?([A-D1-4])[~]([a-z0-9_.-]*[?]?)\s+`,"i"); static heading_marker = ctRegex!(`^:?([A-D1-4])[~]`); static heading_anchor_tag = ctRegex!(`^:?[A-D1-4][~]([a-z0-9_.-]+) `,"i"); static heading_identify_anchor_tag = ctRegex!(`^:?[A-D1-4][~]\s+(?:(?:(?:chapter|article|section|clause)\s+[0-9.]+)|(?:[0-9]+))`,"i"); // unless dob.obj =~/^:?[A-D1-4]~\s+(?:|(?:chapter|article|section|clause)\s+)([0-9.]+)/i -- cgit v1.2.3