private static string EscapeInitialAndClosingDoubleQuotes(string code)
{
if (code.StartsWith(DoubleQuote))
code = ClosingQuoteReplacement + code.Substring(DoubleQuote.Length);
if (code.EndsWith(DoubleQuote))
code = code.Substring(0, code.Length - DoubleQuote.Length) + ClosingQuoteReplacement;
return code;
}