1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Added tasklist support to markdown exporter

This commit is contained in:
Dan Brown
2022-03-22 14:56:51 +00:00
parent ea62fe6004
commit c5aad29c72
3 changed files with 41 additions and 0 deletions

View File

@ -386,6 +386,18 @@ class ExportTest extends TestCase
$resp->assertSee("# Dogcat\n\n```JavaScript\nvar a = 'cat';\n```\n\nAnother line", false);
}
public function test_page_markdown_export_handles_tasklist_checkboxes()
{
$page = Page::query()->first()->forceFill([
'markdown' => '',
'html' => '<ul><li><input type="checkbox" checked="checked">Item A</li><li><input type="checkbox">Item B</li></ul>',
]);
$page->save();
$resp = $this->asEditor()->get($page->getUrl('/export/markdown'));
$resp->assertSee("- [x] Item A\n- [ ] Item B", false);
}
public function test_chapter_markdown_export()
{
$chapter = Chapter::query()->first();