diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2020-04-24 20:00:28 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2020-05-20 11:27:26 -0400 |
commit | cd2dee15516f0537f98bd8ed492ba6024545193c (patch) | |
tree | 7320531dc6af555ad243d31afa670f333dc84c6a /org | |
parent | html, harvests search form, minor misc (diff) |
footnote/endnote fix
Diffstat (limited to 'org')
-rw-r--r-- | org/metaverse.org | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/org/metaverse.org b/org/metaverse.org index c822210..b51f4da 100644 --- a/org/metaverse.org +++ b/org/metaverse.org @@ -5469,7 +5469,7 @@ process and use an_object["table_head"] (then empty it) } stage_reset_note_numbers = false; foreach(n; m) { - if (n.hit.to!string.match(rgx.inline_al_delimiter_open_symbol_star)) { // + if (n.hit.to!string.match(rgx.inline_al_delimiter_open_symbol_star)) { flg_notes_star = true; ++n_foot_sp_asterisk; asterisks_ = "*"; @@ -5478,7 +5478,7 @@ process and use an_object["table_head"] (then empty it) rgx.inline_al_delimiter_open_symbol_star, (mkup.en_a_o ~ replicate(asterisks_, n_foot_sp_asterisk) ~ " ") ); - } else if (n.hit.to!string.match(rgx.inline_al_delimiter_open_symbol_plus)) { // + } else if (n.hit.to!string.match(rgx.inline_al_delimiter_open_symbol_plus)) { flg_notes_plus = true; ++n_foot_sp_plus; plus_ = "*"; @@ -5487,14 +5487,16 @@ process and use an_object["table_head"] (then empty it) rgx.inline_al_delimiter_open_symbol_plus, (mkup.en_a_o ~ replicate(plus_, n_foot_sp_plus) ~ " ") ); - } else if (n.hit.to!string.match(rgx.inline_al_delimiter_open_regular)) { // + } else if (n.hit.to!string.matchFirst(rgx.inline_al_delimiter_open_regular)) { + string _tmp_str = n.hit.to!string; flg_notes_reg = true; - ++n_foot_reg; - n_foot=n_foot_reg; - _tmp_txt ~= n.hit.to!string.replaceFirst( - rgx.inline_al_delimiter_open_regular, - (mkup.en_a_o ~ n_foot.to!string ~ " ") - ); + foreach (q; n.hit.to!string.matchAll(rgx.inline_al_delimiter_open_regular)) { + ++n_foot_reg; + n_foot=n_foot_reg; + _tmp_str = replaceFirst!(m => mkup.en_a_o ~ n_foot.to!string ~ " ") + (_tmp_str, rgx.inline_al_delimiter_open_regular); + } + _tmp_txt ~= _tmp_str; } else { _tmp_txt ~= n.hit.to!string; } @@ -5893,7 +5895,8 @@ static struct ObjInlineMarkup { ObjGenericComposite comp_obj_toc; mixin InternalMarkup; static auto mkup = InlineMarkup(); - char[] heading_toc_ = (obj_["substantive"].dup.strip.to!(char[])).replaceAll(rgx.inline_notes_al, ""); + char[] heading_toc_ = (obj_["substantive"].dup.strip.to!(char[])) + .replaceAll(rgx.inline_notes_al, ""); heading_toc_ = _clean_heading_toc_(heading_toc_); auto attrib=""; string toc_txt_, subtoc_txt_; |