lex scope for with-connection, strip newlines from outgoing js