markz

markz

markz's own examples: one file per construct, named by its id in syntax.md ({#id}), and not-supported.md with a ## for each Not supported row's warning code. The format is ../../harness/fences.ts's.

Every example is numbered in its fence, example 17, and is markz:17 wherever it is named. The numbers are one sequence across the files, so moving an example to another file never renames it: a new one takes the next number after the highest, and a removed one's number isn't used again.

The info string may go on to name the edge the example tries, for ../../harness/cases.ts: example 17 unclosed, or example 17 ambiguous <rule> with the side rule that settles it. The other edges (valid, boundary and near miss) are generated from the grammar, so no example is labelled with them. Every construct has an ambiguous and an unclosed example, or a reason in cases.ts why it can't.

Any example may name the side rule it holds instead, as example 55 attribute-merge. Every side rule must be held by something: a settlement or a warning in cases.ts, an example labelled with it, the oracle or the judge. A rule about markz's own output, which no oracle can judge, is held by its example.

Docs

  • attributes.md

    A bare key is one of HTML's boolean attributes.

  • blockquote.md

    > a
    > b
    >
    > c
    .
    <blockquote>
    <p>a
    b</p>
    <p>c</p>
    </blockquote>
    

  • code-block.md

    ````md
    ```js
    x
    ```
    ````
    .
    <pre><code class="language-md">```js
    x
    ```
    </code></pre>
    

  • comment.md

    <!-- one -->
    

  • element.md

    {@div .chart data=sales type="bar" /}
    .
    <div class="chart" data="sales" type="bar"></div>
    

  • emphasis.md

    _a_ **b** ~~c~~
    .
    <p><em>a</em> <strong>b</strong> <del>c</del></p>
    

  • escape.md

    \*a\* 10\ km &#169; &#x2014; &#0;
    .
    <p>*a* 10 km © — �</p>
    

  • expression.md

    ${f("}", `${"}"}`, /* } */ {a: 1})} after
    .
    <p><code class="language-js expression">f(&quot;}&quot;, `${&quot;}&quot;}`, /* } */ {a: 1})</code> after</p>
    

  • heading.md

    Every heading gets an id: {#id} on the line above, or GitHub's slug numbered past the ids already used.

  • inline-code.md

    `a` and `` b ` c `` and `${a}`
    .
    <p><code>a</code> and <code>b ` c</code> and <code>${a}</code></p>
    

  • inline-math.md

    $x^2$ and $a$
    .
    <p><code class="language-math math-inline">x^2</code> and <code class="language-math math-inline">a</code></p>
    

  • line-break.md

    a\
    b
    c
    .
    <p>a<br />
    b
    c</p>
    

  • link.md

    [docs](/docs){target=_blank} and ![hero](h.png){.wide width=600}
    .
    <p><a href="/docs" target="_blank">docs</a> and <img src="h.png" alt="hero" class="wide" width="600" /></p>
    

  • list.md

    - [x] done
    - [ ] todo
    .
    <ul>
    <li><input type="checkbox" disabled="" checked="" /> done</li>
    <li><input type="checkbox" disabled="" /> todo</li>
    </ul>
    

  • math-block.md

    $$
    x^2
    $$
    .
    <pre><code class="language-math math-display">x^2
    </code></pre>
    

  • metadata.md

    A closed block of key: lines is metadata, which html() doesn't write. Anything else is read as ordinary Markdown.

  • not-supported.md

    Each form docs/syntax.md cuts, under its warning code. The text stays, and every warning an example raises has that code.

  • paragraph.md

    {.verse}
    Moko kahan
    Main to
    .
    <p class="verse">Moko kahan
    Main to</p>
    

  • raw-block.md

    ```=html
    <b>hi</b>
    ```
    

  • span.md

    [x]{.y} and []{@badge-count n=3}
    .
    <p><span class="y">x</span> and <badge-count n="3"></badge-count></p>
    

  • table.md

    intro
    | a | b |
    | :- | -: |
    | 1 |
    .
    <p>intro</p>
    <table>
    <thead>
    <tr>
    <th align="left">a</th>
    <th align="right">b</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td align="left">1</td>
    <td align="right"></td>
    </tr>
    </tbody>
    </table>
    

  • thematic-break.md

    a