diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2024-03-12 22:39:09 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2024-03-12 22:56:34 -0400 |
commit | e9e17be24eba558c30fcdc41ea5bb9a1da7fd4e7 (patch) | |
tree | 1ed3c4b528b0a8e54d0eb9babc391e562578c7b4 /org/out_latex.org | |
parent | nix flake & env upkeep (diff) |
mark modules as @safe: (& identify what is not)
Diffstat (limited to 'org/out_latex.org')
-rw-r--r-- | org/out_latex.org | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/org/out_latex.org b/org/out_latex.org index 7f31c3c..8783da8 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -27,6 +27,7 @@ #+BEGIN_SRC d <<doc_header_including_copyright_and_license>> module doc_reform.io_out.latex; +@safe: <<Template_paper_latex>> <<Template_output_latex>> <<Template_latex_init>> @@ -691,7 +692,7 @@ string mm(uint mmi) { return _mm; } struct PaperType { - @safe auto a4() { + auto a4() { struct A4 { auto portrait() { struct V { @@ -742,7 +743,7 @@ struct PaperType { } return A4(); } - @safe auto a5() { + auto a5() { struct A5 { auto portrait() { struct V { @@ -793,7 +794,7 @@ struct PaperType { } return A5(); } - @safe auto b4() { + auto b4() { struct B4 { auto portrait() { struct V { @@ -844,7 +845,7 @@ struct PaperType { } return B4(); } - @safe auto letter() { + auto letter() { struct Letter { auto portrait() { struct V { @@ -895,7 +896,7 @@ struct PaperType { } return Letter(); } - @safe auto legal() { + auto legal() { struct Legal { auto portrait() { struct V { @@ -961,7 +962,7 @@ struct PaperType { #+NAME: Function_shared_special_characters_to_escape_operations #+BEGIN_SRC d -@safe string sp_char_ops()( +string sp_char_ops()( string _txt, ) { string _unescape_sp_char_esc()(string _txt) { @@ -989,7 +990,7 @@ struct PaperType { #+NAME: Function_shared_special_characters_to_escape_object #+BEGIN_SRC d -@safe string sp_char_esc(O)( +string sp_char_esc(O)( string _txt, const O obj, ) { @@ -1004,7 +1005,7 @@ struct PaperType { #+NAME: Function_shared_special_characters_to_escape_text #+BEGIN_SRC d -@safe string sp_char_esc_txt()( +string sp_char_esc_txt()( string _txt, ) { _txt = _txt.sp_char_ops; @@ -1016,7 +1017,7 @@ struct PaperType { #+NAME: Function_shared_marked_linebreaks_newline_to_latex #+BEGIN_SRC d -@safe string marked_linebreaks_newlines()( +string marked_linebreaks_newlines()( string _txt, ) { _txt = _txt.split(rgx.br_linebreaks_newlines).join("\\br\n").strip; @@ -1028,7 +1029,7 @@ struct PaperType { *** not used latex \escape special characters UNUSED #+BEGIN_SRC d -@safe string sp_char_esc_()( +string sp_char_esc_()( string _txt, ) { _txt = replaceAll!(m => "\\" ~ m[1])(_txt, rgx_sc.latex_special_char); @@ -1043,7 +1044,7 @@ struct PaperType { #+NAME: Function_shared_fontface #+BEGIN_SRC d -@safe string fontface()( +string fontface()( string _txt, ) { _txt = _txt @@ -1066,7 +1067,7 @@ _txt = _txt #+NAME: Function_shared_leading_hardspaces #+BEGIN_SRC d -@safe string leading_hardspaces()( +string leading_hardspaces()( string _txt, ) { string hardspaces(string _spaces) { @@ -1083,7 +1084,7 @@ _txt = _txt #+NAME: output_latex_shared_character_nbsp_to_hardspace_ #+BEGIN_SRC d -@safe string nbsp_char_replace()(string _txt) { +string nbsp_char_replace()(string _txt) { if (_txt.match(rgx.nbsp_char)) { _txt = _txt.replaceAll(rgx.nbsp_char, "{\\s}"); } @@ -1095,7 +1096,7 @@ _txt = _txt #+NAME: Function_shared_character_nbsp_to_hardspace #+BEGIN_SRC d -@safe string nbsp_char()(string _txt) { +string nbsp_char()(string _txt) { if (_txt.match(rgx.nbsp_char)) { foreach (m; _txt.matchAll(rgx.nbsp_chars)) { int spaces_ = 0; @@ -1113,7 +1114,7 @@ _txt = _txt #+NAME: Function_shared_character_spaces_to_hardspace #+BEGIN_SRC d -@safe string spaces_to_nbsp()(string _txt) { +string spaces_to_nbsp()(string _txt) { if (_txt.match(rgx.spaces_keep)) { foreach (m; _txt.matchAll(rgx.spaces_keep)) { int spaces_ = 0; @@ -1131,7 +1132,7 @@ _txt = _txt #+NAME: Function_shared_character_nbsp_to_space #+BEGIN_SRC d -@safe string nbsp_char_to_space()(string _txt) { +string nbsp_char_to_space()(string _txt) { if (_txt.match(rgx.nbsp_char)) { _txt = _txt.replaceAll(rgx.nbsp_char, " "); } @@ -1144,7 +1145,7 @@ _txt = _txt #+NAME: Function_shared_links_and_images #+BEGIN_SRC d -@safe string links_and_images(O,M)( +string links_and_images(O,M)( string _txt, const O obj, M doc_matters, @@ -1198,7 +1199,7 @@ _txt = _txt #+NAME: Function_shared_footnotes #+BEGIN_SRC d -@safe string footnotes()( +string footnotes()( string _txt, ) { if (_txt.match(rgx.inline_notes_al_gen)) { @@ -1219,7 +1220,7 @@ _txt = _txt #+NAME: Function_shared_footnotes_remove #+BEGIN_SRC d -@safe string remove_footnotes()( +string remove_footnotes()( string _txt, ) { if (_txt.match(rgx.inline_notes_al_gen)) { @@ -1234,7 +1235,7 @@ _txt = _txt #+NAME: Function_shared_para #+BEGIN_SRC d -@safe string para(O)( +string para(O)( string _txt, O obj, ) { @@ -1254,7 +1255,7 @@ _txt = _txt #+NAME: Function_shared_bookindex #+BEGIN_SRC d -@safe string bookindex(O)( +string bookindex(O)( string _txt, O obj, ) { @@ -1275,7 +1276,7 @@ _txt = _txt #+NAME: Function_head_bullets_and_indentation #+BEGIN_SRC d -@safe string bullets_and_indentation(O)( +string bullets_and_indentation(O)( string _txt, O obj, ) { @@ -1320,7 +1321,7 @@ _txt = _txt #+NAME: Function_shared_heading #+BEGIN_SRC d - @safe string heading(O,M)( + string heading(O,M)( string _txt, O obj, M doc_matters, |