aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ao_defaults.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/ao_defaults.org')
-rw-r--r--org/ao_defaults.org37
1 files changed, 19 insertions, 18 deletions
diff --git a/org/ao_defaults.org b/org/ao_defaults.org
index 00fce41..dabc47f 100644
--- a/org/ao_defaults.org
+++ b/org/ao_defaults.org
@@ -19,7 +19,7 @@
** template: header :header:
#+name: ao_defaults_templates
#+BEGIN_SRC d
-template SiSUheader() {
+template SiSUheaderSkel() {
auto header_make_jsonstr = `{
"make": {
"cover_image" : "",
@@ -37,7 +37,7 @@ template SiSUheader() {
"css" : ""
}
}`;
- auto header_metadata_jsonstr = `{
+ auto header_meta_jsonstr = `{
"creator": {
"author" : "",
"translator" : "",
@@ -192,7 +192,7 @@ template SiSUrgxInitFlags() {
int[string] flags_type_init = [
"make_headings" : 0,
"header_make" : 0,
- "header_metadata" : 0,
+ "header_meta" : 0,
"heading" : 0,
"heading_biblio" : 0,
"para" : 0,
@@ -348,13 +348,6 @@ template InternalMarkup() {
/+ misc +/
static flag_action = ctRegex!(`^(--[a-z][a-z0-9-]+)$`);
static flag_action_str = ctRegex!(` (--[a-z][a-z0-9-]+)`);
-static src_pth = ctRegex!(`^([a-zA-Z0-9._-]+/)*([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]))$`);
-static src_fn_master = ctRegex!(`^([a-zA-Z0-9._-]+/)*([a-zA-Z0-9._-]+[.]ssm)$`);
-static src_fn_find_inserts = ctRegex!(`^([a-zA-Z0-9._-]+/)*([a-zA-Z0-9._-]+[.]ss[im])$`);
-// static ssm_fn = ctRegex!(`^[a-zA-Z0-9._-]+[.]ssm$`);
-static line_delimiter = ctRegex!("\n");
// static arr_delimiter = ctRegex!(`\s*[;]\s*`);
static within_quotes = ctRegex!(`"(.+?)"`);
static make_heading_delimiter = ctRegex!(`[;][ ]*`);
@@ -364,6 +357,7 @@ static name_delimiter = ctRegex!(`^([^,]+)[ ]*,[ ]+(.+?)$`);
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+");
@@ -371,11 +365,16 @@ static levels_markup = ctRegex!(`^[A-D1-4]$`);
static levels_numbered = ctRegex!(`^[0-9]$`);
static levels_numbered_headings = ctRegex!(`^[0-7]$`);
#+END_SRC
-** markup insert file :insert:file:
+** filename (and path) matching (including markup insert file) :insert:file:path:filename:
#+name: ao_rgx
#+BEGIN_SRC d
-/+ insert markup file +/
-// static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*([a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[ti])$`);
+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]))$`);
+static src_fn_master = ctRegex!(`^(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ssm)$`);
+static src_fn_text = ctRegex!(`^(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]sst)$`);
+static src_fn_insert = ctRegex!(`^(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ssi)$`);
+static src_fn_find_inserts = ctRegex!(`^(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[im])$`);
static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[ti])$`);
// static insert_ssi_or_sst_fn = ctRegex!(`^<<\s*[a-zA-Z0-9._-]+[.]ss[ti]`);
#+END_SRC
@@ -384,6 +383,7 @@ static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*(?P<path>[a-zA-Z0-9._-]+/)*(?
#+BEGIN_SRC d
/+ comments +/
static comment = ctRegex!(`^%+ `);
+static comments = ctRegex!(`^%+ |^%+$`);
#+END_SRC
** header :header:
#+name: ao_rgx
@@ -391,17 +391,18 @@ static comment = ctRegex!(`^%+ `);
/+ header +/
static header = ctRegex!(`^@([a-z_]+):(?:\s|$)`);
static header_make = ctRegex!(`^@(make):(?:\s|$)`);
-static header_metadata = ctRegex!(`^@([a-z_]+):(?:\s|$)`);
+static header_meta = ctRegex!(`^@([a-z_]+):(?:\s|$)`);
static header_sub = ctRegex!(`^[ ]+:([a-z_]+):\s`);
-static head_main = ctRegex!(`^@([a-z_]+):\s*(.*)`, "m");
-static head_sub = ctRegex!(`^[ ]*:([a-z_]+):\s+(.+)`, "m");
+static head_main = ctRegex!(`^@(?P<header>[a-z_]+):\s*(?P<content>.*)`, "m");
+static head_sub = ctRegex!(`^[ ]*:(?P<subheader>[a-z_]+):\s+(?P<content>.+)`, "m");
static head_value_title = ctRegex!(`@title`);
static head_value_author = ctRegex!(`@author`);
#+END_SRC
-** header & paragraph operators :paragraph:operator:
+** heading & paragraph operators :paragraph:operator:
#+name: ao_rgx
#+BEGIN_SRC d
/+ heading & paragraph operators +/
+static heading_a = ctRegex!(`^:?[A][~] `, "m");
static heading = ctRegex!(`^:?([A-D1-4])[~]([a-z0-9_.-]*[?]?) `);
static heading_marker = ctRegex!(`^:?([A-D1-4])[~]`);
static heading_title = ctRegex!(`^:?[A-D1-4][~][a-z0-9_.-]*[?]?\s+(.+?)$`);
@@ -541,7 +542,7 @@ static obj_cite_number_block_marks = ctRegex!(`^--[+~-]#$`);
#+name: ao_rgx
#+BEGIN_SRC d
/+ ignore outside code blocks +/
-static regular_parse_skip = ctRegex!(`^(--[+~-]#|-[\\]{2}-|=[.\\]{2}=)$`); // not structural info
+static skip_code_block_from_regular_parse = ctRegex!(`^(--[+~-]#|-[\\]{2}-|=[.\\]{2}=)$`); // not structural info
#+END_SRC
** line & page breaks :break:
#+name: ao_rgx