mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Fixed page copying not retaining content
Was when there was no markdown content. Added tests to cover both HTML and markdown scenarios. Also removed old console.log Related to #2463
This commit is contained in:
@ -210,7 +210,7 @@ class PageRepo
|
||||
}
|
||||
|
||||
$pageContent = new PageContent($page);
|
||||
if (isset($input['markdown'])) {
|
||||
if (!empty($input['markdown'] ?? '')) {
|
||||
$pageContent->setNewMarkdown($input['markdown']);
|
||||
} else {
|
||||
$pageContent->setNewHTML($input['html']);
|
||||
|
Reference in New Issue
Block a user