diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2025-02-21 12:42:55 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2025-02-21 12:42:57 -0500 |
commit | 0b2bb143e4512e0c78d4e2efdb9161772d54459c (patch) | |
tree | fdc5b0230674c6f1d69ab39b2ce22324a7ad8e87 /org/default_regex.org | |
parent | 0.18.0 (diff) |
triple single-quote marks block identifier added
- tics a bit cumbersome where single quotes work
just as well
- testing required (special cases not covered)
- diverges from sisu markup which will need an
update sometime
Diffstat (limited to 'org/default_regex.org')
-rw-r--r-- | org/default_regex.org | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/org/default_regex.org b/org/default_regex.org index 52d52d7..dc70056 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -53,6 +53,7 @@ static template spineRgxIn() { <<meta_rgx_paragraph_marks>> <<meta_rgx_blocks>> <<meta_rgx_block_tic>> + <<meta_rgx_block_quotemarks>> <<meta_rgx_block_curly>> <<meta_rgx_sub_match_code>> <<meta_rgx_table>> @@ -220,12 +221,14 @@ static grouped_para_indent_hang = ctRegex!(`^_(?P<hang>[0-9])_(? #+NAME: meta_rgx_blocks #+BEGIN_SRC d /+ blocked markup +/ -static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^`{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|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;:,]*[)])?)"); +static block_open = ctRegex!("^((code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|table)(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|^[`']{3} (code(?:[.][a-z][0-9a-z#+_]+)?|(?:poem|group|block|quote)(?:[.][a-z][0-9a-z_]+)?|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: +- consider quotemarks as alternative to, or to replace tics as using tics in text markup is a bit cumbersome + #+NAME: meta_rgx_block_tic #+BEGIN_SRC d /+ blocked markup tics +/ @@ -238,6 +241,22 @@ static block_tic_table_open = ctRegex!("^`{3} table(?:[(](?P static block_tic_close = ctRegex!("^(`{3})$","m"); #+END_SRC +*** blocked markup quotemarks :block:quotemarks: + +- consider quotemarks as alternative to, or to replace tics as using tics in text markup is a bit cumbersome + +#+NAME: meta_rgx_block_quotemarks +#+BEGIN_SRC d +/+ blocked markup tics +/ +static block_quotemarks_code_open = ctRegex!(`^'{3} code(?:[.](?P<syntax>[a-z][0-9a-z#+_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_poem_open = ctRegex!(`^'{3} poem(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_group_open = ctRegex!(`^'{3} group(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_block_open = ctRegex!(`^'{3} block(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_quote_open = ctRegex!(`^'{3} quote(?:[.](?P<lang>[a-z][0-9a-z_]+))?(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); +static block_quotemarks_table_open = ctRegex!(`^'{3} table(?:[(](?P<attrib>[ a-zA-Z0-9;:,]*)[)])?`); // ctRegex!("^'{3} table(?:\(.*?\))?"); +static block_quotemarks_close = ctRegex!(`^('{3})$`,"m"); +#+END_SRC + *** blocked markup curly :block:curly: #+NAME: meta_rgx_block_curly |