Skip to content

Commit c9b012f

Browse files
author
Genert Org
committed
Newline parser addon
1 parent a8c7b85 commit c9b012f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CHANGELOG.MD

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
33

44
The project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
55

6+
## [1.0.3] - 2017-07-18
7+
### Added
8+
- Newline parser
9+
10+
## [1.0.2] - 2017-07-18
11+
### Changed
12+
- Fix add parser issue having missing content.
13+
614
## [1.0.1] - 2017-07-17
715
### Added
816
- Add parser functionality.

src/Parser/BBCodeParser.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ final class BBCodeParser extends Parser {
110110
'replace' => '<td>$1</td>',
111111
'content' => '$1',
112112
],
113+
'linebreak' => [
114+
'pattern' => '/\r\n/',
115+
'replace' => '<br />',
116+
'content' => '',
117+
],
113118
];
114119

115120
public function stripTags(string $source): string

0 commit comments

Comments
 (0)