So I'm writing code for auto-completion of HTML tags when the
user is typing in a TextArea (See attached code). Now the way I do
this rids the TextArea of line breaks, which makes sense to me, but
then I try to put them back in (I store their locations) only the
last two lines actually get these line breaks (see sample output).
Could someone tell me what I'm doing wrong/not seeing?