1
0
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:
Dan Brown
2021-01-09 19:39:09 +00:00
parent 831f441879
commit 526be33ab2
4 changed files with 92 additions and 71 deletions

View File

@ -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']);