mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Added strikethrough support to back-end md rendering
Needed to tweak the default library strikethrough extension so that it uses the same element as front-end. Added testing to cover. For #2470.
This commit is contained in:
@ -461,4 +461,22 @@ class PageContentTest extends TestCase
|
||||
$pageView = $this->get($page->getUrl());
|
||||
$pageView->assertElementExists('.page-content input[type=checkbox]');
|
||||
}
|
||||
|
||||
public function test_page_markdown_strikethrough_rendering()
|
||||
{
|
||||
$this->asEditor();
|
||||
$page = Page::query()->first();
|
||||
|
||||
$content = '~~some crossed out text~~';
|
||||
$this->put($page->getUrl(), [
|
||||
'name' => $page->name, 'markdown' => $content,
|
||||
'html' => '', 'summary' => ''
|
||||
]);
|
||||
|
||||
$page->refresh();
|
||||
$this->assertStringMatchesFormat('%A<s%A>some crossed out text</s>%A', $page->html);
|
||||
|
||||
$pageView = $this->get($page->getUrl());
|
||||
$pageView->assertElementExists('.page-content p > s');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user