@@ -50,14 +50,14 @@ discard block |
||
50 | 50 | */ |
51 | 51 | class MarkdownFactory implements MarkdownFactoryInterface |
52 | 52 | { |
53 | - public const BREAK = '<br />'; |
|
53 | + public const break = '<br />'; |
|
54 | 54 | |
55 | 55 | // Commonmark uses <br /> for hard-breaks, so we use the same for soft-breaks. |
56 | 56 | protected const CONFIG_AUTOLINK = [ |
57 | 57 | 'allow_unsafe_links' => false, |
58 | 58 | 'html_input' => HtmlFilter::ESCAPE, |
59 | 59 | 'renderer' => [ |
60 | - 'soft_break' => self::BREAK, |
|
60 | + 'soft_break' => self::break, |
|
61 | 61 | ], |
62 | 62 | ]; |
63 | 63 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | 'allow_unsafe_links' => false, |
66 | 66 | 'html_input' => HtmlFilter::ESCAPE, |
67 | 67 | 'renderer' => [ |
68 | - 'soft_break' => self::BREAK, |
|
68 | + 'soft_break' => self::break, |
|
69 | 69 | ], |
70 | 70 | 'table' => [ |
71 | 71 | 'wrap' => [ |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $converter = new MarkDownConverter($environment); |
105 | 105 | |
106 | 106 | $html = $converter->convert($markdown)->getContent(); |
107 | - $html = strtr($html, ["</p>\n<p>" => self::BREAK . self::BREAK]); |
|
107 | + $html = strtr($html, ["</p>\n<p>" => self::break . self::break]); |
|
108 | 108 | |
109 | 109 | return trim(strip_tags($html, ['a', 'br'])); |
110 | 110 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | public const POLISH = 'polish'; |
44 | 44 | public const LITHUANIAN = 'lithuanian'; |
45 | 45 | public const ICELANDIC = 'icelandic'; |
46 | - public const DEFAULT = ''; |
|
46 | + public const default = ''; |
|
47 | 47 | |
48 | 48 | /** |
49 | 49 | * A list of supported surname traditions and their names. |
@@ -52,7 +52,7 @@ |
||
52 | 52 | $this->register(self::POLISH, new PolishSurnameTradition()); |
53 | 53 | $this->register(self::LITHUANIAN, new LithuanianSurnameTradition()); |
54 | 54 | $this->register(self::ICELANDIC, new IcelandicSurnameTradition()); |
55 | - $this->register(self::DEFAULT, new DefaultSurnameTradition()); |
|
55 | + $this->register(self::default, new DefaultSurnameTradition()); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -99,8 +99,8 @@ |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | // Take the first line |
102 | - $html = strtr($html, ["</p>\n<p>" => MarkdownFactory::BREAK . MarkdownFactory::BREAK]); |
|
103 | - [$html] = explode(MarkdownFactory::BREAK, strip_tags(trim($html), ['br'])); |
|
102 | + $html = strtr($html, ["</p>\n<p>" => MarkdownFactory::break . MarkdownFactory::break]); |
|
103 | + [$html] = explode(MarkdownFactory::break, strip_tags(trim($html), ['br'])); |
|
104 | 104 | |
105 | 105 | if ($html !== '') { |
106 | 106 | $html = htmlspecialchars_decode($html, ENT_QUOTES); |