aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/defaults.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/defaults.org')
-rw-r--r--org/defaults.org71
1 files changed, 55 insertions, 16 deletions
diff --git a/org/defaults.org b/org/defaults.org
index ffd2c7c..25b1a4b 100644
--- a/org/defaults.org
+++ b/org/defaults.org
@@ -429,6 +429,7 @@ template SiSUrgxInitFlags() {
"curly_block" : 0,
"curly_quote" : 0,
"curly_table" : 0,
+ "curly_table_special_markup" : 0,
"tic_code" : 0,
"tic_poem" : 0,
"tic_group" : 0,
@@ -580,9 +581,15 @@ static newline_eol_strip_preceding = ctRegex!("[ ]*\n");
static newline_eol_delimiter_only = ctRegex!("^\n");
static line_delimiter_ws_strip = ctRegex!("[ ]*\n[ ]*");
static para_delimiter = ctRegex!("\n[ ]*\n+");
+static table_col_delimiter = ctRegex!("[ ]*\n+", "mg");
+static table_row_delimiter = ctRegex!("\n[ ]*\n+", "mg");
+static table_row_delimiter_special = ctRegex!("[ ]*\n", "mg"); //
+static table_col_delimiter_special = ctRegex!("[ ]*[|][ ]*", "mg"); //
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,.$£₤Є€€¥-]+$`);
#+END_SRC
*** comments :comment:
@@ -594,7 +601,8 @@ static comment = ctRegex!(`^%+ `);
static comments = ctRegex!(`^%+ |^%+$`);
#+END_SRC
-*** native header :native:header:
+*** native headers
+**** native header :native:header:
#+name: ao_rgx
#+BEGIN_SRC d
@@ -613,7 +621,7 @@ static variable_doc_author = ctRegex!(`@author|@creat
static raw_author_munge = ctRegex!(`(\S.+?),\s+(.+)`,"i");
#+END_SRC
-*** subheader :native:subheader:
+**** subheader :native:subheader:
#+name: ao_rgx
#+BEGIN_SRC d
@@ -661,12 +669,13 @@ static para_indent_hang = ctRegex!(`^_([0-9])_([0-
static para_attribs = ctRegex!(`^_(?:(?:[0-9])(?:_([0-9]))?|(?:[1-9])?[*]) `);
#+END_SRC
-*** blocked markup :block:tic:
+*** blocked markup
+**** blocked markup :block:tic:
#+name: ao_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)");
+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)");
#+END_SRC
@@ -676,22 +685,22 @@ static block_poem_open = ctRegex!("^((poem[{].*?$
#+BEGIN_SRC d
/+ blocked markup tics +/
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)([.][a-z][0-9a-z_]+)?");
+static block_tic_code_open = ctRegex!("^`{3} (?:code)(?:[.]([a-z][0-9a-z_]+))?(?:[ ]+([#]))?");
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_table_open = ctRegex!("^`{3} table(.*)");
static block_tic_close = ctRegex!("^(`{3})$","m");
#+END_SRC
-*** blocked markup curly :block:curly:
+**** blocked markup curly :block:curly:
#+name: ao_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_]+)?[{](.*?)$)`);
+static block_curly_code_open = ctRegex!(`^(?:code(?:[.]([a-z][0-9a-z_]+))?[{]([#]?)\s*$)`);
static block_curly_code_close = ctRegex!(`^([}]code)`);
static block_curly_poem_open = ctRegex!(`^(poem[{].*?$)`);
static block_curly_poem_close = ctRegex!(`^([}]poem)`);
@@ -701,8 +710,22 @@ static block_curly_block_open = ctRegex!(`^(block[{].*?$
static block_curly_block_close = ctRegex!(`^([}]block)`);
static block_curly_quote_open = ctRegex!(`^(quote[{].*?$)`);
static block_curly_quote_close = ctRegex!(`^([}]quote)`);
-static block_curly_table_open = ctRegex!(`^(table[{].*?$)`);
+static block_curly_table_open = ctRegex!(`^table[{](.*)`);
static block_curly_table_close = ctRegex!(`^([}]table)`);
+static block_curly_table_special_markup = ctRegex!(`^[{]table((~h)?(?P<columns>(?:[ ]+[0-9]+;)+))[}]`, "mg"); // sepcial table block markup
+#+END_SRC
+
+**** block sub-matches :block:curly:
+
+#+name: ao_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_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]?)`);
+static table_col_align_match = ctRegex!(`(?P<align>[lr])`);
+static table_col_separator = ctRegex!(`┊`);
+static table_col_separator_nl = ctRegex!(`[┊]$`, "mg");
#+END_SRC
*** inline markup footnotes endnotes :inline:footnote:
@@ -731,7 +754,7 @@ static inline_text_and_note_curly = ctRegex!(`(?P<text>.+?)(
static note_ref = ctRegex!(`^\S+?noteref_([0-9]+)`, "mg"); // {^{73.}^}#noteref_73
#+END_SRC
-*** links/ urls :inline:footnote:
+**** links/ urls :inline:footnote:
#+name: ao_rgx
#+BEGIN_SRC d
@@ -743,14 +766,14 @@ static inline_link_endnote_url_helper_punctuated = ctRegex!(`\{~\^\s+(?P<c
static inline_link_endnote_url_helper = ctRegex!(`\{~\^\s+(?P<content>.+?)\}(?P<link>(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)\S+)`, "mg");
#+END_SRC
-*** images :images:
+**** images :images:
#+name: ao_rgx
#+BEGIN_SRC d
static image = ctRegex!(`([a-zA-Z0-9._-]+?\.(?:png|gif|jpg))`, "mg");
#+END_SRC
-*** inline markup book index :inline:bookindex:
+**** inline markup book index :inline:bookindex:
#+name: ao_rgx
#+BEGIN_SRC d
@@ -830,7 +853,7 @@ static bi_sub_terms_plus_obj_cite_number_offset_split = ctRegex!(`\s*\|\s*`);
static bi_term_and_obj_cite_numbers_match = ctRegex!(`^(.+?)\+(\d+)`);
#+END_SRC
-** language codes :language:codes:
+*** language codes :language:codes:
#+name: ao_rgx
#+BEGIN_SRC d
@@ -1045,6 +1068,10 @@ template InternalMarkup() {
auto br_page_line = "┼"; // "▭";
auto br_page = "┿"; // "┼";
auto br_page_new = "╂"; // "╋";
+ auto tc_s = "┊"; // "┴"; //"『"; // "┏" ┓
+ auto tc_o = "┏"; //"『"; // "┏" ┓
+ auto tc_c = "┚"; // "』"; // "┚" table row mark #Mx[:tc_c]="』\n"
+ auto tc_p = "┆"; // table col/misc mark
string indent_by_spaces_provided(int indent) {
auto _indent_spaces ="░░"; // auto nbsp = "░";
_indent_spaces = replicate(_indent_spaces, indent);
@@ -1160,6 +1187,8 @@ static newline = ctRegex!("\n", "mg");
static space = ctRegex!(`[ ]`, "mg");
static two_spaces = ctRegex!(`[ ]{2}`, "mg");
static nbsp_char = ctRegex!(`░`, "mg");
+static nbsp_and_space = ctRegex!(`&nbsp;[ ]`, "mg");
+static nbsp_char_and_space = ctRegex!(`░[ ]`, "mg");
#+END_SRC
*** filename (and path) matching (including markup insert file) :insert:file:path:filename:
@@ -1176,7 +1205,8 @@ static src_fn_find_inserts = ctRegex!(`^(?P<path>[a-z
static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[ti])$`);
#+END_SRC
-*** inline (internal program) markup footnotes endnotes :inline:footnote:
+*** inline markup
+**** inline (internal program) markup footnotes endnotes :inline:footnote:
#+name: prgmkup_rgx
#+BEGIN_SRC d
@@ -1196,7 +1226,7 @@ static inline_text_and_note_al = ctRegex!(`(?P<text>.+?)
static inline_text_and_note_al_ = ctRegex!(`(.+?(?:【[*+]*\s+.+?】|$))`, "mg");
#+END_SRC
-*** inline links
+**** inline links
#+name: prgmkup_rgx
#+BEGIN_SRC d
@@ -1209,7 +1239,7 @@ static inline_seg_link = ctRegex!(`(¤)(?:.+?)\.f
static mark_internal_site_lnk = ctRegex!(`¤`, "mg");
#+END_SRC
-*** TODO inline markup font face mod :inline:font:face:
+**** TODO inline markup font face mod :inline:font:face:
#+name: prgmkup_rgx
#+BEGIN_SRC d
@@ -1232,6 +1262,15 @@ static inline_italics_line = ctRegex!(`^/_ (?P<text>.
static inline_underscore_line = ctRegex!(`^__ (?P<text>.+?)((?: [\\]{2}|[~]#){0,2}$)`);
#+END_SRC
+**** table related
+
+#+name: prgmkup_rgx
+#+BEGIN_SRC d
+/+ table delimiters +/
+static table_delimiter_col = ctRegex!("[ ]*[┊][ ]*", "mg"); //
+static table_delimiter_row = ctRegex!("[ ]*\n", "mg"); //
+#+END_SRC
+
* +set colors for terminal+ (unused) :colors:terminal:
#+name: ao_ansi_colors