So if I get it correctly, you take whatever the user inputs, indent it properly and add it to the rest of your program (and then run that whole program).
So after you put the user input into your program, you could run a regex, that basically takes that forced indentation back. Something like: Within three quotes, replace all "new line markers" followed by four spaces (or a tab) with only a "new line marker".
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…