aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/meta')
-rw-r--r--src/doc_reform/meta/rgx.d40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/doc_reform/meta/rgx.d b/src/doc_reform/meta/rgx.d
index 6143656..6cf9c28 100644
--- a/src/doc_reform/meta/rgx.d
+++ b/src/doc_reform/meta/rgx.d
@@ -33,7 +33,7 @@ static template DocReformRgxInit() {
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,.%$£₤Є€€¥()-]+$`);
/+ comments +/
static comment = ctRegex!(`^%+ `);
static comments = ctRegex!(`^%+ |^%+$`);
@@ -93,33 +93,33 @@ static template DocReformRgxInit() {
static para_attribs = ctRegex!(`^_(?:(?:[0-9])(?:_([0-9]))?|(?:[1-9])?[*]) `);
static para_inline_link_anchor = ctRegex!(`\*[~](?P<anchor>[a-z0-9_.-]+)(?= |$)`,"i");
/+ 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;:,#]*[)])?)");
/+ 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");
/+ 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 table_head_instructions = ctRegex!(`(?P<c_heading>h)?(?:[ ]+c(?P<c_num>[0-9]);)?(?P<c_widths>(?:[ ]+[0-9]+[lr]?;)+)`);
+ static block_curly_table_special_markup = ctRegex!(`^[{]table[(](?P<attrib>(?:(h);)?(?P<columns>(?:[, ]+[0-9]+)+))[)][}]`, "mg");
+ 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]?)`);
@@ -163,7 +163,7 @@ static template DocReformRgxInit() {
static book_index_open = ctRegex!(`^=\{\s*([^}]+?)$`);
static book_index_close = ctRegex!(`^(.*?)\}$`, "m");
/+ 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");
/+ no object_number block +/