misuzu/src/Parsers/MarkdownParser.php

25 lines
687 B
PHP
Raw Normal View History

2022-09-13 13:14:49 +00:00
<?php
namespace Misuzu\Parsers;
use Parsedown;
class MarkdownParser extends Parsedown implements ParserInterface {
public function parseText(string $text): string {
return $this->text($text);
}
public function parseLine(string $line): string {
return $this->line($line);
}
protected function inlineImage($excerpt) {
$object = parent::inlineImage($excerpt);
2023-01-01 20:27:25 +00:00
//if(!empty($object['element']['attributes']['src']) && !is_local_url($object['element']['attributes']['src'])) {
// $object['element']['attributes']['src'] = url_proxy_media($object['element']['attributes']['src']);
//}
2022-09-13 13:14:49 +00:00
return $object;
}
}