mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +01:00
Added section in Monarch docs for Inspect Tokens development helper
This commit is contained in:
parent
5620c27122
commit
32926a385a
1 changed files with 11 additions and 0 deletions
|
|
@ -383,6 +383,17 @@ tokenizer: {
|
||||||
],</pre>
|
],</pre>
|
||||||
<p>Only when we find a matching end tag (outside a string), <code>$1==$S2</code>, we pop the state and exit the embedded mode. Note that we need <a href="#@rematch"><code class="dt">@rematch</code></a> since the editor is ignoring our token classes until we actually exit the embedded mode (and we handle the close tag again in the <code>@root</code> state).</p>
|
<p>Only when we find a matching end tag (outside a string), <code>$1==$S2</code>, we pop the state and exit the embedded mode. Note that we need <a href="#@rematch"><code class="dt">@rematch</code></a> since the editor is ignoring our token classes until we actually exit the embedded mode (and we handle the close tag again in the <code>@root</code> state).</p>
|
||||||
|
|
||||||
|
<p> </p>
|
||||||
|
<h2 id="htmlembed">Inspecting Tokens</h2>
|
||||||
|
|
||||||
|
<p>Monaco provides an <code>Inspect Tokens</code> tool in browsers to help identify the tokens parsed from source code.</p>
|
||||||
|
<p>To activate:</p>
|
||||||
|
<ol>
|
||||||
|
<li>Press <kbd>F1</kbd> while focused on a Monaco instance</li>
|
||||||
|
<li>Trigger the <code>Developer: Inspect Tokens</code> option</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p>This will show a display over the currently selected token for its language, token type, basic font style and colors, and selector you can target in your editor themes.</p>
|
||||||
</div> <!-- documentation -->
|
</div> <!-- documentation -->
|
||||||
</div> <!-- main -->
|
</div> <!-- main -->
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue