diff options
Diffstat (limited to 'org')
-rw-r--r-- | org/default_misc.org | 58 | ||||
-rw-r--r-- | org/default_paths.org | 12 | ||||
-rw-r--r-- | org/default_regex.org | 12 | ||||
-rw-r--r-- | org/meta_abstraction.org | 108 | ||||
-rw-r--r-- | org/meta_conf_make_meta.org | 10 | ||||
-rw-r--r-- | org/meta_debugs.org | 2 | ||||
-rw-r--r-- | org/meta_read_source_files.org | 4 | ||||
-rw-r--r-- | org/output_hub.org | 4 | ||||
-rw-r--r-- | org/output_sisupod.org | 2 | ||||
-rw-r--r-- | org/output_xmls.org | 2 | ||||
-rw-r--r-- | org/sdp.org | 4 |
11 files changed, 110 insertions, 108 deletions
diff --git a/org/default_misc.org b/org/default_misc.org index 993d2a0..fdba922 100644 --- a/org/default_misc.org +++ b/org/default_misc.org @@ -65,7 +65,7 @@ import #+name: meta_defaults_template_registers #+BEGIN_SRC d -string[string][string] conf_aa_empty() { +static string[string][string] conf_aa_empty() { auto conf_ = [ "webserv": [ "url_root" : "", @@ -146,7 +146,7 @@ string[string][string] conf_aa_empty() { #+name: meta_defaults_template_registers #+BEGIN_SRC d -string[string][string] meta_aa_empty() { +static string[string][string] meta_aa_empty() { auto meta_ = [ "classify": [ "dewey" : "", @@ -214,7 +214,7 @@ string[string][string] meta_aa_empty() { #+name: meta_defaults_template_registers #+BEGIN_SRC d -auto ptr_head_main = +static auto ptr_head_main = [ "classify", "creator", @@ -227,7 +227,7 @@ auto ptr_head_main = "rights", "title" ]; -auto ptr_head_sub_classify = +static auto ptr_head_sub_classify = [ "dewey", "keywords", @@ -235,7 +235,7 @@ auto ptr_head_sub_classify = "subject", "topic_register" ]; -auto ptr_head_sub_creator = +static auto ptr_head_sub_creator = [ "author", "author_email", @@ -243,7 +243,7 @@ auto ptr_head_sub_creator = "illustrator", "translator" ]; -auto ptr_head_sub_date = +static auto ptr_head_sub_date = [ "added_to_site", "available", @@ -253,14 +253,14 @@ auto ptr_head_sub_date = "published", "valid" ]; -auto ptr_head_sub_identifier = +static auto ptr_head_sub_identifier = [ "isbn", "oclc", "pg" ]; /+ make +/ -auto ptr_head_sub_make = +static auto ptr_head_sub_make = [ "cover_image", "home_button_image", @@ -275,27 +275,27 @@ auto ptr_head_sub_make = "texpdf_font", "css" ]; -auto ptr_head_sub_notes = +static auto ptr_head_sub_notes = [ "abstract", "description" ]; -auto ptr_head_sub_original = +static auto ptr_head_sub_original = [ "language", "source", "title" ]; -auto ptr_head_sub_publisher = +static auto ptr_head_sub_publisher = [ "name" ]; -auto ptr_head_sub_rights = +static auto ptr_head_sub_rights = [ "copyright", "cover", "illustrations", "license" ]; -auto ptr_head_sub_title = +static auto ptr_head_sub_title = [ "edition", "full", @@ -394,7 +394,7 @@ header. #+BEGIN_SRC d template SiSUrgxInitFlags() { /+ regex flags +/ - int[string] flags_type_init() { + static int[string] flags_type_init() { int[string] flags_type_init = [ "make_headings" : 0, "header_make" : 0, @@ -437,7 +437,7 @@ template SiSUrgxInitFlags() { #+name: meta_defaults_template_node #+BEGIN_SRC d template SiSUnode() { - string[string] node_metadata_heading_str() { + static string[string] node_metadata_heading_str() { auto _node = [ "is" : "", "ocn" : "", @@ -447,7 +447,7 @@ template SiSUnode() { ]; return _node; } - int[string] node_metadata_heading_int() { + static int[string] node_metadata_heading_int() { auto _node = [ "ocn" : 0, // decide whether to use or keep? "ptr_doc_object" : 0, @@ -460,7 +460,7 @@ template SiSUnode() { ]; return _node; } - string[string] node_metadata_para_str() { + static string[string] node_metadata_para_str() { auto _node = [ "is" : "", "ocn" : "", @@ -468,7 +468,7 @@ template SiSUnode() { ]; return _node; } - int[string] node_metadata_para_int() { + static int[string] node_metadata_para_int() { auto _node = [ "ocn" : 0, "indent_base" : 0, @@ -487,7 +487,7 @@ template SiSUnode() { template SiSUbiblio() { // required: deemed_author (author || editor); year; fulltitle; struct BibJsnStr { - auto biblio_entry_tags_jsonstr() { + static auto biblio_entry_tags_jsonstr() { string x = `{ "is" : "", "sortby_deemed_author_year_title" : "", @@ -568,7 +568,7 @@ import #+name: defaults_template_markup #+BEGIN_SRC d template InternalMarkup() { - struct InlineMarkup { + static struct InlineMarkup { auto en_a_o = "【"; auto en_a_c = "】"; auto en_b_o = "〖"; auto en_b_c = "〗"; auto lnk_o = "┥"; auto lnk_c = "┝"; @@ -587,11 +587,11 @@ template InternalMarkup() { auto tc_c = "┚"; auto tc_p = "┆"; auto mono = "■"; - string indent_by_spaces_provided(int indent, string _indent_spaces ="░░") { + static string indent_by_spaces_provided(int indent, string _indent_spaces ="░░") { _indent_spaces = replicate(_indent_spaces, indent); return _indent_spaces; } - string repeat_character_by_number_provided(C,N)(C _character ="-", N number=10) { + static string repeat_character_by_number_provided(C,N)(C _character ="-", N number=10) { _character = replicate(_character, number); return _character; } @@ -606,7 +606,7 @@ template InternalMarkup() { template SiSUlanguageCodes() { /+ language codes +/ struct Lang { - string[string][string] codes() { + static string[string][string] codes() { auto _lang_codes = [ "am": [ "c": "am", "n": "Amharic", "t": "Amharic", "xlp": "amharic" ], "bg": [ "c": "bg", "n": "Bulgarian", "t": "Български (Bəlgarski)", "xlp": "bulgarian" ], @@ -673,18 +673,18 @@ template SiSUlanguageCodes() { ]; return _lang_codes; } - string[] code_arr_ptr() { + static string[] code_arr_ptr() { auto _lang_codes = ["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", "us", "vi", "zh", "en", "xx",]; return _lang_codes; } - string[] code_arr() { + static string[] code_arr() { auto _lang_codes = ["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"]; return _lang_codes; } - auto codes_() { + static auto codes_() { return "(" ~ join(code_arr,"|") ~ ")"; } - auto codes_regex() { + static auto codes_regex() { return regex(codes_); } } @@ -695,7 +695,7 @@ template SiSUlanguageCodes() { #+name: meta_ansi_colors #+BEGIN_SRC d -string[string] scr_txt_color = [ +static string[string] scr_txt_color = [ "off" : "\033[0m", "white" : "\033[37m", "white_bold" : "\033[1m", @@ -731,7 +731,7 @@ string[string] scr_txt_color = [ "navy" : "\033[34m", "black" : "\033[30m" ]; -string[string] scr_txt_marker = [ +static string[string] scr_txt_marker = [ "white" : "\033[37m*\033[0m ", "bold" : "\033[1m*\033[0m ", "invert" : "\033[7m*\033[0m ", diff --git a/org/default_paths.org b/org/default_paths.org index 2a414bd..6d6c1db 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -32,7 +32,7 @@ import std.array, import sdp.meta.rgx; template SiSUpathsSRC() { mixin SiSUrgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); auto SiSUpathsSRC(D,Fn)( D _pwd, Fn _fn_src_and_relative_path, @@ -131,7 +131,7 @@ doc #+BEGIN_SRC d template SiSUpathsSisupod() { mixin SiSUrgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); string base_dir = "sisupod"; string suffix = ".zip"; auto SiSUpathsSisupod()() { @@ -157,7 +157,7 @@ template SiSUpathsSisupod() { #+BEGIN_SRC d template SiSUpathsSisupodZipped() { mixin SiSUrgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); auto SiSUpathsSisupodZipped(Ps,Lng)( Ps src_pth_info, Lng lng, @@ -215,7 +215,7 @@ template SiSUpathsSisupodZipped() { #+BEGIN_SRC d template SiSUpathsSisupodFileSystem() { mixin SiSUrgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); auto SiSUpathsSisupodFileSystem(Ps,Lng)( Ps src_pth_info, Lng lng, @@ -295,7 +295,7 @@ template SiSUoutPaths() { #+BEGIN_SRC d template SiSUpathsHTML() { mixin SiSUrgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); auto SiSUpathsHTML(Ps,Lng)( Ps src_pth_info, Lng lng, @@ -340,7 +340,7 @@ template SiSUpathsHTML() { #+BEGIN_SRC d template SiSUpathsEPUB() { mixin SiSUrgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); auto SiSUpathsEPUB(Ps,Lng)( Ps src_pth_info, Lng lng, diff --git a/org/default_regex.org b/org/default_regex.org index 95167b4..f255bb6 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -30,9 +30,9 @@ http://dlang.org/phobos/std_regex.html regex: regular expressions used in sisu document parser +/ module sdp.meta.rgx; -template SiSUrgxInit() { +static template SiSUrgxInit() { import sdp.meta.defaults; - struct Rgx { + static struct Rgx { <<meta_rgx>> <<prgmkup_rgx>> } @@ -88,8 +88,8 @@ static comments = ctRegex!(`^%+ |^%+$`); #+name: meta_rgx #+BEGIN_SRC d /+ header +/ -static make_simple_substitutions_rb = ctRegex!(`(?P<substitution>/(?P<match>.+?)/,[ ]*['"](?P<replace>.+?)['"])`); -static make_simple_substitutions_d = ctRegex!(`(?P<substitution>``(?P<match>.+?)``,[ ]*['"](?P<replace>.+?)['"])`); +static make_simple_substitutions_rb = ctRegex!(`(?P<substitution>/(?P<match>.+?)/,[ ]*['"](?P<replace>.+?)['"])`); +static make_simple_substitutions_d = ctRegex!(`(?P<substitution>``(?P<match>.+?)``,[ ]*['"](?P<replace>.+?)['"])`); #+END_SRC ** native headers @@ -369,9 +369,9 @@ http://dlang.org/phobos/std_regex.html regex: regular expressions used in sisu document parser +/ module sdp.output.rgx; -template SiSUoutputRgxInit() { +static template SiSUoutputRgxInit() { import sdp.output.defaults; - struct Rgx { + static struct Rgx { <<prgmkup_rgx>> <<sp_ch_xhtml_rgx>> } diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org index 678462b..cf86961 100644 --- a/org/meta_abstraction.org +++ b/org/meta_abstraction.org @@ -15,7 +15,7 @@ #+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n) [[./sdp.org][sdp]] [[./][org/]] -* 1. Document Abstraction :module:sdp:meta_metadoc_from_src: +* 1. Document Abstraction :module:sdp:metadoc_from_src: Process markup document, create document abstraction. ** 0. module template @@ -24,7 +24,7 @@ Process markup document, create document abstraction. /++ document abstraction: abstraction of sisu markup for downstream processing - meta_metadoc_from_src.d + metadoc_from_src.d +/ module sdp.meta.metadoc_from_src; template SiSUdocAbstraction() { @@ -41,7 +41,7 @@ template SiSUdocAbstraction() { Meta dochead_meta_aa, Opt opt_action, ) { - auto rgx = Rgx(); + static auto rgx = Rgx(); debug(asserts) { static assert(is(typeof(markup_sourcefile_content) == char[][])); static assert(is(typeof(dochead_make_aa) == string[string][string])); @@ -215,8 +215,8 @@ int verse_line, heading_ptr; int[string] indent; bool bullet = true; string content_non_header = "8"; -auto obj_im = ObjInlineMarkup(); -auto obj_att = ObjAttributes(); +static auto obj_im = ObjInlineMarkup(); +static auto obj_att = ObjAttributes(); /+ ocn +/ int obj_cite_number, obj_cite_number_; auto object_citation_number = OCNemitter(); @@ -513,8 +513,8 @@ the_table_of_contents_section = [ "seg": [toc_head], "scroll": [toc_head], ]; -auto mkup = InlineMarkup(); -auto munge = ObjInlineMarkupMunge(); +static auto mkup = InlineMarkup(); +static auto munge = ObjInlineMarkupMunge(); auto note_section = NotesSection(); auto bookindex_extract_hash = BookIndexNuggetHash(); string[][string] lev4_subtoc; @@ -560,7 +560,7 @@ debug(srclines) { #+name: abs_in_loop_body_00 #+BEGIN_SRC d if (!line.empty) { - _check_ocn_status_(line, type); + type = _check_ocn_status_(line, type); } #+END_SRC @@ -2307,7 +2307,7 @@ functions used in document abstraction #+name: abs_functions_object_reset #+BEGIN_SRC d -auto object_reset(O)(ref O an_object) { +static auto object_reset(O)(O an_object) { debug(asserts) { static assert(is(typeof(an_object) == string[string])); } @@ -2316,6 +2316,7 @@ auto object_reset(O)(ref O an_object) { an_object.remove("is"); an_object.remove("attrib"); an_object.remove("bookindex_nugget"); + return an_object; } #+END_SRC @@ -2337,7 +2338,7 @@ auto _common_reset_(L,O,T)( line_occur["para"] = State.off; type["heading"] = State.off; type["para"] = State.off; - object_reset(an_object); + an_object = object_reset(an_object); } #+END_SRC @@ -2345,15 +2346,15 @@ auto _common_reset_(L,O,T)( #+name: abs_functions_ocn_status #+BEGIN_SRC d -void _check_ocn_status_(L,T)( +static auto _check_ocn_status_(L,T)( L line, - return ref T type + T type ) { debug(asserts) { static assert(is(typeof(line) == char[])); static assert(is(typeof(type) == int[string])); } - auto rgx = Rgx(); + static auto rgx = Rgx(); if ((!line.empty) && (type["ocn_status_multi_obj"] == TriState.off)) { /+ not multi-line object, check whether obj_cite_number is on or turned off +/ if (line.matchFirst(rgx.obj_cite_number_block_marks)) { @@ -2393,6 +2394,7 @@ void _check_ocn_status_(L,T)( } } } + return type; } #+END_SRC @@ -2418,7 +2420,7 @@ void _start_block_(L,T,N)( #+name: abs_functions_block #+BEGIN_SRC d - auto rgx = Rgx(); + static auto rgx = Rgx(); string code_block_syntax = ""; bool code_block_numbered = false; if (auto m = line.matchFirst(rgx.block_curly_code_open)) { @@ -2604,7 +2606,7 @@ void _code_block_(L,O,T)( static assert(is(typeof(an_object) == string[string])); static assert(is(typeof(type) == int[string])); } - auto rgx = Rgx(); + static auto rgx = Rgx(); if (type["curly_code"] == TriState.on) { if (line.matchFirst(rgx.block_curly_code_close)) { debug(code) { // code (curly) close @@ -2745,7 +2747,7 @@ void _biblio_block_( ) { mixin SiSUbiblio; auto jsn = BibJsnStr(); - auto rgx = Rgx(); + static auto rgx = Rgx(); if (line.matchFirst(rgx.heading_biblio)) { type["biblio_section"] = TriState.on; type["blurb_section"] = State.off; @@ -2874,7 +2876,7 @@ void _quote_block_(L,O,T)( static assert(is(typeof(an_object) == string[string])); static assert(is(typeof(type) == int[string])); } - auto rgx = Rgx(); + static auto rgx = Rgx(); if (type["curly_quote"] == TriState.on) { if (line.matchFirst(rgx.block_curly_quote_close)) { debug(quote) { // quote (curly) close @@ -2926,7 +2928,7 @@ void _group_block_(L,O,T)( static assert(is(typeof(an_object) == string[string])); static assert(is(typeof(type) == int[string])); } - auto rgx = Rgx(); + static auto rgx = Rgx(); if (type["curly_group"] == State.on) { if (line.matchFirst(rgx.block_curly_group_close)) { debug(group) { @@ -2979,7 +2981,7 @@ void _block_block_(L,O,T)( static assert(is(typeof(an_object) == string[string])); static assert(is(typeof(type) == int[string])); } - auto rgx = Rgx(); + static auto rgx = Rgx(); if (type["curly_block"] == TriState.on) { if (line.matchFirst(rgx.block_curly_block_close)) { debug(block) { // block (curly) close @@ -3036,7 +3038,7 @@ void _poem_block_(L,O,T,C,N,Ma)( static assert(is(typeof(obj_cite_number_poem) == string[string])); static assert(is(typeof(dochead_make_aa) == string[string][string])); } - auto rgx = Rgx(); + static auto rgx = Rgx(); if (type["curly_poem"] == TriState.on) { if (line.matchFirst(rgx.block_curly_poem_close)) { if (an_object_key in an_object @@ -3272,7 +3274,7 @@ void _table_block_(L,O,T,Ma)( static assert(is(typeof(an_object) == string[string])); static assert(is(typeof(type) == int[string])); } - auto rgx = Rgx(); + static auto rgx = Rgx(); if (type["curly_table"] == TriState.on) { if (line.matchFirst(rgx.block_curly_table_close)) { debug(table) { // table (curly) close @@ -3695,7 +3697,7 @@ auto _book_index_(L,I,O,T,B)( static assert(is(typeof(type) == int[string])); static assert(is(typeof(opt_action) == bool[string])); } - auto rgx = Rgx(); + static auto rgx = Rgx(); if (auto m = line.match(rgx.book_index)) { /+ match book_index +/ debug(bookindexmatch) { // book index @@ -3761,7 +3763,7 @@ auto _heading_found_(L,X,H,R,T)( static assert(is(typeof(heading_match_rgx) == Regex!(char)[string])); static assert(is(typeof(type) == int[string])); } - auto rgx = Rgx(); + static auto rgx = Rgx(); if ((dochead_make_identify_unmarked_headings.length > 2) && (type["make_headings"] == State.off)) { /+ headings found +/ @@ -3933,7 +3935,7 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,Me)( static assert(is(typeof(type) == int[string])); static assert(is(typeof(dochead_meta_aa) == string[string][string])); } - auto rgx = Rgx(); + static auto rgx = Rgx(); if (auto m = line.match(rgx.heading)) { /+ heading match +/ type["heading"] = State.on; @@ -4092,7 +4094,7 @@ void _para_match_(L,O,K,I,B,T,C)( static assert(is(typeof(type) == int[string])); static assert(is(typeof(line_occur) == int[string])); } - auto rgx = Rgx(); + static auto rgx = Rgx(); if (line_occur["para"] == State.off) { line = font_faces_line(line); /+ para matches +/ @@ -4142,9 +4144,9 @@ void _para_match_(L,O,K,I,B,T,C)( #+name: abs_functions_para #+BEGIN_SRC d auto font_faces_line(T)( - return ref T textline, + T textline, ) { - auto rgx = Rgx(); + static auto rgx = Rgx(); if (textline.match(rgx.inline_faces_line)) { textline = (textline) .replaceFirst(rgx.inline_emphasis_line, ("*{$1}*$2")) @@ -4173,7 +4175,7 @@ auto table_instructions(O,H)( return ref O table_object, return ref H table_head, ) { - auto rgx = Rgx(); + static auto rgx = Rgx(); table_object.use = "body"; table_object.is_of = "block"; table_object.is_a = "table"; @@ -4201,8 +4203,8 @@ auto table_array_munge(O,T)( return ref O table_object, return ref T table_array, ) { - auto rgx = Rgx(); - auto mng = InlineMarkup(); + static auto rgx = Rgx(); + static auto mng = InlineMarkup(); string _table_substantive; ulong col_num; ulong col_num_; @@ -4331,8 +4333,8 @@ auto table_array_munge_open_close(O,T)( return ref O table_object, return ref T table_array, ) { - auto rgx = Rgx(); - auto mng = InlineMarkup(); + static auto rgx = Rgx(); + static auto mng = InlineMarkup(); string _table_substantive; foreach(row; table_array) { foreach(col; row) { @@ -4356,8 +4358,8 @@ auto table_substantive_munge(O,T)( return ref O table_object, return ref T table_substantive, ) { - auto rgx = Rgx(); - auto munge = ObjInlineMarkupMunge(); + static auto rgx = Rgx(); + static auto munge = ObjInlineMarkupMunge(); string[] _table_rows = (table_substantive).split(rgx.table_row_delimiter); string[] _table_cols; string[][] _table; @@ -4378,8 +4380,8 @@ auto table_substantive_munge_special(O,T)( return ref O table_object, return ref T table_substantive, ) { - auto rgx = Rgx(); - auto munge = ObjInlineMarkupMunge(); + static auto rgx = Rgx(); + static auto munge = ObjInlineMarkupMunge(); string[] _table_rows = (table_substantive).split(rgx.table_row_delimiter_special); string[] _table_cols; string[][] _table; @@ -4424,13 +4426,13 @@ pure struct OCNemitter { #+name: meta_emitters_obj_inline_markup_munge #+BEGIN_SRC d -struct ObjInlineMarkupMunge { +static struct ObjInlineMarkupMunge { string[string] obj_txt; int n_foot, n_foot_reg, n_foot_sp_asterisk, n_foot_sp_plus; string asterisks_; string obj_txt_out, tail, note; - auto rgx = Rgx(); - auto mkup = InlineMarkup(); + static auto rgx = Rgx(); + static auto mkup = InlineMarkup(); int stage_reset_note_numbers = true; private auto initialize_note_numbers() { n_foot = 0; @@ -4444,11 +4446,11 @@ struct ObjInlineMarkupMunge { #+name: meta_emitters_obj_inline_markup_munge #+BEGIN_SRC d - string url_links(Ot)(Ot obj_txt_in) { + static string url_links(Ot)(Ot obj_txt_in) { debug(asserts) { static assert(is(typeof(obj_txt_in) == string)); } - auto mng = InlineMarkup(); + static auto mng = InlineMarkup(); obj_txt_in = obj_txt_in.replaceAll(rgx.inline_mono, (mng.mono ~ "{$1}" ~ mng.mono)); /+ url matched +/ if (obj_txt_in.match(rgx.inline_url_generic)) { @@ -4853,9 +4855,9 @@ struct ObjInlineMarkupMunge { #+name: meta_emitters_obj_inline_markup #+BEGIN_SRC d -struct ObjInlineMarkup { - auto rgx = Rgx(); - auto munge = ObjInlineMarkupMunge(); +static struct ObjInlineMarkup { + static auto rgx = Rgx(); + static auto munge = ObjInlineMarkupMunge(); string[string] obj_txt; #+END_SRC @@ -4986,7 +4988,7 @@ struct ObjInlineMarkup { body { ObjGenericComposite comp_obj_toc; mixin InternalMarkup; - auto mkup = InlineMarkup(); + static auto mkup = InlineMarkup(); char[] heading_toc_ = (obj_["substantive"].dup.strip.to!(char[])).replaceAll(rgx.inline_notes_al, ""); heading_toc_ = _clean_heading_toc_(heading_toc_); auto attrib=""; @@ -5748,7 +5750,7 @@ struct BookIndexNuggetHash { } } body { - auto rgx = Rgx(); + static auto rgx = Rgx(); if (!bookindex_section.empty) { auto bi_main_terms_split_arr = bookindex_section.split(rgx.bi_main_terms_split); @@ -5845,8 +5847,8 @@ struct BookIndexReportIndent { #+BEGIN_SRC d struct BookIndexReportSection { int mkn, skn; - auto rgx = Rgx(); - auto munge = ObjInlineMarkupMunge(); + static auto rgx = Rgx(); + static auto munge = ObjInlineMarkupMunge(); #+END_SRC ****** bookindex write section @@ -5900,7 +5902,7 @@ struct BookIndexReportSection { } mixin SiSUnode; mixin InternalMarkup; - auto mkup = InlineMarkup(); + static auto mkup = InlineMarkup(); string type_is; string lev; int heading_lev_markup, heading_lev_collapsed; @@ -6062,7 +6064,7 @@ struct NotesSection { string[string] object_notes; int previous_count; int mkn; - auto rgx = Rgx(); + static auto rgx = Rgx(); #+END_SRC ***** { gather notes for endnote section struct open @@ -6090,8 +6092,8 @@ struct NotesSection { } body { mixin InternalMarkup; - auto mkup = InlineMarkup(); - auto munge = ObjInlineMarkupMunge(); + static auto mkup = InlineMarkup(); + static auto munge = ObjInlineMarkupMunge(); foreach( m; (contents_am[cntr].text).matchAll( @@ -6394,7 +6396,7 @@ struct NodeStructureMetadata { int lv, lv0, lv1, lv2, lv3, lv4, lv5, lv6, lv7; int obj_cite_number; int[string] p_; // p_ parent_ - auto rgx = Rgx(); + static auto rgx = Rgx(); #+END_SRC ***** node metadata emitter diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index 5e4cb6d..2f06970 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -47,7 +47,7 @@ template docHeaderMakeAndMetaTupExtractAndConvertToAA() { mixin SiSUrgxInit; mixin SiSUheaderExtractNative; mixin SiSUextractSDLang; - auto rgx = Rgx(); + static auto rgx = Rgx(); auto docHeaderMakeAndMetaTupExtractAndConvertToAA(DocMake, Src)( DocMake conf_doc_make_aa, Src header_src, @@ -95,7 +95,7 @@ template SiSUextractSDLang() { struct extractSDL { mixin SiSUregisters; mixin SiSUrgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); <<meta_conf_make_meta_sdl>> } } @@ -276,7 +276,7 @@ template SiSUheaderExtractNative() { mixin SiSUregisters; mixin SiSUrgxInitFlags; mixin SiSUrgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); enum State { off, on } string hm, hs; <<meta_markup_header_extract_native>> @@ -630,8 +630,8 @@ template compositeMkCnf() { string _italics; string _emphasis; auto compositeMkCnf(Mks...)(Mks makes) { + static auto rgx = Rgx(); foreach (make; makes) { - auto rgx = Rgx(); if (auto z = "make" in make) { if (auto x = "substitute" in *z) { foreach (m; (*x).matchAll(rgx.make_simple_substitutions_d)) { @@ -698,7 +698,7 @@ template compositeMkCnfAA() { mixin SiSUrgxInit; string[] _substitutions; string[string][] _sub; - auto rgx = Rgx(); + static auto rgx = Rgx(); auto compositeMkCnfAA(Mks...)(Mks makes) { /+ - skip.first_make which is the "composite make output" diff --git a/org/meta_debugs.org b/org/meta_debugs.org index fb34b34..cd457e4 100644 --- a/org/meta_debugs.org +++ b/org/meta_debugs.org @@ -72,7 +72,7 @@ import #+name: initialize #+BEGIN_SRC d -auto rgx = Rgx(); +static auto rgx = Rgx(); auto markup = InlineMarkup(); string key; #+END_SRC diff --git a/org/meta_read_source_files.org b/org/meta_read_source_files.org index 06c3cb7..c8355ae 100644 --- a/org/meta_read_source_files.org +++ b/org/meta_read_source_files.org @@ -161,7 +161,7 @@ template SiSUrawMarkupContent() { sdp.meta.rgx; <<imports_std>> mixin SiSUrgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); auto rawsrc = RawMarkupContent(); auto SiSUrawMarkupContent(Fn)(Fn fn_src) { auto _0_header_1_body_content_2_insert_filelist_tuple = @@ -313,7 +313,7 @@ final private char[][] markupSourceLineArray(in char[] src_text) { #+name: meta_markup_source_raw_read_in_file #+BEGIN_SRC d auto markupSourceReadIn(in string fn_src) { - auto rgx = Rgx(); + static auto rgx = Rgx(); enforce( fn_src.match(rgx.src_pth), "not a sisu markup filename" diff --git a/org/output_hub.org b/org/output_hub.org index f4eb1de..8f06194 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -28,7 +28,7 @@ template outputHub() { <<output_imports>> void outputHub(D,I)(D doc_abstraction, I doc_matters) { mixin SiSUoutputRgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); <<output_options>> } } @@ -36,7 +36,7 @@ template outputHubOp() { <<output_imports>> void outputHubOp(C)(C config) { mixin SiSUoutputRgxInit; - auto rgx = Rgx(); + static auto rgx = Rgx(); <<output_options_op>> } } diff --git a/org/output_sisupod.org b/org/output_sisupod.org index 338fc33..a2085dd 100644 --- a/org/output_sisupod.org +++ b/org/output_sisupod.org @@ -69,7 +69,7 @@ auto pth_sisupod = SiSUpathsSisupodZipped!()(src_path_info, lng); auto pth_sisupod_filesystem = SiSUpathsSisupodFileSystem!()(src_path_info, lng); mixin SiSUlanguageCodes; auto lang = Lang(); -auto rgx = Rgx(); +static auto rgx = Rgx(); assert (doc_matters.source_filename.match(rgx.src_fn)); #+END_SRC diff --git a/org/output_xmls.org b/org/output_xmls.org index ae58b4b..19ed021 100644 --- a/org/output_xmls.org +++ b/org/output_xmls.org @@ -26,7 +26,7 @@ template outputXHTMLs() { <<output_imports>> mixin SiSUoutputRgxInit; struct outputXHTMLs { - auto rgx = Rgx(); + static auto rgx = Rgx(); <<xhtml_format_objects>> <<xhtml_format_objects_code>> } diff --git a/org/sdp.org b/org/sdp.org index eed2bbc..7b3a608 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -198,7 +198,7 @@ string[] fns_src; string flag_action; string arg_unrecognized; enum dAM { abstraction, matters } -auto rgx = Rgx(); +static auto rgx = Rgx(); #+END_SRC *** scope (run complete) :scope: @@ -464,7 +464,7 @@ template SiSUabstraction() { enum headBody { header, body_content, insert_filelist } enum makeMeta { make, meta } enum docAbst { doc_abstraction, section_keys, segnames, segnames_0_4, images } - auto rgx = Rgx(); + static auto rgx = Rgx(); auto SiSUabstraction(Fn,O,E)(Fn fn_src, O opts, E env){ <<sdp_conf_files>> <<sdp_each_file_do_read_and_split_sisu_markup_file_content_into_header_and_body>> |