aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/default_regex.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/default_regex.org')
-rw-r--r--org/default_regex.org40
1 files changed, 20 insertions, 20 deletions
diff --git a/org/default_regex.org b/org/default_regex.org
index be628dd..ad8b9e5 100644
--- a/org/default_regex.org
+++ b/org/default_regex.org
@@ -76,7 +76,7 @@ static levels_markup = ctRegex!(`^[A-D1-4]$`);
static levels_numbered = ctRegex!(`^[0-9]$`);
static levels_numbered_headings = ctRegex!(`^[0-7]$`);
static numeric = ctRegex!(`[ 0-9,.-]+`);
-static numeric_col = ctRegex!(`^[ 0-9,.$£₤Є€€¥-]+$`);
+static numeric_col = ctRegex!(`^[ 0-9,.%$£₤Є€€¥()-]+$`);
#+END_SRC
** comments :comment:
@@ -174,8 +174,8 @@ static para_inline_link_anchor = ctRegex!(`\*[~](?P<ancho
#+name: meta_rgx
#+BEGIN_SRC d
/+ blocked markup +/
-static block_open = ctRegex!("^((code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)[{].*?$)|^`{3} (code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)|^[{]table(~h)?(?P<columns>(?:[ ]+[0-9]+;)+)[}]");
-static block_poem_open = ctRegex!("^((poem[{].*?$)|`{3} poem)");
+static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)(?:[(][ a-zA-Z0-9;:,#]*[)])?[{][ ]*$)|^`{3} (code(?:[.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)(?:[(][ a-zA-Z0-9;:,#]*[)])?|^[{]table[(](?:h;)?(?P<columns>(?:[ ,]+[0-9]+)+)[)][}]");
+static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,#]*[)])?[{][ ]*$)|`{3} poem(?:[(][ a-zA-Z0-9;:,#]*[)])?)");
#+END_SRC
*** blocked markup tic :block:tic:
@@ -183,13 +183,13 @@ static block_poem_open = ctRegex!("^((poem[{].*?$
#+name: meta_rgx
#+BEGIN_SRC d
/+ blocked markup tics +/
-static block_tic_open = ctRegex!("^`{3} (code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)"); // what of numbered code?
-static block_tic_code_open = ctRegex!("^`{3} (?:code)(?:[.]([a-z][0-9a-z_]+))?(?:[ ]+([#]))?"); // extract additional info
-static block_tic_poem_open = ctRegex!("^`{3} (poem)");
-static block_tic_group_open = ctRegex!("^`{3} (group)");
-static block_tic_block_open = ctRegex!("^`{3} (block)");
-static block_tic_quote_open = ctRegex!("^`{3} (quote)");
-static block_tic_table_open = ctRegex!("^`{3} table(.*)");
+static block_tic_open = ctRegex!("^`{3} (code(?:[.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)");
+static block_tic_code_open = ctRegex!("^`{3} (?:code)(?:[.](?P<syntax>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,#]*)[)])?");
+static block_tic_poem_open = ctRegex!("^`{3} (poem)(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?");
+static block_tic_group_open = ctRegex!("^`{3} (group)(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?");
+static block_tic_block_open = ctRegex!("^`{3} (block)(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?");
+static block_tic_quote_open = ctRegex!("^`{3} (quote)(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?");
+static block_tic_table_open = ctRegex!("^`{3} table(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?"); // ctRegex!("^`{3} table(?:\(.*?\))?");
static block_tic_close = ctRegex!("^(`{3})$","m");
#+END_SRC
@@ -198,27 +198,27 @@ static block_tic_close = ctRegex!("^(`{3})$","m")
#+name: meta_rgx
#+BEGIN_SRC d
/+ blocked markup curly +/
-static block_curly_open = ctRegex!(`^((code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)[{].*?$)`);
-static block_curly_code_open = ctRegex!(`^(?:code(?:[.]([a-z][0-9a-z_]+))?[{]([#]?)\s*$)`); // extract additional info
+static block_curly_open = ctRegex!(`^((?:code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)(?:[(][ a-zA-Z0-9;:,#]*[)])?[{][ ]*$)`);
+static block_curly_code_open = ctRegex!(`^(?:code(?:[.](?P<syntax>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,#]*)[)])?[{][ ]*$)`);
static block_curly_code_close = ctRegex!(`^([}]code)`);
-static block_curly_poem_open = ctRegex!(`^(poem[{].*?$)`);
+static block_curly_poem_open = ctRegex!(`^(poem(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?[{][ ]*$)`);
static block_curly_poem_close = ctRegex!(`^([}]poem)`);
-static block_curly_group_open = ctRegex!(`^(group[{].*?$)`);
+static block_curly_group_open = ctRegex!(`^(group(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?[{][ ]*$)`);
static block_curly_group_close = ctRegex!(`^([}]group)`);
-static block_curly_block_open = ctRegex!(`^(block[{].*?$)`);
+static block_curly_block_open = ctRegex!(`^(block(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?[{][ ]*$)`);
static block_curly_block_close = ctRegex!(`^([}]block)`);
-static block_curly_quote_open = ctRegex!(`^(quote[{].*?$)`);
+static block_curly_quote_open = ctRegex!(`^(quote(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?[{][ ]*$)`);
static block_curly_quote_close = ctRegex!(`^([}]quote)`);
-static block_curly_table_open = ctRegex!(`^table[{](.*)`);
+static block_curly_table_open = ctRegex!(`^table(?:[(]([?P<attrib> a-zA-Z0-9;:,]*)[)])?[{][ ]*$`);
static block_curly_table_close = ctRegex!(`^([}]table)`);
-static block_curly_table_special_markup = ctRegex!(`^[{]table((~h)?(?P<columns>(?:[ ]+[0-9]+;)+))[}]`, "mg");
+static block_curly_table_special_markup = ctRegex!(`^[{]table[(](?P<attrib>(?:(h);)?(?P<columns>(?:[, ]+[0-9]+)+))[)][}]`, "mg");
#+END_SRC
*** block sub-matches :block:curly:
#+name: meta_rgx
#+BEGIN_SRC d
-static table_head_instructions = ctRegex!(`(?P<c_heading>h)?(?:[ ]+c(?P<c_num>[0-9]);)?(?P<c_widths>(?:[ ]+[0-9]+[lr]?;)+)`);
+static table_head_instructions = ctRegex!(`(?:(?P<c_heading>h);)?(?:[ ]+c(?P<c_num>[0-9]):)?(?P<c_widths>(?:[, ]+[0-9]+[lr]?)+)`);
static table_col_widths_and_alignment = ctRegex!(`(?P<width>[0-9]+)(?P<align>[lr]?)`);
static table_col_widths = ctRegex!(`(?P<widths>[0-9]+)`);
static table_col_align = ctRegex!(`(?P<align>[lr]?)`);
@@ -293,7 +293,7 @@ static book_index_close = ctRegex!(`^(.*?)\}$`, "m
#+name: meta_rgx
#+BEGIN_SRC d
/+ no object_number object +/
-static object_number_off = ctRegex!(`~#$`, "m");
+static object_number_off = ctRegex!(`~#[ ]*$`, "m");
static object_number_off_dh = ctRegex!(`-#$`, "m");
static object_number_off_all = ctRegex!(`[~-]#$`, "m");
#+END_SRC