<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi, there.<div><br></div><div>#printString on String does the trick:</div><div><br></div><div><span style="font-size: 10pt">methodTemplateLua := 'lua ^ {1}'.<br>    methodSourceLua := methodTemplateLua format: { lua printString }.</span></div><div><span style="font-size: 10pt"><br></span></div><div><span style="font-size: 10pt">Best,</span></div><div><span style="font-size: 10pt">Marcel</span></div><div class="mb_sig"></div>
                                        
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 22.08.2019 00:26:15 schrieb Jakob Reschke <forums.jakob@resfarm.de>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><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;min-width: 500px"><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);min-width: 500px"><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>
</div></blockquote></div>