Fixed some bugs and added parsing
This commit is contained in:
@ -12,6 +12,13 @@ namespace Dawn {
|
||||
};
|
||||
|
||||
static inline std::string stringParser(std::string v, std::string *error) {
|
||||
// Replace slashes and quotes
|
||||
v = stringReplaceAll(v, "\\", "\\\\\\");
|
||||
v = stringReplaceAll(v, "\"", "\\\"");
|
||||
|
||||
// Newlines.
|
||||
v = stringReplaceAll(v, "\n", "\\n");
|
||||
|
||||
return "\"" + v + "\"";
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user