Completed
Push — master ( a3e52e...3da711 )
by Josh
01:34
created

InlineSpoiler::parse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
* @package   s9e\TextFormatter
5
* @copyright Copyright (c) 2010-2019 The s9e Authors
6
* @license   http://www.opensource.org/licenses/mit-license.php The MIT License
7
*/
8
namespace s9e\TextFormatter\Plugins\Litedown\Parser\Passes;
9
10
class InlineSpoiler extends AbstractInlineMarkup
11
{
12
	/**
13
	* {@inheritdoc}
14
	*/
15 8
	public function parse()
16
	{
17 8
		$this->parseInlineMarkup('>!', '/>![^\\x17]+?!</',         'ISPOILER');
18 8
		$this->parseInlineMarkup('||', '/\\|\\|[^\\x17]+?\\|\\|/', 'ISPOILER');
19
	}
20
}