<div dir="ltr"><div>(including the list in addresses again)</div><div dir="ltr"><br></div><div dir="ltr">Am Mi., 21. Aug. 2019 um 23:53 Uhr schrieb gettimothy <<a href="mailto:gettimothy@zoho.com" target="_blank">gettimothy@zoho.com</a>>:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u><div><div style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10pt"><div><span style="font-size:10pt">"1. Can't you just replace each ' in your Lua text by '' (two single quotes) before compiling the Smalltalk method string? It escapes the single quotes in the string."</span><br></div><div><br></div><div>How?  I tried wrapping it with String Concatenation and it failed to compile.<br></div><blockquote style="border:1px solid rgb(204,204,204);padding:7px;background-color:rgb(245,245,245)"><div>", oldtext, ".<br></div></blockquote><div><br></div></div></div></blockquote><div><br></div><div>    methodTemplateLua := 'lua ^ ''{1}'''.</div><div>    methodSourceLua := methodTemplateLua format:</div><div>       {lua copyReplaceTokens: '''' "four single quotes" with: '''''' "six single quotes"}.</div><div><br></div><div>Or for more comfortable reading:</div><div><br></div><div>    lua copyReplaceTokens: (String with: $') with: (String with: $' with: $')</div><div><br></div><div>Still, I would avoid tinkering with the code and go with the (class) instance variable approach if possible.</div></div></div>