diff options
author | Ralph Amissah <ralph@amissah.com> | 2016-11-01 10:06:47 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:13 -0400 |
commit | 0079c34ce7a524d4b93ed56191b5e7cf6a380975 (patch) | |
tree | af9d3fad63937e1b8d5eefa2bdabbcea2325ce91 /src/sdp/ao_rgx.d | |
parent | sync, fix level :A split info (diff) |
0.8.0 the document parts (& org babel tangle)
Diffstat (limited to 'src/sdp/ao_rgx.d')
-rw-r--r-- | src/sdp/ao_rgx.d | 20 |
1 files changed, 11 insertions, 9 deletions
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<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[tm])$`); static src_fn = ctRegex!(`^([a-zA-Z0-9._-]+/)*(?P<fn_src>(?P<fn_base>[a-zA-Z0-9._-]+)[.](?P<fn_src_suffix>ss[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 |