title: How to set multiline rule in Monaco Editor
body: <p>I am looking at the sandbox for Monaco Editor here: <a href="https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages" rel="nofollow noreferrer">https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages</a></p>
  <p>I'm trying to support the following case:</p>
  <pre><code>&quot;A single line quote&quot;
  &quot;But also a slightly weird
  multi line quote&quot;
  </code></pre>
  <p>I need to support both because the language I'm working with support both. Now, the rule I set up looks like this:</p>
  <pre><code>// Register a tokens provider for the language
  monaco.languages.setMonarchTokensProvider('mySpecialLanguage', {
      tokenizer: {
          root: [
              [/&quot;(?:[^&quot;\\]|\\.\n{0,})*&quot;/gi, 'my-string'],
          ]
      }
  });
  
  // Define a new theme that contains only rules that match this language
  monaco.editor.defineTheme('myCoolTheme', {
      base: 'vs',
      inherit: false,
      rules: [
          { token: 'my-string', foreground: '0000FF' },
      ]
  });
  </code></pre>
  <p>The problem is that the multi-line quote isn't working. I'm suspecting that Monaco parses the text/code line-by-line which causes the problem, but surely I can't be alone with this issue.
  Is there a flag or something I have to set?</p>