Skip to content
Permalink
Browse files

Use extended ParsedownExtra, rename parsers

  • Loading branch information...
damiani committed Mar 8, 2019
1 parent f079fb3 commit 5e76c5ca92e6a75beeeb6613f9166ec157325dc6
Showing with 24 additions and 23 deletions.
  1. +4 −4 jigsaw-core.php
  2. +20 −0 src/Parsers/MarkdownParser.php
  3. +0 −19 src/Parsers/ParsedownExtraParser.php
@@ -10,7 +10,7 @@
use Illuminate\View\Factory;
use Illuminate\View\FileViewFinder;
use Mni\FrontYAML\Bridge\Symfony\SymfonyYAMLParser;
use Mni\FrontYAML\Markdown\MarkdownParser;
use Mni\FrontYAML\Markdown\MarkdownParser as FrontYAMLMarkdownParser;
use Mni\FrontYAML\Parser;
use Mni\FrontYAML\YAML\YAMLParser;
use TightenCo\Jigsaw\CollectionItemHandlers\BladeCollectionItemHandler;
@@ -34,7 +34,7 @@
use TightenCo\Jigsaw\Loaders\CollectionRemoteItemLoader;
use TightenCo\Jigsaw\Loaders\DataLoader;
use TightenCo\Jigsaw\Parsers\FrontMatterParser;
use TightenCo\Jigsaw\Parsers\ParsedownExtraParser;
use TightenCo\Jigsaw\Parsers\MarkdownParser;
use TightenCo\Jigsaw\PathResolvers\BasicOutputPathResolver;
use TightenCo\Jigsaw\PathResolvers\CollectionPathResolver;
use TightenCo\Jigsaw\SiteBuilder;
@@ -82,10 +82,10 @@
$container->bind(YAMLParser::class, SymfonyYAMLParser::class);
$container->bind(MarkdownParser::class, ParsedownExtraParser::class);
$container->bind(FrontYAMLMarkdownParser::class, MarkdownParser::class);
$container->bind(Parser::class, function ($c) {
return new Parser($c[YAMLParser::class], $c[MarkdownParser::class]);
return new Parser($c[YAMLParser::class], $c[FrontYAMLMarkdownParser::class]);
});
$container->bind(FrontMatterParser::class, function ($c) {
@@ -0,0 +1,20 @@
<?php
namespace TightenCo\Jigsaw\Parsers;
use Mni\FrontYAML\Markdown\MarkdownParser as FrontYAMLMarkdownParser;
use TightenCo\Jigsaw\Parsers\JigsawMarkdownParser;
use ParsedownExtra;
class MarkdownParser implements FrontYAMLMarkdownParser
{
public function __construct(JigsawMarkdownParser $parser = null)
{
$this->parser = $parser ?: new JigsawMarkdownParser();
}
public function parse($markdown)
{
return $this->parser->parse($markdown);
}
}

This file was deleted.

0 comments on commit 5e76c5c

Please sign in to comment.
You can’t perform that action at this time.