aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/defaults.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/defaults.org')
-rw-r--r--org/defaults.org62
1 files changed, 46 insertions, 16 deletions
diff --git a/org/defaults.org b/org/defaults.org
index 5ba63df..03eecb0 100644
--- a/org/defaults.org
+++ b/org/defaults.org
@@ -705,21 +705,6 @@ static block_curly_table_open = ctRegex!(`^(table[{].*?$
static block_curly_table_close = ctRegex!(`^([}]table)`);
#+END_SRC
-*** inline markup font face mod :inline:font:face:
-
-#+name: ao_rgx
-#+BEGIN_SRC d
-/+ inline markup font face mod +/
-static inline_emphasis = ctRegex!(`\*\{(?P<text>.+?)\}\*`);
-static inline_bold = ctRegex!(`!\{(?P<text>.+?)\}!`);
-static inline_italics = ctRegex!(`/\{(?P<text>.+?)\}/`);
-static inline_superscript = ctRegex!(`\^\{(?P<text>.+?)\}\^`);
-static inline_subscript = ctRegex!(`,\{(?P<text>.+?)\},`);
-static inline_strike = ctRegex!(`-\{(?P<text>.+?)\}-`);
-static inline_insert = ctRegex!(`\+\{(?P<text>.+?)\}\+`);
-static inline_mono = ctRegex!(`#\{(?P<text>.+?)\}#`);
-#+END_SRC
-
*** inline markup footnotes endnotes :inline:footnote:
#+name: ao_rgx
@@ -750,7 +735,7 @@ static note_ref = ctRegex!(`^\S+?noteref_(
#+name: ao_rgx
#+BEGIN_SRC d
-static inline_url_generic = ctRegex!(`(?:^|[}(\[ ])(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)[a-zA-Z0-9_]`, "mg");
+static inline_url_generic = ctRegex!(`(?:^|[}(\[ ])(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)[a-zA-Z0-9_#]`, "mg");
static inline_url = ctRegex!(`((?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)[a-zA-Z0-9_]\S*)`, "mg");
static inline_link_naked_url = ctRegex!(`(?P<before>^|[ ])(?P<link>(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)\S+?)(?P<after>[.,;:?!'"]?(?:[ ]|$))`, "mg");
static inline_link_markup_regular = ctRegex!(`(?P<before>^|[ ])\{\s*(?P<content>.+?)\s*\}(?P<link>(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)\S+?)(?P<after>[.,;:?!]?(?:[ ]|$))`, "mg");
@@ -1023,10 +1008,22 @@ template SiSUoutputRgxInit() {
private import defaults;
struct Rgx {
<<prgmkup_rgx>>
+ <<sp_ch_xhtml_rgx>>
}
}
#+END_SRC
+*** special characters
+**** xhtml special characters
+
+#+name: sp_ch_xhtml_rgx
+#+BEGIN_SRC d
+static xhtml_ampersand = ctRegex!(`[&]`); // &amp;
+static xhtml_less_than = ctRegex!(`[<]`); // &lt;
+static xhtml_greater_than = ctRegex!(`[>]`); // &gt;
+static xhtml_line_break = ctRegex!(` [\\]{2}`); // <br />
+#+END_SRC
+
* 2. defaults shared by ao & output (generic)
** 0. defaults :defaults:
*** template: internal markup :markup:
@@ -1155,6 +1152,16 @@ template SiSUlanguageCodes() {
** 1. ctRegex :regex:
+*** misc generic
+
+#+name: prgmkup_rgx
+#+BEGIN_SRC d
+static newline = ctRegex!("\n", "mg");
+static space = ctRegex!(`[ ]`, "mg");
+static two_spaces = ctRegex!(`[ ]{2}`, "mg");
+static nbsp_char = ctRegex!(`░`, "mg");
+#+END_SRC
+
*** filename (and path) matching (including markup insert file) :insert:file:path:filename:
#+name: prgmkup_rgx
@@ -1200,6 +1207,29 @@ static inline_seg_link = ctRegex!(`(¤)(?:.+?)\.f
static mark_internal_site_lnk = ctRegex!(`¤`, "mg");
#+END_SRC
+*** TODO inline markup font face mod :inline:font:face:
+
+#+name: prgmkup_rgx
+#+BEGIN_SRC d
+/+ inline markup font face mod +/
+static inline_faces = ctRegex!(`(?P<markup>(?P<mod>[*!_^,+#-])\{(?P<text>.+?)\}[*!_^,+#-])`, "mg");
+static inline_emphasis = ctRegex!(`\*\{(?P<text>.+?)\}\*`, "mg");
+static inline_bold = ctRegex!(`!\{(?P<text>.+?)\}!`, "mg");
+static inline_underscore = ctRegex!(`_\{(?P<text>.+?)\}_`, "mg");
+static inline_italics = ctRegex!(`/\{(?P<text>.+?)\}/`, "mg");
+static inline_superscript = ctRegex!(`\^\{(?P<text>.+?)\}\^`, "mg");
+static inline_subscript = ctRegex!(`,\{(?P<text>.+?)\},`, "mg");
+static inline_strike = ctRegex!(`-\{(?P<text>.+?)\}-`, "mg");
+static inline_insert = ctRegex!(`\+\{(?P<text>.+?)\}\+`, "mg");
+static inline_mono = ctRegex!(`#\{(?P<text>.+?)\}#`, "mg");
+static inline_cite = ctRegex!(`"\{(?P<text>.+?)\}"`, "mg");
+static inline_faces_line = ctRegex!(`^[*!/_]_ (?P<text>.+?)((?: [\\]{2}|[~]#){0,2}$)`);
+static inline_emphasis_line = ctRegex!(`^\*_ (?P<text>.+?)((?: [\\]{2}|[~]#){0,2}$)`);
+static inline_bold_line = ctRegex!(`^!_ (?P<text>.+?)((?: [\\]{2}|[~]#){0,2}$)`);
+static inline_italics_line = ctRegex!(`^/_ (?P<text>.+?)((?: [\\]{2}|[~]#){0,2}$)`);
+static inline_underscore_line = ctRegex!(`^__ (?P<text>.+?)((?: [\\]{2}|[~]#){0,2}$)`);
+#+END_SRC
+
* +set colors for terminal+ (unused) :colors:terminal:
#+name: ao_ansi_colors