aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-02-04 18:48:25 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2022-02-05 18:26:02 -0500
commit30b6d716f3e4448667ee61bdda044df739d6ad68 (patch)
tree8cbe98e04605f388bc52cb368198833121cf1f8a /src/doc_reform/meta
parentcodegen cgi search removed (using src in org-mode) (diff)
epub, work on
Diffstat (limited to 'src/doc_reform/meta')
-rw-r--r--src/doc_reform/meta/defaults.d2
-rw-r--r--src/doc_reform/meta/metadoc_from_src.d12
-rw-r--r--src/doc_reform/meta/rgx.d3
3 files changed, 10 insertions, 7 deletions
diff --git a/src/doc_reform/meta/defaults.d b/src/doc_reform/meta/defaults.d
index 21c081c..ea969d5 100644
--- a/src/doc_reform/meta/defaults.d
+++ b/src/doc_reform/meta/defaults.d
@@ -184,7 +184,7 @@ template InternalMarkup() {
string mark_internal_site_lnk = "¤";
string nbsp = "░";
string br_line = "┘";
- string br_nl = "┙";
+ string br_newline_inline = "┙";
string br_paragraph = "┚";
string br_obj = "break_obj";
string br_page_line = "┼";
diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d
index 3099d84..6396655 100644
--- a/src/doc_reform/meta/metadoc_from_src.d
+++ b/src/doc_reform/meta/metadoc_from_src.d
@@ -4060,11 +4060,11 @@ template docAbstraction() {
an_object[an_object_key] = an_object[an_object_key]
.replaceFirst(rgx.variable_doc_title_author_date,
(conf_make_meta.meta.title_full
- ~ mkup.br_nl
+ ~ mkup.br_newline_inline
~ conf_make_meta.meta.creator_author
~ " (" ~ (conf_make_meta.meta.date_published.replaceFirst(regex(r"(?:-00)+"),"")) ~ ")"))
.replaceFirst(rgx.variable_doc_title,
- (conf_make_meta.meta.title_full ~ mkup.br_nl))
+ (conf_make_meta.meta.title_full ~ mkup.br_newline_inline))
.replaceFirst(rgx.variable_doc_author,
conf_make_meta.meta.creator_author)
.replaceFirst(rgx.variable_doc_date,
@@ -4075,10 +4075,10 @@ template docAbstraction() {
an_object[an_object_key] = an_object[an_object_key]
.replaceFirst(rgx.variable_doc_title_author_date,
(conf_make_meta.meta.title_full
- ~ mkup.br_nl
+ ~ mkup.br_newline_inline
~ conf_make_meta.meta.creator_author))
.replaceFirst(rgx.variable_doc_title,
- (conf_make_meta.meta.title_full ~ mkup.br_nl))
+ (conf_make_meta.meta.title_full ~ mkup.br_newline_inline))
.replaceFirst(rgx.variable_doc_author,
conf_make_meta.meta.creator_author);
} else if (an_object[an_object_key].match(rgx.variable_doc_title)) {
@@ -4694,6 +4694,7 @@ template docAbstraction() {
obj_txt["munge"] = obj_txt_in
.replaceFirst(rgx.headings, "")
.replaceFirst(rgx.object_number_off_all, "")
+ .replaceFirst(rgx.markup_inline_linebreak, mkup.br_newline_inline)
.strip;
TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"], reset_note_numbers);
debug(munge) {
@@ -4709,7 +4710,8 @@ template docAbstraction() {
@safe auto munge_para()(string obj_txt_in) {
obj_txt["munge"] = (obj_txt_in)
.replaceFirst(rgx.para_attribs, "")
- .replaceFirst(rgx.object_number_off_all, "");
+ .replaceFirst(rgx.object_number_off_all, "")
+ .replaceFirst(rgx.markup_inline_linebreak, mkup.br_newline_inline);
TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]);
debug(munge) {
writeln(__LINE__);
diff --git a/src/doc_reform/meta/rgx.d b/src/doc_reform/meta/rgx.d
index 0d2912d..8c48eac 100644
--- a/src/doc_reform/meta/rgx.d
+++ b/src/doc_reform/meta/rgx.d
@@ -77,6 +77,7 @@ static template spineRgxIn() {
static newline_eol_delimiter = ctRegex!("\n");
static newline_eol_strip_preceding = ctRegex!("[ ]*\n");
static newline_eol_delimiter_only = ctRegex!("^\n");
+ static markup_inline_linebreak = ctRegex!(`\s*\\\\s*`, "m");
static line_delimiter_ws_strip = ctRegex!("[ ]*\n[ ]*");
static para_delimiter = ctRegex!("\n[ ]*\n+");
static table_col_delimiter = ctRegex!("[ ]*\n+", "mg");
@@ -245,7 +246,7 @@ static template spineRgxIn() {
static br_empty_line = ctRegex!(`\n[ ]*\n`, "mg");
static br_newlines_linebreaks = ctRegex!(`[\n┘┙]`, "mg");
static br_line = ctRegex!(`┘`, "mg");
- static br_nl = ctRegex!(`┙`, "mg");
+ static br_newline_inline = ctRegex!(`┙`, "mg");
/+ inline markup footnotes endnotes +/
static inline_notes_al = ctRegex!(`【(?:[*+]\s+|\s*)(.+?)】`, "mg");
static inline_notes_al_special = ctRegex!(`【(?:[*+]\s+)(.+?)】`, "mg"); // TODO remove match when special footnotes are implemented