P5 text() and console.log treat multiline strings differently

Since I can’t see the rest of your code, I don’t know where it goes wrong. Obviously something is removing leading whitespace characters. Try to keep all the strings as String.raw to preserve all of the characters as you typed them.