mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-15 23:13:47 +00:00
Refactor Lua string escaping to a new utility class
This commit is contained in:
2 files changed
+10
-6
No files matched your search
@@ -0,0 +1,10 @@
|
||||
namespace SharedTools;
|
||||
|
||||
public static class LuaTools
|
||||
{
|
||||
public static string EscapeLuaString(string value)
|
||||
{
|
||||
// Replace backslashes with double backslashes and escape double quotes:
|
||||
return value.Replace("\\", @"\\").Replace("\"", "\\\"");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user