Reference Limitations

Annotated source

Indentation means nothing in mdsvex, since it is how markup inside elements and components is laid out. Four spaces of indent don't make a code block.

You write
    code

CommonMark

code
<pre><code>code
</code></pre>

mdsvex

code

<p>code</p>

Use a fence. On the atlas: code fence.

A fence can be indented, inside an element or not. The indent of its opening fence is not code, and each line of its code loses up to as much leading whitespace, so a fence indented as a whole holds the same code as it does unindented:

You write
<div>
	```js
	let x;
	```
</div>

You get
Compiles to
<div>
  <pre><code class="language-js"
      >let x;</code
    ></pre>
</div>

A line indented less loses what it has.

Only <https://example.com> is a link, unless @mdsvex/plugin-references is set to link them.

You write
See https://example.com

GFM

<p>See <a href="https://example.com">https://example.com</a></p>

mdsvex

See https://example.com

<p>See https://example.com</p>

On the atlas: autolink.

  • GitHub alerts. > [!NOTE] is a block quote, write :::note. The migrator rewrites them.
  • Definition lists and wiki links, see nothing yet. ==mark== is text too, write :mark[text].

  • Replacements of its own for a component. Markdown inside a component uses the document's replacements, see nested scopes for the way around it.
  • A plugin that adds syntax. A plugin changes the tree the parser made, and can rewrite text, but what is markdown is fixed.

mdsvex, markdown with Svelte in it. MIT licence.