on master help sign in
skip \r when generating shaders and escape backslashes
commit657b7f904b39cf1576a4da13deb3e29e76b0407f authorEvan Czaplicki <evancz@users.noreply.github.com> dateFri 19 Jul 2019, 09:55 (7 years ago) parenta3f8f88
1 file changed+2
compiler/src/AST/Utils/Shader.hs+2
compiler/src/AST/Utils/Shader.hs+2
@@ -74,9 +74,11 @@ escape chars =
7474 []
7575
7676 c:cs
77+ | c == '\r' -> escape cs
7778 | c == '\n' -> '\\' : 'n' : escape cs
7879 | c == '\"' -> '\\' : '"' : escape cs
7980 | c == '\'' -> '\\' : '\'' : escape cs
81+ | c == '\\' -> '\\' : '\\' : escape cs
8082 | otherwise -> c : escape cs
8183
8284