diff options
39 files changed, 230 insertions, 236 deletions
| diff --git a/org/default_misc.org b/org/default_misc.org index d0328f9..88e724d 100644 --- a/org/default_misc.org +++ b/org/default_misc.org @@ -37,7 +37,7 @@ module doc_reform.meta.defaults;  #+NAME: meta_defaults_template_init_flags  #+BEGIN_SRC d -template spineRgxInitFlags() { +template spineRgxDocStructFlags() {    /+ regex flags +/    @safe static int[string] flags_type_init() {      int[string] flags_type_init = [ diff --git a/org/default_paths.org b/org/default_paths.org index 1ab7a0a..acfdebf 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -45,8 +45,8 @@ import  #+NAME: template_paths_src  #+BEGIN_SRC d  template PodManifest() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    @safe auto PodManifest(O)(      O       _opt_actions,      string  _pth="" @@ -120,9 +120,9 @@ pod  #+NAME: template_paths_src  #+BEGIN_SRC d  template PathMatters() { -  mixin spineRgxInit; +  mixin spineRgxIn;    mixin InternalMarkup; -  static auto rgx  = Rgx(); +  static auto rgx  = RgxI();    static auto mkup = InlineMarkup();    @safe auto PathMatters(O,E)(      O        _opt_actions, @@ -468,8 +468,8 @@ template PathMatters() {  #+NAME: template_paths_src  #+BEGIN_SRC d  template ConfigFilePaths() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    @safe auto ConfigFilePaths(M,E)(      M      _manifested,      E      _env, @@ -642,8 +642,8 @@ filelist for processing [things to ponder]  #+NAME: template_paths_src  #+BEGIN_SRC d  template spinePathsSRC() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    @safe auto spinePathsSRC(D,Fn)(      D   _pwd,      Fn  _fn_src_and_path, @@ -697,8 +697,8 @@ template spinePathsSRC() {  #+NAME: template_paths_pods  #+BEGIN_SRC d  template spinePathsPods() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    string _suffix = ".zip";    auto spinePathsPods(M)(M doc_matters) {      string _base_dir_pod = (doc_matters.output_path.length > 0) @@ -1078,8 +1078,8 @@ template spineOutPathsFnPd() {  #+NAME: template_paths_html  #+BEGIN_SRC d  template spineDocRootTreeHTML() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spineDocRootTreeHTML()(string lng) {      auto lng_pth = spineOutPaths!()("", lng);      string base_dir = "html"; @@ -1144,8 +1144,8 @@ template spineDocRootTreeHTML() {  #+NAME: template_paths_html  #+BEGIN_SRC d  template spinePathsHTML() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spinePathsHTML()(      string output_path_root,      string lng, @@ -1211,8 +1211,8 @@ template spinePathsHTML() {  #+BEGIN_SRC d  template spineUrlsHTML() {    import std.format; -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spineUrlsHTML()(      string url_doc_root,      string lng, @@ -1318,8 +1318,8 @@ template spineUrlsHTML() {  #+NAME: template_paths_epub  #+BEGIN_SRC d  template spinePathsEPUB() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spinePathsEPUB()(      string output_pth_root,      string lng, @@ -1429,8 +1429,8 @@ template spinePathsEPUB() {  #+NAME: template_paths_odf  #+BEGIN_SRC d  template spinePathsODT() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spinePathsODT(M)(      M  doc_matters,    ) { @@ -1499,8 +1499,8 @@ template spinePathsODT() {  #+NAME: template_paths_latex  #+BEGIN_SRC d  template spinePathsLaTeX() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spinePathsLaTeX(M)(      M  doc_matters,    ) { @@ -1535,8 +1535,8 @@ template spinePathsLaTeX() {  #+NAME: template_paths_sqlite  #+BEGIN_SRC d  template spinePathsSQLiteDiscrete() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spinePathsSQLiteDiscrete()(      string output_pth_root,      string lng, @@ -1567,8 +1567,8 @@ template spinePathsSQLiteDiscrete() {  #+NAME: template_paths_sqlite  #+BEGIN_SRC d  template spinePathsSQLite() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spinePathsSQLite(DbN, Po)(      DbN db_name,      Po  output_pth_root, diff --git a/org/default_regex.org b/org/default_regex.org index 02f3e3a..b406741 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -35,8 +35,8 @@ http://dlang.org/phobos/std_regex.html    regex: regular expressions used in sisu document parser  +/  module doc_reform.meta.rgx; -static template spineRgxInit() { -  static struct Rgx { +static template spineRgxIn() { +  static struct RgxI {      <<meta_rgx>>      <<prgmkup_rgx>>    } @@ -366,9 +366,8 @@ http://dlang.org/phobos/std_regex.html    regex: regular expressions used in sisu document parser  +/  module doc_reform.io_out.rgx; -static template spineOutputRgxInit() { -  import doc_reform.io_out.defaults; -  static struct Rgx { +static template spineRgxOut() { +  static struct RgxO {      <<prgmkup_rgx>>      <<sp_ch_xhtml_rgx>>    } diff --git a/org/in_source_files.org b/org/in_source_files.org index 720a47e..5db71b3 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -57,8 +57,8 @@ import  #+BEGIN_SRC d  template readConfigSite() {    @system final auto readConfigSite(C)(C _conf_file_details) { -    mixin spineRgxInit; -    static auto rgx = Rgx(); +    mixin spineRgxIn; +    static auto rgx = RgxI();      string conf_filename = "NONE";      string config_file_str;      string default_config_file_str = format(q"┃ @@ -165,8 +165,8 @@ static template readConfigDoc() {      <<imports_spine>>,      doc_reform.meta.rgx;    @system final auto readConfigDoc(M,E)(M _manifested, E _env) { -    mixin spineRgxInit; -    static auto rgx = Rgx(); +    mixin spineRgxIn; +    static auto rgx = RgxI();      string config_file_str;      string conf_filename = "NONE";      auto _conf_file_details = ConfigFilePaths!()(_manifested, _env); @@ -256,8 +256,8 @@ template spineRawMarkupContent() {      <<imports_std>>,      <<imports_spine>>,      doc_reform.meta.rgx; -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    string[] _images=[];    @safe string[] _extract_images(S)(S content_block) {      string[] images_; @@ -345,7 +345,7 @@ template spineRawMarkupContent() {        char[][] markup_sourcefile_insert_content,        string   fn_src      ) { -      mixin spineRgxInitFlags; +      mixin spineRgxDocStructFlags;        <<meta_inserts_scan>>        foreach (line; markup_sourcefile_insert_content) {          <<meta_inserts_scan_loop>> @@ -358,7 +358,7 @@ template spineRawMarkupContent() {        string   fn_src      ) {        import std.algorithm; -      mixin spineRgxInitFlags; +      mixin spineRgxDocStructFlags;        <<meta_master_doc_scan_for_insert_filenames>>        foreach (line; sourcefile_body_content) {          <<meta_master_doc_scan_for_insert_filenames_loop>> @@ -441,7 +441,7 @@ split is on first match of level A~ (which is required)  #+NAME: meta_markup_source_raw_read_in_file  #+BEGIN_SRC d  @safe string markupSourceReadIn(in string fn_src) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    enforce(      fn_src.match(rgx.src_pth_sst_or_ssm),      "not a dr markup filename: «" ~ diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index 9468614..ce43d84 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -65,8 +65,8 @@ import  import    doc_reform.meta.defaults,    doc_reform.meta.rgx; -mixin spineRgxInit; -static auto rgx = Rgx(); +mixin spineRgxIn; +static auto rgx = RgxI();  mixin InternalMarkup;  static auto mkup = InlineMarkup();  #+END_SRC @@ -362,8 +362,8 @@ template contentYAMLtoSpineStruct() {      M _manifested,      string _identifier    ) { -    mixin spineRgxInit; -    static auto rgx = Rgx(); +    mixin spineRgxIn; +    static auto rgx = RgxI();      confCompositeMakeBuild _mk;      <<yaml_objects_make>>      <<yaml_objects_conf>> @@ -1174,8 +1174,8 @@ static template contentJSONtoSpineStruct() {      doc_reform.meta.rgx;    ConfComposite _struct_composite;    @safe auto contentJSONtoSpineStruct(C,J,M)(C _struct_composite, J _json, M _manifested, string _identifier) { -    mixin spineRgxInit; -    static auto rgx = Rgx(); +    mixin spineRgxIn; +    static auto rgx = RgxI();      debug (json) {        writeln(">> --------------------------- >>");        foreach (tag0; _json.object.byKeyValue) { @@ -1862,9 +1862,9 @@ template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() {      doc_reform.meta.conf_make_meta_structs,      doc_reform.meta.conf_make_meta_json,      doc_reform.meta.rgx; -  mixin spineRgxInit; +  mixin spineRgxIn;    mixin contentJSONtoSpineStruct; -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    @system auto docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct(CCm,Src,M)(      Src     header_src,      CCm     _make_and_meta_struct, diff --git a/org/meta_debugs.org b/org/meta_debugs.org index 71c3d55..b94d5b2 100644 --- a/org/meta_debugs.org +++ b/org/meta_debugs.org @@ -29,7 +29,7 @@ template spineDebugs() {      const S  contents,            T  doc_matters,    ) { -    mixin spineRgxInit; +    mixin spineRgxIn;      mixin InternalMarkup;      <<initialize>>      <<meta_output_debugs>> @@ -71,7 +71,7 @@ import  #+NAME: initialize  #+BEGIN_SRC d -static auto rgx = Rgx(); +static auto rgx = RgxI();  auto markup = InlineMarkup();  string key;  #+END_SRC diff --git a/org/metaverse.org b/org/metaverse.org index c1d4442..d6a21bd 100644 --- a/org/metaverse.org +++ b/org/metaverse.org @@ -44,7 +44,7 @@ template docAbstraction() {      Mf                 manifested,      bool               _new_doc    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();                                                                                  /+ ↓ abstraction init +/      <<abs_init_rest>>                                                                                  /+ abstraction init ↑ +/ @@ -162,7 +162,7 @@ import  #+BEGIN_SRC d  mixin ObjectSetter;  mixin InternalMarkup; -mixin spineRgxInit; +mixin spineRgxIn;  #+END_SRC  *** initialize                                                 :initialize: @@ -429,7 +429,7 @@ enum DomTags { none, open, close, close_and_open, open_still, }    return object_citation_number.ocn_emitter(ocn_status_flag);  }  @safe static auto inline_markup_faces(L)(L line) { -  static auto rgx = Rgx(); +  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); @@ -440,7 +440,7 @@ enum DomTags { none, open, close, close_and_open, open_still, }    return line;  }  @safe static string links_and_images()(string obj_txt) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    static auto mkup = InlineMarkup();    if (obj_txt.match(rgx.smid_inline_url_generic)) {      if ( @@ -497,7 +497,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio    string[string]          tag_in_seg,    string[string][string]  tag_assoc  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if (auto m = an_object["substantive"].match(rgx.inline_link_anchor)) {      if (m.captures[1] !in tag_assoc) {        tag_assoc[(m.captures[1])]["seg_lv4"] = tag_in_seg["seg_lv4"]; @@ -535,7 +535,7 @@ scope(exit) {  #+NAME: abs_init_rest  #+BEGIN_SRC d -mixin spineRgxInitFlags; +mixin spineRgxDocStructFlags;  mixin spineNode;  auto node_para_int_    = node_metadata_para_int;  auto node_para_str_    = node_metadata_para_str; @@ -3146,7 +3146,7 @@ functions used in document abstraction    char[]           line,    int[string]      obj_type_status,  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if (!(line.empty)      && (obj_type_status["ocn_status_off_for_multiple_objects"] == OCN_off_block_status.off)    ) { @@ -3274,7 +3274,7 @@ functions used in document abstraction  #+NAME: abs_functions_block  #+BEGIN_SRC d -  static auto rgx = Rgx(); +  static auto rgx = RgxI();  #+END_SRC  ******* code @@ -3551,7 +3551,7 @@ functions used in document abstraction    return ref string[string]  an_object,    return ref int[string]     obj_type_status  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if (obj_type_status["curly_code"] == TriState.on) {      if (line.matchFirst(rgx.block_curly_code_close)) {        debug(codecurly) {                                    // code (curly) close @@ -3656,7 +3656,7 @@ final string biblio_tag_map_()(string abr) {  ) {    mixin spineBiblio;    auto jsn = BibJsnStr(); -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if (line.matchFirst(rgx.heading_biblio)      && obj_type_status["para"]  != State.on      && obj_type_status["group"] != State.on @@ -3787,7 +3787,7 @@ final string biblio_tag_map_()(string abr) {               string[string]  an_object,    return ref int[string]     obj_type_status  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if (obj_type_status["curly_quote"] == TriState.on) {      if (line.matchFirst(rgx.block_curly_quote_close)) {        debug(quote) {                              // quote (curly) close @@ -3835,7 +3835,7 @@ final string biblio_tag_map_()(string abr) {               string[string]  an_object,    return ref int[string]     obj_type_status  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if (obj_type_status["curly_group"] == State.on) {      if (line.matchFirst(rgx.block_curly_group_close)) {        debug(group) { @@ -3884,7 +3884,7 @@ final string biblio_tag_map_()(string abr) {               string[string]  an_object,    return ref int[string]     obj_type_status  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if (obj_type_status["curly_block"] == TriState.on) {      if (line.matchFirst(rgx.block_curly_block_close)) {        debug(block) {                             // block (curly) close @@ -3935,7 +3935,7 @@ why extra object stuff only in poem/verse?               CMM             conf_make_meta,               string[string]  tag_in_seg,  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if (obj_type_status["curly_poem"] == TriState.on) {      if (line.matchFirst(rgx.block_curly_poem_close)) {        if (an_object_key in an_object @@ -4196,7 +4196,7 @@ you need:    return ref int[string]     obj_type_status,    return ref CMM             conf_make_meta,  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if (obj_type_status["curly_table"] == TriState.on) {      if (line.matchFirst(rgx.block_curly_table_close)) {        debug(table) {                           // table (curly) close @@ -4333,7 +4333,7 @@ process and use an_object["table_head"] (then empty it)      "code block status: closed"    );    assertions_flag_types_block_status_none_or_closed(obj_type_status); -  static auto rgx = Rgx(); +  static auto rgx = RgxI();  #+END_SRC  ****** make: quote block @@ -4674,7 +4674,7 @@ process and use an_object["table_head"] (then empty it)    return ref int[string]     obj_type_status,               B               opt_action,  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if (auto m = line.match(rgx.book_index)) {                                   /+ match book_index +/      debug(bookindexmatch) {        writefln( @@ -4731,7 +4731,7 @@ process and use an_object["table_head"] (then empty it)    return ref Regex!(char)[string]  heading_match_rgx,    return ref int[string]           obj_type_status  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if ((_make_unmarked_headings.length > 2)    && (obj_type_status["make_headings"] == State.off)) {                        /+ headings found +/      debug(headingsfound) { @@ -4883,7 +4883,7 @@ process and use an_object["table_head"] (then empty it)    return ref int[string]     obj_type_status,    return ref CMM             conf_make_meta,  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if (auto m = line.match(rgx.heading)) {                                      /+ heading match +/      ++line_occur["heading"];      obj_type_status["heading"]            = State.on; @@ -5041,7 +5041,7 @@ process and use an_object["table_head"] (then empty it)    return ref int[string]     obj_type_status,    return ref int[string]     line_occur,  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    if (line_occur["para"] == State.off) {      line = font_faces_line(line);      /+ para matches +/ @@ -5094,7 +5094,7 @@ process and use an_object["table_head"] (then empty it)  @safe char[] font_faces_line()(    char[]  textline,  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    static auto mkup = InlineMarkup();    if (textline.match(rgx.inline_faces_line)) {      textline = textline @@ -5132,7 +5132,7 @@ process and use an_object["table_head"] (then empty it)    return ref ObjGenericComposite  table_object,               H                    table_head,  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    table_object.metainfo.is_of_part      = "body";    table_object.metainfo.is_of_section   = "body";    table_object.metainfo.is_of_type      = "block"; @@ -5163,7 +5163,7 @@ process and use an_object["table_head"] (then empty it)    return ref ObjGenericComposite  table_object,    return ref T                    table_array,  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    static auto mng = InlineMarkup();    string _table_substantive;    ulong col_num; @@ -5293,7 +5293,7 @@ process and use an_object["table_head"] (then empty it)    return ref ObjGenericComposite  table_object,    return ref T                    table_substantive,  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    static auto munge = ObjInlineMarkupMunge();    string[] _table_rows = (table_substantive).split(rgx.table_row_delimiter);    string[] _table_cols; @@ -5315,7 +5315,7 @@ process and use an_object["table_head"] (then empty it)    return ref ObjGenericComposite  table_object,    return ref T                    table_substantive,  ) { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    static auto munge = ObjInlineMarkupMunge();    string[] _table_rows = (table_substantive).split(rgx.table_row_delimiter_special);    string[] _table_cols; @@ -5396,7 +5396,7 @@ process and use an_object["table_head"] (then empty it)    int n_foot, n_foot_reg, n_foot_sp_asterisk, n_foot_sp_plus;    string asterisks_, plus_;    string obj_txt_out, tail, note; -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    static auto mkup = InlineMarkup();    int stage_reset_note_numbers = true;    private auto initialize_note_numbers() { @@ -5762,7 +5762,7 @@ process and use an_object["table_head"] (then empty it)  #+NAME: meta_emitters_obj_inline_markup  #+BEGIN_SRC d  static struct ObjInlineMarkup { -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    static auto munge = ObjInlineMarkupMunge();    string[string] obj_txt;    static string anchor_tag = ""; @@ -6480,7 +6480,7 @@ struct BookIndexNuggetHash {          );        }      } -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (!bookindex_section.empty) {        auto bi_main_terms_split_arr          = bookindex_section.split(rgx.bi_main_terms_split); @@ -6571,7 +6571,7 @@ struct BookIndexReportIndent {  #+BEGIN_SRC d  struct BookIndexReportSection {    int  mkn, skn; -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    static auto munge = ObjInlineMarkupMunge();  #+END_SRC @@ -6788,7 +6788,7 @@ struct NotesSection {    string[string] object_notes;    int previous_count;    int mkn; -  static auto rgx = Rgx(); +  static auto rgx = RgxI();  #+END_SRC  ***** { gather notes for endnote section struct open @@ -7142,7 +7142,7 @@ struct NodeStructureMetadata {    int lv, lv0, lv1, lv2, lv3, lv4, lv5, lv6, lv7;    int obj_cite_digit;    int[string] p_; // p_ parent_ -  static auto rgx = Rgx(); +  static auto rgx = RgxI();  #+END_SRC  ****** node metadata emitter diff --git a/org/out_harvest_metadata.org b/org/out_harvest_metadata.org index ba62bd1..c130f9f 100644 --- a/org/out_harvest_metadata.org +++ b/org/out_harvest_metadata.org @@ -124,7 +124,6 @@ module doc_reform.meta.metadoc_harvests_topics;      doc_reform.meta.rgx;    mixin spineHarvest;    mixin InternalMarkup; -  mixin spineRgxInit;  template spineMetaDocHarvestsTopics() {    static auto mkup = InlineMarkup();    void spineMetaDocHarvestsTopics(H,M,O)( @@ -456,7 +455,6 @@ module doc_reform.meta.metadoc_harvests_authors;      doc_reform.meta.rgx;    mixin spineHarvest;    mixin InternalMarkup; -  mixin spineRgxInit;  template spineMetaDocHarvestsAuthors() {    static auto mkup = InlineMarkup();    void spineMetaDocHarvestsAuthors(H,M,O)( diff --git a/org/out_latex.org b/org/out_latex.org index 9424078..38defe1 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -25,8 +25,8 @@ module doc_reform.io_out.latex;  template outputLaTeX() {    <<output_latex_imports>>    mixin InternalMarkup; // watch -  mixin spineOutputRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxOut; +  static auto rgx = RgxO();    mixin spineLanguageCodes;    auto lang = Lang();    <<output_latex_shared>> diff --git a/org/out_odt.org b/org/out_odt.org index c2ec6e0..b4a8acd 100644 --- a/org/out_odt.org +++ b/org/out_odt.org @@ -49,17 +49,17 @@  module doc_reform.io_out.odt;  template formatODT() {    <<output_imports>> -  mixin spineOutputRgxInit; +  mixin spineRgxOut;    struct formatODT { -    static auto rgx = Rgx(); +    static auto rgx = RgxO();      <<odt_format_objects>>    }  }  template outputODT() {    <<output_imports>>    mixin InternalMarkup; -  mixin spineOutputRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxOut; +  static auto rgx = RgxO();    // mixin outputXmlODT;    <<output_odt_variable_content_xml>>    <<output_odt_variable_manifest_xml>> @@ -149,7 +149,7 @@ template outputODT() {  #+NAME: odt_format_objects  #+BEGIN_SRC d  @safe string _footnotes()(string _txt) { -  static auto rgx = Rgx(); +  static auto rgx = RgxO();    _txt = _txt.replaceAll(      rgx.inline_notes_al_regular_number_note,      format(q"┃<text:note text:id="ftn%s" text:note-class="footnote"> diff --git a/org/out_sqlite.org b/org/out_sqlite.org index 14e3ab0..3bd18e5 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -27,9 +27,9 @@ module doc_reform.io_out.sqlite;  <<output_imports>>  import d2sqlite3;  import std.typecons : Nullable; -mixin spineOutputRgxInit; +mixin spineRgxOut;  mixin InternalMarkup; -static auto rgx = Rgx(); +static auto rgx = RgxO();  static auto mkup = InlineMarkup();  long _metadata_tid_lastrowid;  template SQLiteHubBuildTablesAndPopulate() { @@ -141,7 +141,7 @@ template SQLiteFormatAndLoadObject() {    auto SQLiteFormatAndLoadObject(M)(      M    doc_matters,    ) { -    mixin spineOutputRgxInit; +    mixin spineRgxOut;      struct sqlite_format_and_load_objects {        <<sanitize_text_for_search>>        <<sanitize_and_munge_inline_html>> diff --git a/org/out_src_pod.org b/org/out_src_pod.org index 7727f36..a9f4d7b 100644 --- a/org/out_src_pod.org +++ b/org/out_src_pod.org @@ -62,14 +62,14 @@ import  debug(asserts) {    // static assert(is(typeof(doc_matters) == tuple));  } -mixin spineOutputRgxInit; +mixin spineRgxOut;  string pwd = doc_matters.env.pwd;  auto src_path_info = doc_matters.src_path_info;  auto pth_dr_doc_src = doc_matters.src_path_info;  auto pths_pod = spinePathsPods!()(doc_matters);  mixin spineLanguageCodes;  auto lang = Lang(); -static auto rgx = Rgx(); +static auto rgx = RgxO();  assert (doc_matters.src.filename.match(rgx.src_fn));  #+END_SRC diff --git a/org/out_xmls.org b/org/out_xmls.org index b5107f2..9f51e84 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -25,9 +25,9 @@  module doc_reform.io_out.xmls;  template outputXHTMLs() {    <<output_imports>> -  mixin spineOutputRgxInit; +  mixin spineRgxOut;    struct outputXHTMLs { -    static auto rgx = Rgx(); +    static auto rgx = RgxO();      <<xhtml_format_objects>>      <<xhtml_format_objects_code>>    } @@ -1526,9 +1526,9 @@ template outputHTML() {    const        D    doc_abstraction,                 M    doc_matters,  ) { -  mixin spineOutputRgxInit; +  mixin spineRgxOut;    auto xhtml_format = outputXHTMLs(); -  static auto rgx = Rgx(); +  static auto rgx = RgxO();    string[] doc_html;    string[] doc;    string suffix = ".html"; @@ -1762,8 +1762,8 @@ template outputHTML() {    const D    doc_abstraction,          M    doc_matters,  ) { -  mixin spineOutputRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxOut; +  static auto rgx = RgxO();    auto xhtml_format = outputXHTMLs();    string[][string] doc_html;    string[][string] doc_html_endnotes; @@ -2067,8 +2067,8 @@ template outputHTML() {    debug(asserts) {      static assert(is(typeof(doc_html)      == string[][string]));    } -  mixin spineOutputRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxOut; +  static auto rgx = RgxO();    auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language);    auto xhtml_format = outputXHTMLs();    auto m = doc_matters.src.filename.matchFirst(rgx.src_fn); @@ -2333,7 +2333,7 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container">  @safe string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) {    enum DomTags { none, open, close, close_and_open, open_still, }    auto markup = InlineMarkup(); -  static auto rgx = Rgx(); +  static auto rgx = RgxO();    string toc =format("<html xmlns=\"http://www.w3.org/1999/xhtml\"      xmlns:epub=\"http://www.idpf.org/2007/ops\">  <head> @@ -2422,7 +2422,7 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container">    int counter = 0;    string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO shared elsewhere    auto markup = InlineMarkup(); -  static auto rgx = Rgx(); +  static auto rgx = RgxO();    enum DomTags { none, open, close, close_and_open, open_still, }    string toc = format(q"┃<?xml version='1.0' encoding='utf-8'?>  <ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1"> @@ -2518,9 +2518,9 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container">    const D    doc_abstraction,          I    doc_matters,  ) { -  mixin spineOutputRgxInit; +  mixin spineRgxOut;    auto xhtml_format = outputXHTMLs(); -  static auto rgx = Rgx(); +  static auto rgx = RgxO();    string[] doc;    string segment_filename;    string[] top_level_headings = ["","","",""]; @@ -2883,7 +2883,7 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container">      static assert(is(typeof(epub_write.oebps_toc_ncx)          == string));      static assert(is(typeof(epub_write.oebps_content_opf)      == string));    } -  static auto rgx = Rgx(); +  static auto rgx = RgxO();    auto pth_epub3 = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language);    auto xhtml_format = outputXHTMLs();    /+ zip file +/ diff --git a/org/output_hub.org b/org/output_hub.org index b2985be..c683742 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -32,10 +32,10 @@ template outputHub() {      const D doc_abstraction,      I doc_matters    ) { -    mixin spineOutputRgxInit; +    mixin spineRgxOut;      mixin Msg;      auto msg = Msg!()(doc_matters); -    static auto rgx = Rgx(); +    static auto rgx = RgxO();      enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff }      void Scheduled(D,I)(int sched, D doc_abstraction, I doc_matters) {        auto msg = Msg!()(doc_matters); @@ -59,8 +59,8 @@ template outputHub() {  template outputHubOp() {    <<output_imports>>    @system void outputHubOp(E,O)(E env, O opt_action) { -    mixin spineOutputRgxInit; -    static auto rgx = Rgx(); +    mixin spineRgxOut; +    static auto rgx = RgxO();      <<output_options_op>>    }  } diff --git a/org/spine.org b/org/spine.org index 58d76ed..72d3b1d 100644 --- a/org/spine.org +++ b/org/spine.org @@ -281,10 +281,10 @@ mixin CompileTimeInfo;  #+NAME: spine_mixin  #+BEGIN_SRC d -mixin spineRgxInit; +mixin spineRgxIn;  mixin contentJSONtoSpineStruct;  mixin spineBiblio; -mixin spineRgxInitFlags; +mixin spineRgxDocStructFlags;  mixin outputHub;  #+END_SRC @@ -302,7 +302,7 @@ auto hvst = spineHarvest!();  string flag_action;  string arg_unrecognized;  enum dAM { abstraction, matters } -static auto rgx = Rgx(); +static auto rgx = RgxI();  #+END_SRC  *** scope (run complete)                                              :scope: @@ -1181,7 +1181,7 @@ template spineAbstraction() {    enum headBody { header, body_content, insert_file_list, image_list }    enum makeMeta { make, meta }    enum docAbst  { doc_abstract_obj, doc_has } -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    @system auto spineAbstraction(E,P,O,M,S)(      E _env,      P program_info, diff --git a/src/doc_reform/io_in/paths_source.d b/src/doc_reform/io_in/paths_source.d index f3b1e8a..85738d1 100644 --- a/src/doc_reform/io_in/paths_source.d +++ b/src/doc_reform/io_in/paths_source.d @@ -14,8 +14,8 @@ import    doc_reform.meta.defaults,    doc_reform.meta.rgx;  template PodManifest() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    @safe auto PodManifest(O)(      O       _opt_actions,      string  _pth="" @@ -67,9 +67,9 @@ template PodManifest() {    }  }  template PathMatters() { -  mixin spineRgxInit; +  mixin spineRgxIn;    mixin InternalMarkup; -  static auto rgx  = Rgx(); +  static auto rgx  = RgxI();    static auto mkup = InlineMarkup();    @safe auto PathMatters(O,E)(      O        _opt_actions, @@ -409,8 +409,8 @@ template PathMatters() {    }  }  template ConfigFilePaths() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    @safe auto ConfigFilePaths(M,E)(      M      _manifested,      E      _env, @@ -531,8 +531,8 @@ template ConfigFilePaths() {    }  }  template spinePathsSRC() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    @safe auto spinePathsSRC(D,Fn)(      D   _pwd,      Fn  _fn_src_and_path, @@ -582,8 +582,8 @@ template spinePathsSRC() {  template spinePathsPods() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    string _suffix = ".zip";    auto spinePathsPods(M)(M doc_matters) {      string _base_dir_pod = (doc_matters.output_path.length > 0) diff --git a/src/doc_reform/io_in/read_config_files.d b/src/doc_reform/io_in/read_config_files.d index 4889e4f..9daf362 100644 --- a/src/doc_reform/io_in/read_config_files.d +++ b/src/doc_reform/io_in/read_config_files.d @@ -13,8 +13,8 @@ import  template readConfigSite() {    @system final auto readConfigSite(C)(C _conf_file_details) { -    mixin spineRgxInit; -    static auto rgx = Rgx(); +    mixin spineRgxIn; +    static auto rgx = RgxI();      string conf_filename = "NONE";      string config_file_str;      string default_config_file_str = format(q"┃ @@ -117,8 +117,8 @@ static template readConfigDoc() {      doc_reform.io_in.paths_source,      doc_reform.meta.rgx;    @system final auto readConfigDoc(M,E)(M _manifested, E _env) { -    mixin spineRgxInit; -    static auto rgx = Rgx(); +    mixin spineRgxIn; +    static auto rgx = RgxI();      string config_file_str;      string conf_filename = "NONE";      auto _conf_file_details = ConfigFilePaths!()(_manifested, _env); diff --git a/src/doc_reform/io_in/read_source_files.d b/src/doc_reform/io_in/read_source_files.d index 041ec91..7d826a9 100644 --- a/src/doc_reform/io_in/read_source_files.d +++ b/src/doc_reform/io_in/read_source_files.d @@ -11,8 +11,8 @@ template spineRawMarkupContent() {      doc_reform.meta,      doc_reform.io_in.paths_source,      doc_reform.meta.rgx; -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    string[] _images=[];    @safe string[] _extract_images(S)(S content_block) {      string[] images_; @@ -125,7 +125,7 @@ template spineRawMarkupContent() {        return source_line_arr;      }      @safe string markupSourceReadIn(in string fn_src) { -      static auto rgx = Rgx(); +      static auto rgx = RgxI();        enforce(          fn_src.match(rgx.src_pth_sst_or_ssm),          "not a dr markup filename: «" ~ @@ -173,7 +173,7 @@ template spineRawMarkupContent() {        char[][] markup_sourcefile_insert_content,        string   fn_src      ) { -      mixin spineRgxInitFlags; +      mixin spineRgxDocStructFlags;        char[][] contents_insert;        int[string] type1 = flags_type_init;        auto fn_pth_full = fn_src.match(rgx.src_pth_sst_or_ssm); @@ -259,7 +259,7 @@ template spineRawMarkupContent() {        string   fn_src      ) {        import std.algorithm; -      mixin spineRgxInitFlags; +      mixin spineRgxDocStructFlags;        char[][] contents;        int[string] type = flags_type_init;        auto fn_pth_full = fn_src.match(rgx.src_pth_sst_or_ssm); diff --git a/src/doc_reform/io_out/epub3.d b/src/doc_reform/io_out/epub3.d index f8f5ba4..9d29968 100644 --- a/src/doc_reform/io_out/epub3.d +++ b/src/doc_reform/io_out/epub3.d @@ -131,7 +131,7 @@ template outputEPub3() {    @safe string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) {      enum DomTags { none, open, close, close_and_open, open_still, }      auto markup = InlineMarkup(); -    static auto rgx = Rgx(); +    static auto rgx = RgxO();      string toc =format("<html xmlns=\"http://www.w3.org/1999/xhtml\"        xmlns:epub=\"http://www.idpf.org/2007/ops\">    <head> @@ -211,7 +211,7 @@ template outputEPub3() {      int counter = 0;      string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO shared elsewhere      auto markup = InlineMarkup(); -    static auto rgx = Rgx(); +    static auto rgx = RgxO();      enum DomTags { none, open, close, close_and_open, open_still, }      string toc = format(q"┃<?xml version='1.0' encoding='utf-8'?>    <ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1"> @@ -301,9 +301,9 @@ template outputEPub3() {      const D    doc_abstraction,            I    doc_matters,    ) { -    mixin spineOutputRgxInit; +    mixin spineRgxOut;      auto xhtml_format = outputXHTMLs(); -    static auto rgx = Rgx(); +    static auto rgx = RgxO();      string[] doc;      string segment_filename;      string[] top_level_headings = ["","","",""]; @@ -618,7 +618,7 @@ template outputEPub3() {        static assert(is(typeof(epub_write.oebps_toc_ncx)          == string));        static assert(is(typeof(epub_write.oebps_content_opf)      == string));      } -    static auto rgx = Rgx(); +    static auto rgx = RgxO();      auto pth_epub3 = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language);      auto xhtml_format = outputXHTMLs();      /+ zip file +/ diff --git a/src/doc_reform/io_out/html.d b/src/doc_reform/io_out/html.d index 637b007..ee530ca 100644 --- a/src/doc_reform/io_out/html.d +++ b/src/doc_reform/io_out/html.d @@ -17,9 +17,9 @@ template outputHTML() {      const        D    doc_abstraction,                   M    doc_matters,    ) { -    mixin spineOutputRgxInit; +    mixin spineRgxOut;      auto xhtml_format = outputXHTMLs(); -    static auto rgx = Rgx(); +    static auto rgx = RgxO();      string[] doc_html;      string[] doc;      string suffix = ".html"; @@ -210,8 +210,8 @@ template outputHTML() {      const D    doc_abstraction,            M    doc_matters,    ) { -    mixin spineOutputRgxInit; -    static auto rgx = Rgx(); +    mixin spineRgxOut; +    static auto rgx = RgxO();      auto xhtml_format = outputXHTMLs();      string[][string] doc_html;      string[][string] doc_html_endnotes; @@ -467,8 +467,8 @@ template outputHTML() {      debug(asserts) {        static assert(is(typeof(doc_html)      == string[][string]));      } -    mixin spineOutputRgxInit; -    static auto rgx = Rgx(); +    mixin spineRgxOut; +    static auto rgx = RgxO();      auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language);      auto xhtml_format = outputXHTMLs();      auto m = doc_matters.src.filename.matchFirst(rgx.src_fn); diff --git a/src/doc_reform/io_out/hub.d b/src/doc_reform/io_out/hub.d index df3d28c..e275348 100644 --- a/src/doc_reform/io_out/hub.d +++ b/src/doc_reform/io_out/hub.d @@ -15,10 +15,10 @@ template outputHub() {      const D doc_abstraction,      I doc_matters    ) { -    mixin spineOutputRgxInit; +    mixin spineRgxOut;      mixin Msg;      auto msg = Msg!()(doc_matters); -    static auto rgx = Rgx(); +    static auto rgx = RgxO();      enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff }      void Scheduled(D,I)(int sched, D doc_abstraction, I doc_matters) {        auto msg = Msg!()(doc_matters); @@ -118,8 +118,8 @@ template outputHubOp() {      doc_reform.io_out.create_zip_file,      doc_reform.io_out.paths_output;    @system void outputHubOp(E,O)(E env, O opt_action) { -    mixin spineOutputRgxInit; -    static auto rgx = Rgx(); +    mixin spineRgxOut; +    static auto rgx = RgxO();      if ((opt_action.sqlite_db_drop)) {        if ((opt_action.verbose)) {          writeln("sqlite drop db..."); diff --git a/src/doc_reform/io_out/latex.d b/src/doc_reform/io_out/latex.d index b8e33f4..ff5b0df 100644 --- a/src/doc_reform/io_out/latex.d +++ b/src/doc_reform/io_out/latex.d @@ -8,8 +8,8 @@ template outputLaTeX() {      std.uri,      std.conv : to;    mixin InternalMarkup; // watch -  mixin spineOutputRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxOut; +  static auto rgx = RgxO();    mixin spineLanguageCodes;    auto lang = Lang();        auto paper() { diff --git a/src/doc_reform/io_out/odt.d b/src/doc_reform/io_out/odt.d index 67b34ba..09ff63d 100644 --- a/src/doc_reform/io_out/odt.d +++ b/src/doc_reform/io_out/odt.d @@ -12,9 +12,9 @@ template formatODT() {      doc_reform.io_out.create_zip_file,      doc_reform.io_out.xmls,      doc_reform.io_out.xmls_css; -  mixin spineOutputRgxInit; +  mixin spineRgxOut;    struct formatODT { -    static auto rgx = Rgx(); +    static auto rgx = RgxO();      @safe string _tags(O)(const O obj) {        string _tags = "";        if (obj.tags.anchor_tags.length > 0) { @@ -56,7 +56,7 @@ template formatODT() {        return _on;      }      @safe string _footnotes()(string _txt) { -      static auto rgx = Rgx(); +      static auto rgx = RgxO();        _txt = _txt.replaceAll(          rgx.inline_notes_al_regular_number_note,          format(q"┃<text:note text:id="ftn%s" text:note-class="footnote"> @@ -603,8 +603,8 @@ template outputODT() {      doc_reform.io_out.xmls,      doc_reform.io_out.xmls_css;    mixin InternalMarkup; -  mixin spineOutputRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxOut; +  static auto rgx = RgxO();    // mixin outputXmlODT;    @safe string odt_head(I)(I doc_matters) {      string _has_tables = format(q"┃ diff --git a/src/doc_reform/io_out/paths_output.d b/src/doc_reform/io_out/paths_output.d index 23c4624..f01f88b 100644 --- a/src/doc_reform/io_out/paths_output.d +++ b/src/doc_reform/io_out/paths_output.d @@ -82,8 +82,8 @@ template spineOutPathsFnPd() {  }  template spineDocRootTreeHTML() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spineDocRootTreeHTML()(string lng) {      auto lng_pth = spineOutPaths!()("", lng);      string base_dir = "html"; @@ -142,8 +142,8 @@ template spineDocRootTreeHTML() {    }  }  template spinePathsHTML() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spinePathsHTML()(      string output_path_root,      string lng, @@ -203,8 +203,8 @@ template spinePathsHTML() {  }  template spineUrlsHTML() {    import std.format; -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spineUrlsHTML()(      string url_doc_root,      string lng, @@ -304,8 +304,8 @@ template spineUrlsHTML() {    }  }  template spinePathsEPUB() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spinePathsEPUB()(      string output_pth_root,      string lng, @@ -409,8 +409,8 @@ template spinePathsEPUB() {    }  }  template spinePathsODT() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spinePathsODT(M)(      M  doc_matters,    ) { @@ -473,8 +473,8 @@ template spinePathsODT() {    }  }  template spinePathsLaTeX() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spinePathsLaTeX(M)(      M  doc_matters,    ) { @@ -502,8 +502,8 @@ template spinePathsLaTeX() {    }  }  template spinePathsSQLiteDiscrete() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spinePathsSQLiteDiscrete()(      string output_pth_root,      string lng, @@ -528,8 +528,8 @@ template spinePathsSQLiteDiscrete() {    }  }  template spinePathsSQLite() { -  mixin spineRgxInit; -  static auto rgx = Rgx(); +  mixin spineRgxIn; +  static auto rgx = RgxI();    auto spinePathsSQLite(DbN, Po)(      DbN db_name,      Po  output_pth_root, diff --git a/src/doc_reform/io_out/rgx.d b/src/doc_reform/io_out/rgx.d index 4d0801c..32d457d 100644 --- a/src/doc_reform/io_out/rgx.d +++ b/src/doc_reform/io_out/rgx.d @@ -2,9 +2,8 @@    regex: regular expressions used in sisu document parser  +/  module doc_reform.io_out.rgx; -static template spineOutputRgxInit() { -  import doc_reform.io_out.defaults; -  static struct Rgx { +static template spineRgxOut() { +  static struct RgxO {      static newline                                        = ctRegex!("\n", "mg");      static space                                          = ctRegex!(`[ ]`, "mg");      static spaces_keep                                    = ctRegex!(`(?P<keep_spaces>^[ ]+|[ ]{2,})`, "mg"); // code, verse, block diff --git a/src/doc_reform/io_out/source_pod.d b/src/doc_reform/io_out/source_pod.d index 59746de..5a96ed6 100644 --- a/src/doc_reform/io_out/source_pod.d +++ b/src/doc_reform/io_out/source_pod.d @@ -14,14 +14,14 @@ template spinePod() {      debug(asserts) {        // static assert(is(typeof(doc_matters) == tuple));      } -    mixin spineOutputRgxInit; +    mixin spineRgxOut;      string pwd = doc_matters.env.pwd;      auto src_path_info = doc_matters.src_path_info;      auto pth_dr_doc_src = doc_matters.src_path_info;      auto pths_pod = spinePathsPods!()(doc_matters);      mixin spineLanguageCodes;      auto lang = Lang(); -    static auto rgx = Rgx(); +    static auto rgx = RgxO();      assert (doc_matters.src.filename.match(rgx.src_fn));      @system auto pod_archive(Z)(        string _source_type, diff --git a/src/doc_reform/io_out/sqlite.d b/src/doc_reform/io_out/sqlite.d index e83a75f..d24fc00 100644 --- a/src/doc_reform/io_out/sqlite.d +++ b/src/doc_reform/io_out/sqlite.d @@ -6,9 +6,9 @@ import    std.conv : to;  import d2sqlite3;  import std.typecons : Nullable; -mixin spineOutputRgxInit; +mixin spineRgxOut;  mixin InternalMarkup; -static auto rgx = Rgx(); +static auto rgx = RgxO();  static auto mkup = InlineMarkup();  long _metadata_tid_lastrowid;  template SQLiteHubBuildTablesAndPopulate() { @@ -138,7 +138,7 @@ template SQLiteFormatAndLoadObject() {    auto SQLiteFormatAndLoadObject(M)(      M    doc_matters,    ) { -    mixin spineOutputRgxInit; +    mixin spineRgxOut;      struct sqlite_format_and_load_objects {        string generic_munge_sanitize_text_for_search(          string _txt, diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d index 1b038a9..b640d81 100644 --- a/src/doc_reform/io_out/xmls.d +++ b/src/doc_reform/io_out/xmls.d @@ -12,9 +12,9 @@ template outputXHTMLs() {      doc_reform.io_out.create_zip_file,      doc_reform.io_out.xmls,      doc_reform.io_out.xmls_css; -  mixin spineOutputRgxInit; +  mixin spineRgxOut;    struct outputXHTMLs { -    static auto rgx = Rgx(); +    static auto rgx = RgxO();      @safe string div_delimit(                   string  part,        return ref string  previous_part diff --git a/src/doc_reform/meta/conf_make_meta_json.d b/src/doc_reform/meta/conf_make_meta_json.d index 4fc3bc4..a6214ce 100644 --- a/src/doc_reform/meta/conf_make_meta_json.d +++ b/src/doc_reform/meta/conf_make_meta_json.d @@ -21,8 +21,8 @@ static template contentJSONtoSpineStruct() {      doc_reform.meta.rgx;    ConfComposite _struct_composite;    @safe auto contentJSONtoSpineStruct(C,J,M)(C _struct_composite, J _json, M _manifested, string _identifier) { -    mixin spineRgxInit; -    static auto rgx = Rgx(); +    mixin spineRgxIn; +    static auto rgx = RgxI();      debug (json) {        writeln(">> --------------------------- >>");        foreach (tag0; _json.object.byKeyValue) { diff --git a/src/doc_reform/meta/conf_make_meta_structs.d b/src/doc_reform/meta/conf_make_meta_structs.d index 683d355..7698388 100644 --- a/src/doc_reform/meta/conf_make_meta_structs.d +++ b/src/doc_reform/meta/conf_make_meta_structs.d @@ -12,8 +12,8 @@ import  import    doc_reform.meta.defaults,    doc_reform.meta.rgx; -mixin spineRgxInit; -static auto rgx = Rgx(); +mixin spineRgxIn; +static auto rgx = RgxI();  mixin InternalMarkup;  static auto mkup = InlineMarkup();  @safe string url_markup(string line) { diff --git a/src/doc_reform/meta/conf_make_meta_yaml.d b/src/doc_reform/meta/conf_make_meta_yaml.d index 5355a58..2efd515 100644 --- a/src/doc_reform/meta/conf_make_meta_yaml.d +++ b/src/doc_reform/meta/conf_make_meta_yaml.d @@ -26,8 +26,8 @@ template contentYAMLtoSpineStruct() {      M _manifested,      string _identifier    ) { -    mixin spineRgxInit; -    static auto rgx = Rgx(); +    mixin spineRgxIn; +    static auto rgx = RgxI();      confCompositeMakeBuild _mk;      /+ make ------------------------------------------------------------------- +/      if ("make" in _yaml @@ -829,9 +829,9 @@ template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() {      doc_reform.meta.conf_make_meta_structs,      doc_reform.meta.conf_make_meta_json,      doc_reform.meta.rgx; -  mixin spineRgxInit; +  mixin spineRgxIn;    mixin contentJSONtoSpineStruct; -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    @system auto docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct(CCm,Src,M)(      Src     header_src,      CCm     _make_and_meta_struct, diff --git a/src/doc_reform/meta/defaults.d b/src/doc_reform/meta/defaults.d index eff632e..63eb5fa 100644 --- a/src/doc_reform/meta/defaults.d +++ b/src/doc_reform/meta/defaults.d @@ -2,7 +2,7 @@    default settings  +/  module doc_reform.meta.defaults; -template spineRgxInitFlags() { +template spineRgxDocStructFlags() {    /+ regex flags +/    @safe static int[string] flags_type_init() {      int[string] flags_type_init = [ diff --git a/src/doc_reform/meta/doc_debugs.d b/src/doc_reform/meta/doc_debugs.d index 2815e4f..9ab9ea7 100644 --- a/src/doc_reform/meta/doc_debugs.d +++ b/src/doc_reform/meta/doc_debugs.d @@ -25,9 +25,9 @@ template spineDebugs() {      const S  contents,            T  doc_matters,    ) { -    mixin spineRgxInit; +    mixin spineRgxIn;      mixin InternalMarkup; -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      auto markup = InlineMarkup();      string key;      debug(parent) { diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d index e18a19e..90fec4a 100644 --- a/src/doc_reform/meta/metadoc.d +++ b/src/doc_reform/meta/metadoc.d @@ -21,15 +21,15 @@ template spineAbstraction() {      doc_reform.io_in.read_config_files,      doc_reform.io_in.read_source_files,      doc_reform.io_out.hub; -  mixin spineRgxInit; +  mixin spineRgxIn;    mixin contentJSONtoSpineStruct;    mixin spineBiblio; -  mixin spineRgxInitFlags; +  mixin spineRgxDocStructFlags;    mixin outputHub;    enum headBody { header, body_content, insert_file_list, image_list }    enum makeMeta { make, meta }    enum docAbst  { doc_abstract_obj, doc_has } -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    @system auto spineAbstraction(E,P,O,M,S)(      E _env,      P program_info, diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d index 3c58212..3ce25b5 100644 --- a/src/doc_reform/meta/metadoc_from_src.d +++ b/src/doc_reform/meta/metadoc_from_src.d @@ -20,7 +20,7 @@ template docAbstraction() {                                                                                  /+ ↓ abstraction mixins +/    mixin ObjectSetter;    mixin InternalMarkup; -  mixin spineRgxInit; +  mixin spineRgxIn;                                                                                  /+ ↓ abstraction struct init +/    /+ initialize +/    ObjGenericComposite[] the_table_of_contents_section; @@ -257,7 +257,7 @@ template docAbstraction() {      return object_citation_number.ocn_emitter(ocn_status_flag);    }    @safe static auto inline_markup_faces(L)(L line) { -    static auto rgx = Rgx(); +    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); @@ -268,7 +268,7 @@ template docAbstraction() {      return line;    }    @safe static string links_and_images()(string obj_txt) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      static auto mkup = InlineMarkup();      if (obj_txt.match(rgx.smid_inline_url_generic)) {        if ( @@ -319,7 +319,7 @@ template docAbstraction() {      string[string]          tag_in_seg,      string[string][string]  tag_assoc    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (auto m = an_object["substantive"].match(rgx.inline_link_anchor)) {        if (m.captures[1] !in tag_assoc) {          tag_assoc[(m.captures[1])]["seg_lv4"] = tag_in_seg["seg_lv4"]; @@ -338,7 +338,7 @@ template docAbstraction() {      Mf                 manifested,      bool               _new_doc    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();                                                                                  /+ ↓ abstraction init +/      scope(success) {      } @@ -355,7 +355,7 @@ template docAbstraction() {        previous_length=0;        reset_note_numbers=true;      } -    mixin spineRgxInitFlags; +    mixin spineRgxDocStructFlags;      mixin spineNode;      auto node_para_int_    = node_metadata_para_int;      auto node_para_str_    = node_metadata_para_str; @@ -2439,7 +2439,7 @@ template docAbstraction() {      char[]           line,      int[string]      obj_type_status,    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (!(line.empty)        && (obj_type_status["ocn_status_off_for_multiple_objects"] == OCN_off_block_status.off)      ) { @@ -2540,7 +2540,7 @@ template docAbstraction() {      return ref uint[string]   dochas,      return ref string[string] object_number_poem    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (auto m = line.matchFirst(rgx.block_curly_code_open)) {        dochas["codeblock"]++;        an_object["lang"]              = ""; @@ -2725,7 +2725,7 @@ template docAbstraction() {                 string[string]  an_object,      return ref int[string]     obj_type_status    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (obj_type_status["curly_quote"] == TriState.on) {        if (line.matchFirst(rgx.block_curly_quote_close)) {          debug(quote) {                              // quote (curly) close @@ -2764,7 +2764,7 @@ template docAbstraction() {                 string[string]  an_object,      return ref int[string]     obj_type_status    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (obj_type_status["curly_group"] == State.on) {        if (line.matchFirst(rgx.block_curly_group_close)) {          debug(group) { @@ -2803,7 +2803,7 @@ template docAbstraction() {                 string[string]  an_object,      return ref int[string]     obj_type_status    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (obj_type_status["curly_block"] == TriState.on) {        if (line.matchFirst(rgx.block_curly_block_close)) {          debug(block) {                             // block (curly) close @@ -2846,7 +2846,7 @@ template docAbstraction() {                 CMM             conf_make_meta,                 string[string]  tag_in_seg,    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (obj_type_status["curly_poem"] == TriState.on) {        if (line.matchFirst(rgx.block_curly_poem_close)) {          if (an_object_key in an_object @@ -3084,7 +3084,7 @@ template docAbstraction() {      return ref string[string]  an_object,      return ref int[string]     obj_type_status    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (obj_type_status["curly_code"] == TriState.on) {        if (line.matchFirst(rgx.block_curly_code_close)) {          debug(codecurly) {                                    // code (curly) close @@ -3127,7 +3127,7 @@ template docAbstraction() {      return ref int[string]     obj_type_status,      return ref CMM             conf_make_meta,    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (obj_type_status["curly_table"] == TriState.on) {        if (line.matchFirst(rgx.block_curly_table_close)) {          debug(table) {                           // table (curly) close @@ -3207,7 +3207,7 @@ template docAbstraction() {    ) {      mixin spineBiblio;      auto jsn = BibJsnStr(); -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (line.matchFirst(rgx.heading_biblio)        && obj_type_status["para"]  != State.on        && obj_type_status["group"] != State.on @@ -3392,7 +3392,7 @@ template docAbstraction() {        "code block status: closed"      );      assertions_flag_types_block_status_none_or_closed(obj_type_status); -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (obj_type_status["quote"] == TriState.closing) {        obj_cite_digits = ocn_emit(obj_type_status["ocn_status"]);        an_object["bookindex_nugget"] @@ -3685,7 +3685,7 @@ template docAbstraction() {      return ref int[string]     obj_type_status,                 B               opt_action,    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (auto m = line.match(rgx.book_index)) {                                   /+ match book_index +/        debug(bookindexmatch) {          writefln( @@ -3735,7 +3735,7 @@ template docAbstraction() {      return ref Regex!(char)[string]  heading_match_rgx,      return ref int[string]           obj_type_status    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if ((_make_unmarked_headings.length > 2)      && (obj_type_status["make_headings"] == State.off)) {                        /+ headings found +/        debug(headingsfound) { @@ -3875,7 +3875,7 @@ template docAbstraction() {      return ref int[string]     obj_type_status,      return ref CMM             conf_make_meta,    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (auto m = line.match(rgx.heading)) {                                      /+ heading match +/        ++line_occur["heading"];        obj_type_status["heading"]            = State.on; @@ -4027,7 +4027,7 @@ template docAbstraction() {      return ref int[string]     obj_type_status,      return ref int[string]     line_occur,    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      if (line_occur["para"] == State.off) {        line = font_faces_line(line);        /+ para matches +/ @@ -4074,7 +4074,7 @@ template docAbstraction() {    @safe char[] font_faces_line()(      char[]  textline,    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      static auto mkup = InlineMarkup();      if (textline.match(rgx.inline_faces_line)) {        textline = textline @@ -4097,7 +4097,7 @@ template docAbstraction() {      return ref ObjGenericComposite  table_object,                 H                    table_head,    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      table_object.metainfo.is_of_part      = "body";      table_object.metainfo.is_of_section   = "body";      table_object.metainfo.is_of_type      = "block"; @@ -4122,7 +4122,7 @@ template docAbstraction() {      return ref ObjGenericComposite  table_object,      return ref T                    table_array,    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      static auto mng = InlineMarkup();      string _table_substantive;      ulong col_num; @@ -4246,7 +4246,7 @@ template docAbstraction() {      return ref ObjGenericComposite  table_object,      return ref T                    table_substantive,    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      static auto munge = ObjInlineMarkupMunge();      string[] _table_rows = (table_substantive).split(rgx.table_row_delimiter);      string[] _table_cols; @@ -4262,7 +4262,7 @@ template docAbstraction() {      return ref ObjGenericComposite  table_object,      return ref T                    table_substantive,    ) { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      static auto munge = ObjInlineMarkupMunge();      string[] _table_rows = (table_substantive).split(rgx.table_row_delimiter_special);      string[] _table_cols; @@ -4330,7 +4330,7 @@ template docAbstraction() {      int n_foot, n_foot_reg, n_foot_sp_asterisk, n_foot_sp_plus;      string asterisks_, plus_;      string obj_txt_out, tail, note; -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      static auto mkup = InlineMarkup();      int stage_reset_note_numbers = true;      private auto initialize_note_numbers() { @@ -4576,7 +4576,7 @@ template docAbstraction() {      }    }    static struct ObjInlineMarkup { -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      static auto munge = ObjInlineMarkupMunge();      string[string] obj_txt;      static string anchor_tag = ""; @@ -5162,7 +5162,7 @@ template docAbstraction() {            );          }        } -      static auto rgx = Rgx(); +      static auto rgx = RgxI();        if (!bookindex_section.empty) {          auto bi_main_terms_split_arr            = bookindex_section.split(rgx.bi_main_terms_split); @@ -5240,7 +5240,7 @@ template docAbstraction() {    }    struct BookIndexReportSection {      int  mkn, skn; -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      static auto munge = ObjInlineMarkupMunge();      @safe void bookindex_write_section()(        string[][string][string] bookindex_unordered_hashes @@ -5434,7 +5434,7 @@ template docAbstraction() {      string[string] object_notes;      int previous_count;      int mkn; -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      @safe private auto gather_notes_for_endnote_section(        ObjGenericComposite[] contents_am,        string[string]        tag_in_seg, @@ -5722,7 +5722,7 @@ template docAbstraction() {      int lv, lv0, lv1, lv2, lv3, lv4, lv5, lv6, lv7;      int obj_cite_digit;      int[string] p_; // p_ parent_ -    static auto rgx = Rgx(); +    static auto rgx = RgxI();      @safe ObjGenericComposite node_location_emitter(La,Ta,N)(        string         lev_markup_number,        string[string] tag_in_seg, diff --git a/src/doc_reform/meta/metadoc_harvests_authors.d b/src/doc_reform/meta/metadoc_harvests_authors.d index 3a7aebc..132c0af 100644 --- a/src/doc_reform/meta/metadoc_harvests_authors.d +++ b/src/doc_reform/meta/metadoc_harvests_authors.d @@ -12,7 +12,6 @@ module doc_reform.meta.metadoc_harvests_authors;      doc_reform.meta.rgx;    mixin spineHarvest;    mixin InternalMarkup; -  mixin spineRgxInit;  template spineMetaDocHarvestsAuthors() {    static auto mkup = InlineMarkup();    void spineMetaDocHarvestsAuthors(H,M,O)( diff --git a/src/doc_reform/meta/metadoc_harvests_topics.d b/src/doc_reform/meta/metadoc_harvests_topics.d index 8c41f3b..aeb7cba 100644 --- a/src/doc_reform/meta/metadoc_harvests_topics.d +++ b/src/doc_reform/meta/metadoc_harvests_topics.d @@ -12,7 +12,6 @@ module doc_reform.meta.metadoc_harvests_topics;      doc_reform.meta.rgx;    mixin spineHarvest;    mixin InternalMarkup; -  mixin spineRgxInit;  template spineMetaDocHarvestsTopics() {    static auto mkup = InlineMarkup();    void spineMetaDocHarvestsTopics(H,M,O)( diff --git a/src/doc_reform/meta/rgx.d b/src/doc_reform/meta/rgx.d index c7a110b..94ef091 100644 --- a/src/doc_reform/meta/rgx.d +++ b/src/doc_reform/meta/rgx.d @@ -2,8 +2,8 @@    regex: regular expressions used in sisu document parser  +/  module doc_reform.meta.rgx; -static template spineRgxInit() { -  static struct Rgx { +static template spineRgxIn() { +  static struct RgxI {      /+ misc +/      // static true_dollar                                    = ctRegex!(`\$`, "gm");      static sep                                            = ctRegex!(`␣`, "gm"); diff --git a/src/doc_reform/spine.d b/src/doc_reform/spine.d index b7d9731..67ee838 100755 --- a/src/doc_reform/spine.d +++ b/src/doc_reform/spine.d @@ -87,16 +87,16 @@ description "A SiSU inspired document parser writen in D."  homepage    "http://sisudoc.org"  +/  @system void main(string[] args) { -  mixin spineRgxInit; +  mixin spineRgxIn;    mixin contentJSONtoSpineStruct;    mixin spineBiblio; -  mixin spineRgxInitFlags; +  mixin spineRgxDocStructFlags;    mixin outputHub;    auto hvst = spineHarvest!();    string flag_action;    string arg_unrecognized;    enum dAM { abstraction, matters } -  static auto rgx = Rgx(); +  static auto rgx = RgxI();    scope(success) {      writefln(        "~ run complete, ok ~ (%s-%s.%s.%s, %s D:%s, %s %s)", | 
