title: sed error unterminated substitute pattern for new line text
body: <p>I am writing a script to add new dependencies to the watch list. I am putting a placeholder to know where to add the text, for eg</p>
  
  <pre><code>assets = [
    "../../new_app/assets"
    # [[NEW_APP_ADD_ASSETS]]
  ]
  </code></pre>
  
  <p>It is simple to replace just the place holder but my problem is to add comma in the previous line.</p>
  
  <p>that can be done if I search and replace </p>
  
  <pre><code>"
  # [[NEW_APP_ADD_ASSETS]]
  </code></pre>
  
  <p>ie <code>"\n # [[NEW_APP_ADD_ASSETS]]</code></p>
  
  <p>I am not able to search for the new line.</p>
  
  <p>One of the solutions I found for adding a new line was </p>
  
  <pre><code>sed -i '' 's/newline/line one\
  line two/' filename.txt
  </code></pre>
  
  <p>But when same way done for the search string it returns <code>:unterminated substitute pattern</code></p>
  
  <pre><code>sed -i '' s/'assets\"\
     #'/'some new text'/ filename.txt
  </code></pre>
  
  <p>PS: I writing on macos</p>