title: How to split excluding a specific string in markdown text in JavaScript?
body: <p>I'm making an app that splits the markdown content like the one below into a string of '---' and displays it as a slide. However, there is an error of splitting equally even if there is --- in the code block as shown below.</p>
  <p>How can I split only '---' as a string, excluding code block?</p>
  <pre><code>
  #Title
  
  ---
  
  ```js
  
  Please implement the method to display the console result below.
  
  const app = () =&gt; { ... }
  
  // output
  
  -
  ---  // this is problem
  --
  ...
  
  </code></pre>