String content not properly escaped in stub generator output

The " character in the argument of the write command appears unescaped in the string literal in the generated code. This leads to syntax errors in the generated code.

An example is this contribution: https://www.codingame.com/contribute/view/2865988e9b3c7ac9e05b639253114f8f7b9bc. The stub generator input has the following line:

write "2 first characters"

The generated Python code thus has:

print(""2 first characters"")

To the best of my knowledge, this bug affects all languages other than Dart, JavaScript, Pascal, and TypeScript, which use ' to start and end a string literal in the generated code.

Hi,

It’s a known problem !!
Author and approvers should in theory check that :slight_smile: