Code Duplication    Length = 10-13 lines in 2 locations

block/FooterTrait.php 1 location

@@ 70-79 (lines=10) @@
67
     * @param $text
68
     * @return array
69
     */
70
    protected function parseFootnoteLink($text)
71
    {
72
        if (preg_match('/^\[\^(.+?)\]/', $text, $matches)) {
73
            return [
74
                ['footnoteLink', $matches[1]],
75
                strlen($matches[0])
76
            ];
77
        }
78
        return [['text', $text[0]], 1];
79
    }
80
81
    /**
82
     * @param $block

inline/StrikeoutTrait.php 1 location

@@ 19-31 (lines=13) @@
16
	 * Parses the strikethrough feature.
17
	 * @marker ~~
18
	 */
19
	protected function parseStrike($markdown)
20
	{
21
		if (preg_match('/^~~(.+?)~~/', $markdown, $matches)) {
22
			return [
23
				[
24
					'strike',
25
					$this->parseInline($matches[1])
26
				],
27
				strlen($matches[0])
28
			];
29
		}
30
		return [['text', $markdown[0] . $markdown[1]], 2];
31
	}
32
33
	protected function renderStrike($block)
34
	{