bueltge/marksimple

View on GitHub
src/Rule/HorizontalLine.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

namespace Bueltge\Marksimple\Rule;

class HorizontalLine extends AbstractRegexRule
{
    /**
     * Get the regex rule to identify the fromFile for the callback.
     * Leave nh as horizontal line helper, only on lines without code ` before.
     *
     * @return string
     */
    public function rule(): string
    {
        return '/\n-{3,}/';
    }

    /**
     * {@inheritdoc}
     */
    public function render(array $content): string
    {
        return "\n<hr/>";
    }
}