From 9a91485c10e059dee1374e152e4b068cd9d3866c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 5 Dec 2019 11:41:09 -0500 Subject: 0.9.2 @safe & @trusted first pass --- org/out_latex.org | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'org/out_latex.org') diff --git a/org/out_latex.org b/org/out_latex.org index 5f2021c..4e0ff3e 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -129,7 +129,7 @@ import #+BEGIN_SRC d auto paper() { struct PaperType { - auto a4() { + auto a4() @safe { struct A4 { auto portrait() { struct V { @@ -150,7 +150,7 @@ import } return A4(); } - auto a5() { + auto a5() @safe { struct A5 { auto portrait() { struct V { @@ -171,7 +171,7 @@ import } return A5(); } - auto b4() { + auto b4() @safe { struct B4 { auto portrait() { struct V { @@ -192,7 +192,7 @@ import } return B4(); } - auto letter() { + auto letter() @safe { struct Letter { auto portrait() { struct V { @@ -213,7 +213,7 @@ import } return Letter(); } - auto legal() { + auto legal() @safe { struct Legal { auto portrait() { struct V { @@ -247,7 +247,7 @@ import string sp_char_esc(O)( string _txt, const O obj, -) { +) @safe { string _unescape_sp_char_esc()(string _txt) { _txt = _txt .replaceAll(rgx.latex_special_char_escaped, @@ -275,7 +275,7 @@ string sp_char_esc(O)( #+BEGIN_SRC d string sp_char_esc_txt()( string _txt, -) { +) @safe { string _unescape_sp_char_esc()(string _txt) { _txt = _txt .replaceAll(rgx.latex_special_char_escaped, @@ -302,7 +302,7 @@ string sp_char_esc_txt()( #+BEGIN_SRC d string sp_char_esc()( string _txt, -) { +) @safe { _txt = replaceAll!(m => "\\" ~ m[1])(_txt, rgx.latex_special_char); return _txt; } @@ -317,7 +317,7 @@ string sp_char_esc()( #+BEGIN_SRC d string fontface()( string _txt, -) { +) @safe { _txt = _txt .replaceAll(rgx.inline_emphasis, format(q"┃\begin{bfseries}%s\end{bfseries}┃", "$1")) .replaceAll(rgx.inline_bold, format(q"┃\begin{bfseries}%s\end{bfseries}┃", "$1")) @@ -340,7 +340,7 @@ _txt = _txt #+BEGIN_SRC d string leading_hardspaces()( string _txt, -) { +) @safe { string hardspaces(string _spaces) { _spaces = _spaces .replaceAll(rgx.space, "\\hardspace "); @@ -355,7 +355,7 @@ string leading_hardspaces()( #+name: output_latex_shared #+BEGIN_SRC d -string nbsp_char()(string _txt) { +string nbsp_char()(string _txt) @safe { if (_txt.match(rgx.nbsp_char)) { _txt = _txt.replaceAll(rgx.nbsp_char, "\\hardspace "); } @@ -367,7 +367,7 @@ string nbsp_char()(string _txt) { #+name: output_latex_shared #+BEGIN_SRC d -string nbsp_char_to_space()(string _txt) { +string nbsp_char_to_space()(string _txt) @safe { if (_txt.match(rgx.nbsp_char)) { _txt = _txt.replaceAll(rgx.nbsp_char, " "); } @@ -384,7 +384,7 @@ string links_and_images(O,M)( string _txt, const O obj, M doc_matters, -) { +) @safe { if (obj.has.inline_links) { // TODO some images do not have inline links ... image without link string _width_adjust(string _width) { if (_width.to!int > 300) { _width = "300"; } // will need to vary max with papersize & orientation @@ -434,7 +434,7 @@ string links_and_images(O,M)( #+BEGIN_SRC d string footnotes()( string _txt, -) { +) @safe { if (_txt.match(rgx.inline_notes_al_gen)) { string _tex_note = q"┃\hypertarget{noteref_%s}{}\footnote[%s]{%% \label{note_%s}%s}┃"; @@ -455,7 +455,7 @@ string footnotes()( #+BEGIN_SRC d string remove_footnotes()( string _txt, -) { +) @safe { if (_txt.match(rgx.inline_notes_al_gen)) { _txt = replaceAll!(m => "")(_txt, rgx.inline_notes_al_gen); } @@ -471,7 +471,7 @@ string remove_footnotes()( string para(O)( string _txt, O obj, -) { +) @safe { if (obj.metainfo.is_of_type == "para") { string _tex_para; _tex_para = q"┃\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{%s}{%s}\end{tiny}}}%s┃"; @@ -492,7 +492,7 @@ string para(O)( string bookindex(O)( string _txt, O obj, -) { +) @safe { if (obj.metainfo.is_of_type == "para" && obj.metainfo.is_a == "bookindex" ) { @@ -513,7 +513,7 @@ string bookindex(O)( string bullets_and_indentation(O)( string _txt, O obj, -) { +) @safe { string _tex_para; string _hang; string _indent; int _paper_margin = -10; @@ -560,7 +560,7 @@ string bullets_and_indentation(O)( O obj, M doc_matters, string _part = "" - ) { + ) @safe { if (obj.metainfo.is_a == "heading") { string _tex_para; string _pg_break; -- cgit v1.2.3