1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Updated markdown export implementation

- Removed ZIP system for now, until the idea can be fleshed out.
- Added testing to cover.
- Upgraded used library.
- Added custom handling for BookStack callouts.
- Added HTML cleanup to better produce output for things like code
  blocks.
This commit is contained in:
Dan Brown
2021-06-22 21:02:18 +01:00
parent 9af636bd48
commit 57ea2e92ec
10 changed files with 344 additions and 112 deletions

View File

@ -59,17 +59,7 @@ class BookExportController extends Controller
public function markdown(string $bookSlug)
{
$book = $this->bookRepo->getBySlug($bookSlug);
$textContent = $this->exportService->bookToMarkdown($book);
$textContent = $this->exportFormatter->bookToMarkdown($book);
return $this->downloadResponse($textContent, $bookSlug . '.md');
}
/**
* Export a book as a zip file, made of markdown files.
*/
public function zip(string $bookSlug)
{
$book = $this->bookRepo->getBySlug($bookSlug);
$filename = $this->exportService->bookToZip($book);
return response()->download($filename);
}
}