From 13ea2d6b2d551013a4c10a22d60e7e666986b979 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 21 May 2019 12:00:35 -0400 Subject: a regex & some clearing --- org/default_regex.org | 28 +--------------------------- org/source_files_read.org | 12 ------------ 2 files changed, 1 insertion(+), 39 deletions(-) (limited to 'org') diff --git a/org/default_regex.org b/org/default_regex.org index 25536ff..e8b6b3f 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -104,38 +104,12 @@ static make_simple_substitutions_d = ctRegex!(`(?P[a-z_]+):\s*(?P.*)`, "m"); -static native_header_sub = ctRegex!(`^[ ]*:(?P[a-z_]+):\s+(?P.+)`, "m"); -static native_header_meta_title = ctRegex!(`^@title:\s`, "m"); static variable_doc_title = ctRegex!(`@title`); static variable_doc_author = ctRegex!(`@author|@creator`); static raw_author_munge = ctRegex!(`(\S.+?),\s+(.+)`,"i"); static toml_header_meta_title = ctRegex!(`^\s*(title\s*=\s*"|\[title\])`, "m"); #+END_SRC -*** subheader :native:subheader: - -#+name: meta_rgx -#+BEGIN_SRC d -/+ head +/ -static native_subhead_creator = ctRegex!(`^(?:author|translator|illustrator)$`, "m"); -static native_subhead_title = ctRegex!(`^(?:main|sub(?:title)?|full|language|edition|note)$`, "m"); -static native_subhead_rights = ctRegex!(`^(?:copyright|illustrations|license|cover)$`, "m"); -static native_subhead_date = ctRegex!(`^(?:published|created|issued|available|valid|modified|added_to_site)$`, "m"); -static native_subhead_original = ctRegex!(`^(?:title|language|source)$`, "m"); -static native_subhead_classify = ctRegex!(`^(?:topic_register|subject|keywords|loc|dewey)$`, "m"); -static native_subhead_identifier = ctRegex!(`^(?:oclc|pg|isbn)$`, "m"); -static native_subhead_notes = ctRegex!(`^(?:abstract|description)$`, "m"); -static native_subhead_publisher = ctRegex!(`^(?:name)$`, "m"); -static native_subhead_make = ctRegex!(`^(?:cover_image|home_button_image|home_button_text|footer|headings|num_top|auto_num_depth|breaks|substitute|bold|italics|emphasis|texpdf_font|css)$`, "m"); -#+END_SRC - ** heading & paragraph operators :paragraph:operator: #+name: meta_rgx @@ -330,7 +304,7 @@ static auto_heading_numbering_off_lv4 = ctRegex!(`^4~\S*?-\s`, "m static object_number_off = ctRegex!(`~#[ ]*$`, "m"); static object_number_off_dummy_heading = ctRegex!(`-#$`, "m"); static object_number_off_all = ctRegex!(`[~-]#$`, "m"); -static repeated_character_line_separator = ctRegex!(`^(?:(?:(?:[.][ ]?){4,}|(?:[-][ ]?|[~][ ]?|[*][ ]?|[$][ ]?|[#][ ]?|[\\][ ]?|[/][ ]?){2,})\s*?)*$`); +static repeated_character_line_separator = ctRegex!(`^(?:[ ]*(?:(?:[.][ ]*){4,}|(?:[-][ ]*|[~][ ]*|[*][ ]*|[$][ ]*|[#][ ]*|[\\][ ]*|[/][ ]*){2,})\s*?)+$`); #+END_SRC ** no object_number block :ocn:off:block: diff --git a/org/source_files_read.org b/org/source_files_read.org index 495b856..a7e5b1c 100644 --- a/org/source_files_read.org +++ b/org/source_files_read.org @@ -544,18 +544,6 @@ if (type1["curly_code"] == 1) { type1["header_make"] = 0; type1["header_meta"] = 0; contents_insert ~= line; -} else if ( - (type1["header_make"] == 1) - && line.matchFirst(rgx.native_header_sub) -) { - type1["header_make"] = 1; - type1["header_meta"] = 0; -} else if ( - (type1["header_meta"] == 1) - && line.matchFirst(rgx.native_header_sub) -) { - type1["header_meta"] = 1; - type1["header_make"] = 0; } else if (auto m = line.match(rgx.insert_src_fn_ssi_or_sst)) { type1["header_make"] = 0; type1["header_meta"] = 0; -- cgit v1.2.3