aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/metaverse.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-11-25 22:06:40 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2022-12-23 18:17:41 -0500
commitf6d28b62f0e02b8a88a1832589e203c7a613f45b (patch)
treeb5d6462e45bae998190194784e02b143a83f79a3 /org/metaverse.org
parentgitignore & things nix (diff)
regex review, match speed & compile time, ctregex
- improve match time - add interim fontface identifier marker - improve compile time - remove unused regexs - separate out some specialized output matches
Diffstat (limited to 'org/metaverse.org')
-rw-r--r--org/metaverse.org27
1 files changed, 14 insertions, 13 deletions
diff --git a/org/metaverse.org b/org/metaverse.org
index 3602d34..6cdab4b 100644
--- a/org/metaverse.org
+++ b/org/metaverse.org
@@ -288,6 +288,7 @@ import
import
doc_reform.meta,
doc_reform.meta.defaults,
+ doc_reform.meta.rgx,
doc_reform.meta.metadoc_object_setter,
doc_reform.meta.rgx;
#+END_SRC
@@ -626,10 +627,10 @@ enum DomTags { none, open, close, close_and_open, open_still, }
static auto rgx = RgxI();
static auto mkup = InlineMarkup();
line = replaceAll!(m => mkup.quote_o ~ m[1] ~ mkup.quote_c)(line, rgx.within_quotes);
- line = replaceAll!(m => mkup.mono ~ mkup.ff_o ~ m["text"] ~ mkup.ff_c ~ mkup.mono)(line, rgx.inline_mark_mono);
- line = replaceAll!(m => mkup.cite ~ mkup.ff_o ~ m["text"] ~ mkup.ff_c ~ mkup.cite)(line, rgx.inline_mark_cite);
+ line = replaceAll!(m => "⑆" ~ mkup.mono ~ mkup.ff_o ~ m["text"] ~ mkup.ff_c ~ mkup.mono)(line, rgx.inline_mark_mono);
+ line = replaceAll!(m => "⑆" ~ mkup.cite ~ mkup.ff_o ~ m["text"] ~ mkup.ff_c ~ mkup.cite)(line, rgx.inline_mark_cite);
foreach (regx; [rgx.inline_mark_emphasis, rgx.inline_mark_bold, rgx.inline_mark_underscore, rgx.inline_mark_italics, rgx.inline_mark_superscript, rgx.inline_mark_subscript, rgx.inline_mark_strike, rgx.inline_mark_insert]) {
- line = replaceAll!(m => m["mark"] ~ mkup.ff_o ~ m["text"] ~ mkup.ff_c ~ m["mark"])(line, regx);
+ line = replaceAll!(m => "⑆" ~ m["mark"] ~ mkup.ff_o ~ m["text"] ~ mkup.ff_c ~ m["mark"])(line, regx);
}
return line;
}
@@ -5403,17 +5404,17 @@ if (pith["block_is"] == eN.blk_is.quote) {
if (textline.match(rgx.inline_faces_line)) {
textline = textline
.replaceFirst(rgx.inline_emphasis_line,
- format(q"┃%s%s%s%s%s%s┃",
- mkup.emph, mkup.ff_o, "$1", mkup.ff_c, mkup.emph, "$2"))
+ format(q"┃%s%s%s%s%s%s%s┃",
+ "⑆", mkup.emph, mkup.ff_o, "$1", mkup.ff_c, mkup.emph, "$2"))
.replaceFirst(rgx.inline_bold_line,
- format(q"┃%s%s%s%s%s%s┃",
- mkup.bold, mkup.ff_o, "$1", mkup.ff_c, mkup.bold, "$2"))
+ format(q"┃%s%s%s%s%s%s%s┃",
+ "⑆", mkup.bold, mkup.ff_o, "$1", mkup.ff_c, mkup.bold, "$2"))
.replaceFirst(rgx.inline_underscore_line,
- format(q"┃%s%s%s%s%s%s┃",
- mkup.underscore, mkup.ff_o, "$1", mkup.ff_c, mkup.underscore, "$2"))
+ format(q"┃%s%s%s%s%s%s%s┃",
+ "⑆", mkup.underscore, mkup.ff_o, "$1", mkup.ff_c, mkup.underscore, "$2"))
.replaceFirst(rgx.inline_italics_line,
- format(q"┃%s%s%s%s%s%s┃",
- mkup.italic, mkup.ff_o, "$1", mkup.ff_c, mkup.italic, "$2"));
+ format(q"┃%s%s%s%s%s%s%s┃",
+ "⑆", mkup.italic, mkup.ff_o, "$1", mkup.ff_c, mkup.italic, "$2"));
}
return textline;
}
@@ -6931,7 +6932,7 @@ struct BookIndexReportSection {
bookindex_unordered_hashes.byKey.array
.sort!("toUpper(a) < toUpper(b)", SwapStrategy.stable).release;
foreach (mainkey; mainkeys) {
- write("_0_1 !┨", mainkey, "┣! ");
+ write("_0_1 ⑆!┨", mainkey, "┣! ");
foreach (ref_; bookindex_unordered_hashes[mainkey]["_a"]) {
auto go = ref_.replaceAll(rgx.book_index_go, "$1");
write(" {", ref_, "}#", go, ", ");
@@ -7044,7 +7045,7 @@ struct BookIndexReportSection {
string[dchar] transTable = [' ' : "_"];
foreach (mainkey; mainkeys) {
bi_tmp_tags = [""];
- bi_tmp = mkup.bold ~ mkup.ff_o ~ mainkey ~ mkup.ff_c ~ mkup.bold ~ " ";
+ bi_tmp = "⑆" ~ mkup.bold ~ mkup.ff_o ~ mainkey ~ mkup.ff_c ~ mkup.bold ~ " ";
buffer.clear();
bi_tmp_tags ~= translate(mainkey, transTable);
auto bkidx_lnk(string locs) {