Skip to content
This repository has been archived by the owner on Apr 4, 2020. It is now read-only.

Commit

Permalink
Make compatible with league/commonmark 1.0.0-beta3
Browse files Browse the repository at this point in the history
  • Loading branch information
colinodell committed May 28, 2019
1 parent 62d7315 commit 53bd6ba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased][unreleased]

## [1.0.0-beta2] - 2019-05-27

### Changed

- Updated extension to work with `league/commonmark` 1.0.0-beta3

## [1.0.0-beta1] - 2019-05-27

### Changed
Expand Down Expand Up @@ -44,7 +50,8 @@ These older releases come from the original `uafrica/commonmark-ext` library.

- Updated to `league/commonmark` v0.17

[unreleased]: https://github.com/thephpleague/commonmark-ext-strikethrough/compare/v1.0.0-beta1...HEAD
[unreleased]: https://github.com/thephpleague/commonmark-ext-strikethrough/compare/v1.0.0-beta2...HEAD
[1.0.0-beta2]: https://github.com/thephpleague/commonmark-ext-strikethrough/compare/v1.0.0-beta1...v1.0.0-beta2
[1.0.0-beta1]: https://github.com/thephpleague/commonmark-ext-strikethrough/compare/v0.4.0...v1.0.0-beta1
[0.4.0]: https://github.com/thephpleague/commonmark-ext-strikethrough/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/thephpleague/commonmark-ext-strikethrough/compare/v0.2.0...v0.3.0
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"require": {
"php": "^7.1",
"ext-mbstring": "*",
"league/commonmark": "^1.0.0-beta2"
"league/commonmark": "^1.0.0-beta3"
},
"require-dev": {
"phpunit/phpunit": "^7.5"
Expand Down
6 changes: 3 additions & 3 deletions src/StrikethroughDelimiterProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace League\CommonMark\Ext\Strikethrough;

use League\CommonMark\Delimiter\Delimiter;
use League\CommonMark\Delimiter\DelimiterInterface;
use League\CommonMark\Delimiter\Processor\DelimiterProcessorInterface;
use League\CommonMark\Inline\Element\AbstractStringContainer;

Expand Down Expand Up @@ -44,9 +44,9 @@ public function getMinLength(): int
/**
* {@inheritdoc}
*/
public function getDelimiterUse(Delimiter $opener, Delimiter $closer): int
public function getDelimiterUse(DelimiterInterface $opener, DelimiterInterface $closer): int
{
$min = \min($opener->getNumDelims(), $closer->getNumDelims());
$min = \min($opener->getLength(), $closer->getLength());

return $min >= 2 ? $min : 0;
}
Expand Down

0 comments on commit 53bd6ba

Please sign in to comment.