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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user