aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/ao_rgx.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-02-28 15:26:52 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commitd28ce48b155a11bf4f313982139f4697120e2df1 (patch)
tree5baad6cabd4787c06b539848d952f4883c174bff /src/sdp/ao_rgx.d
parent0.13.5 defaults regex reorganised; some work on (x)html output (diff)
work on outputs
Diffstat (limited to 'src/sdp/ao_rgx.d')
-rw-r--r--src/sdp/ao_rgx.d32
1 files changed, 22 insertions, 10 deletions
diff --git a/src/sdp/ao_rgx.d b/src/sdp/ao_rgx.d
index 7d47608..20535d0 100644
--- a/src/sdp/ao_rgx.d
+++ b/src/sdp/ao_rgx.d
@@ -105,15 +105,6 @@ template SiSUrgxInit() {
static block_curly_quote_close = ctRegex!(`^([}]quote)`);
static block_curly_table_open = ctRegex!(`^(table[{].*?$)`);
static block_curly_table_close = ctRegex!(`^([}]table)`);
- /+ 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>.+?)\}#`);
/+ inline markup footnotes endnotes +/
static inline_notes_curly_gen = ctRegex!(`~\{.+?\}~`, "m");
static inline_notes_curly = ctRegex!(`~\{\s*(.+?)\}~`, "mg");
@@ -134,7 +125,7 @@ template SiSUrgxInit() {
static inline_curly_delimiter_close_regular = ctRegex!(`\s*\}~`, "m");
static inline_text_and_note_curly = ctRegex!(`(?P<text>.+?)(?:(?:[~])[{][*+ ]*)(?P<note>.+?)(?:[}][~])`, "mg");
static note_ref = ctRegex!(`^\S+?noteref_([0-9]+)`, "mg"); // {^{73.}^}#noteref_73
- 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");
@@ -178,6 +169,10 @@ template SiSUrgxInit() {
ctRegex!("(am|bg|bn|br|ca|cs|cy|da|de|el|en|eo|es|et|eu|fi|fr|ga|gl|he|hi|hr|hy|ia|is|it|ja|ko|la|lo|lt|lv|ml|mr|nl|no|nn|oc|pl|pt|pt_BR|ro|ru|sa|se|sk|sl|sq|sr|sv|ta|te|th|tk|tr|uk|ur|vi|zh)");
auto language_code_and_filename =
ctRegex!("(am|bg|bn|br|ca|cs|cy|da|de|el|en|eo|es|et|eu|fi|fr|ga|gl|he|hi|hr|hy|ia|is|it|ja|ko|la|lo|lt|lv|ml|mr|nl|no|nn|oc|pl|pt|pt_BR|ro|ru|sa|se|sk|sl|sq|sr|sv|ta|te|th|tk|tr|uk|ur|vi|zh)/[A-Za-z0-9._-].+?[.](?:sst|ssm)$");
+ static newline = ctRegex!("\n", "mg");
+ static space = ctRegex!(`[ ]`, "mg");
+ static two_spaces = ctRegex!(`[ ]{2}`, "mg");
+ static nbsp_char = ctRegex!(`░`, "mg");
static src_pth = ctRegex!(`^(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[tm])$`);
static src_fn =
ctRegex!(`^([a-zA-Z0-9._-]+/)*(?P<fn_src>(?P<fn_base>[a-zA-Z0-9._-]+)[.](?P<fn_src_suffix>ss[tm]))$`);
@@ -207,5 +202,22 @@ template SiSUrgxInit() {
static inline_link_fn_suffix = ctRegex!(`¤(.+?)(\.fnSuffix)`, "mg");
static inline_seg_link = ctRegex!(`(¤)(?:.+?)\.fnSuffix`, "mg");
static mark_internal_site_lnk = ctRegex!(`¤`, "mg");
+ /+ 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}$)`);
}
}