Adding line breaks to sqlite text
Hello, i'm trying to add a text field into my database that can have line breaks.
According to what i've found on SO i can't insert escaped line breaks like "\n".
I'm trying to replace the "\n" with char(10) with sql templates and sql.raw, but nothing that i've tried seems to work.
https://stackoverflow.com/questions/47227684/how-to-insert-a-new-line-n-character-in-sqlite
Is this possible? Any help would be greatly appreciated.
Stack Overflow
How to insert a new line ("\n") character in SQLite?
While trying to insert something like:
"Hello\nWorld"
SQLite throws error something like:
Message: unrecognized token: "'Hello";" (also few other errors)
Even though I convert above string ...
2 Replies
does that not just work?
you can't insert line break escape sequences in the string you send to sqlite but that's not happening here - the unescaping is happening at the js interpreter level
for the most obvious demonstration:
well... this is awkward, you are completely right
i was't displaying it properly on the html (white-space: pre-grap) š¤¦āāļø
thanks a lot for the help