Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change horizontal rule style #219

Merged
merged 4 commits into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip

## [Unreleased][unreleased]

### Changed

- Changed horizontal rule style (#218, #219)

## [5.0.2] - 2021-11-06

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/Converter/HorizontalRuleConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class HorizontalRuleConverter implements ConverterInterface
{
public function convert(ElementInterface $element): string
{
return "- - - - - -\n\n";
return "---\n\n";
}

/**
Expand Down
9 changes: 5 additions & 4 deletions tests/HtmlConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,11 @@ public function testAnchor(): void

public function testHorizontalRule(): void
{
$this->assertHtmlGivesMarkdown('<hr>', '- - - - - -');
$this->assertHtmlGivesMarkdown('<hr/>', '- - - - - -');
$this->assertHtmlGivesMarkdown('<hr />', '- - - - - -');
$this->assertHtmlGivesMarkdown('<hr />', '- - - - - -');
$this->assertHtmlGivesMarkdown('<hr>', '---');
$this->assertHtmlGivesMarkdown('<hr/>', '---');
$this->assertHtmlGivesMarkdown('<hr />', '---');
$this->assertHtmlGivesMarkdown('<hr />', '---');
$this->assertHtmlGivesMarkdown('<p>Test</p><hr>', "Test\n\n---");
}

public function testLists(): void
Expand Down