-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Code:
use FastVolt\Helper\Markdown;
$text = <<<MD
A
| B | C |
|-------------|---------|
| B1 | C1 |
MD;
// Initialize the parser
$markdown = new Markdown(); // or Markdown::new()
// set markdown content
$markdown->setContent($text);
// compile and get as raw HTML
echo $markdown->getHtml();
Output:
<table>
<thead>
<tr>
<th>A</th>
<th>B</th>
<th>C</th>
</tr>
</thead>
<tbody>
<tr>
<td>B1</td>
<td>C1</td>
</tr>
</tbody>
</table>
Note that A has become a table header instead of being a separate paragraph.
See also erusev/parsedown#929
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels