Skip to content

Commit

Permalink
Remove Shoop dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbruce committed Aug 27, 2020
1 parent 0eca757 commit 88bd000
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
],
"require": {
"php": "^7.2",
"league/commonmark": "~1.5",
"8fold/php-shoop": "~0.5"
"league/commonmark": "~1.5"
},
"require-dev": {
"phpunit/phpunit": "~9.1"
Expand Down
6 changes: 3 additions & 3 deletions src/AbbreviationInlineParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public function parse(InlineParserContext $inlineContext): bool
$cursor->restoreState($previousCursor);
return false;
}

list($abbr, $title) = Shoop::string($abbr)->dropFirst(2)->dropLast()
->divide("](", false, 2);
$abbr = substr($abbr, 2);
$abbr = substr($abbr, 0, -1);
list($abbr, $title) = explode("](", $abbr, 2);
$elem = new Abbreviation($abbr, $title);

$inlineContext->getContainer()->appendChild($elem);
Expand Down

0 comments on commit 88bd000

Please sign in to comment.