Multiline Cells
Optional feature
Multiline cells require multiline: true in your configuration.
End a row with a backslash \ to continue the current cell content on the
next line. The lines are joined into a single cell and parsed as a block of
Markdown.
Basic multiline
Fenced code block inside a cell
Use the fenced_code extension alongside multiline to embed code blocks:
| Code | Result |
| :---------------------- | :------ |
| ``` python | hello |\
| print("hello") | |\
| ``` | |
<table>
<thead>
<tr>
<th style="text-align:left">Code</th>
<th style="text-align:left">Result</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nb">print</span><span class="p">(</span><span class="s2">"hello"</span><span class="p">)</span>
</code></pre></div>
</td>
<td style="text-align:left">
<p>hello</p>
</td>
</tr>
</tbody>
</table>
Bulleted list inside a cell
| Steps |
| :---------------------- |
| - Install dependencies |\
| - Run `mkdocs serve` |\
| - Open your browser |
| Steps |
|---|
|
Nested list inside a cell
Relative indentation is preserved, so nested lists work correctly:
Blockquote inside a cell
| Quote | Author |
| :----------------------- | :---------- |
| > To be, or not to be, | Shakespeare |\
| > that is the question. | |
| Quote | Author |
|---|---|
|
Shakespeare |
<table>
<thead>
<tr>
<th style="text-align:left">Quote</th>
<th style="text-align:left">Author</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">
<blockquote>
<p>To be, or not to be,
that is the question.</p>
</blockquote>
</td>
<td style="text-align:left">
<p>Shakespeare</p>
</td>
</tr>
</tbody>
</table>
Admonition inside a cell
Requires the admonition
extension.
| Feature | Notes |
| :------------ | :--------------------------- |
| Admonitions | !!! note |\
| | Works inside a cell! |
| Custom title | !!! warning "Heads up" |\
| | Check your config. |
| Feature | Notes |
|---|---|
|
Admonitions |
Note Works inside a cell! |
|
Custom title |
Heads up Check your config. |
<table>
<thead>
<tr>
<th style="text-align:left">Feature</th>
<th style="text-align:left">Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">
<p>Admonitions</p>
</td>
<td style="text-align:left">
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Works inside a cell!</p>
</div>
</td>
</tr>
<tr>
<td style="text-align:left">
<p>Custom title</p>
</td>
<td style="text-align:left">
<div class="admonition warning">
<p class="admonition-title">Heads up</p>
<p>Check your config.</p>
</div>
</td>
</tr>
</tbody>
</table>
Definition list inside a cell
Requires the def_list
extension.
| Term | Definition |
| :------------ | :--------------------------- |
| Apple | Apple |\
| | : A sweet fruit |
| Python | Python |\
| | : A programming language |
| Term | Definition |
|---|---|
|
Apple |
|
|
Python |
|
<table>
<thead>
<tr>
<th style="text-align:left">Term</th>
<th style="text-align:left">Definition</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">
<p>Apple</p>
</td>
<td style="text-align:left">
<dl>
<dt>Apple</dt>
<dd>A sweet fruit</dd>
</dl>
</td>
</tr>
<tr>
<td style="text-align:left">
<p>Python</p>
</td>
<td style="text-align:left">
<dl>
<dt>Python</dt>
<dd>A programming language</dd>
</dl>
</td>
</tr>
</tbody>
</table>
Notes
- Backslash continuation only works in body rows. A backslash at the end of a header row has no effect.
- With
multiline: false(the default), a trailing\is kept as literal cell content. - Colspan is preserved across continuation lines.