So I’m trying to replace 600+ instances of an imported YouTube links, but it seems to only work when it’s on a line by itself.
So I need to insert a newline before the YouTube link itself. Thankfully, I have a “replaceme” type of string that can be replaced with the newline.
Is the appropriate way to do a Ruby newline? Or a Markdown newline?
Would something like this work?
rake posts:remap["replaceme","\n",string,true]
Or do I need to escape the \n a few times?
rake posts:remap["replaceme","\\\n",string,true]
Or should I aim for the markdown newline (which is a single backslash, correct?):
rake posts:remap["replaceme","\",string,true]
I guess I’d have to escape that too?
Any guidance appreciated.