Skip to content

Parser is unaware of system-dependent newlines #212

@mmichaelis

Description

@mmichaelis

The parser is unaware of system-dependent newlines such as CRLF (Windows) or CR (classic MacOS).

My suggestion is, to document this behavior, rather than to change the whole processing. Anyone having issues with that (like we) could then just pre-process the BBCode to normalize newlines.

Test matrix:

Input Parsed
A\nB ["A", "\n", "B"]
A\r\nB ["A\r", "\n", "B"]
A\rB ["A\rB"]

If instead supporting other line separators, helper methods such as isEOL must be adapted, too.

Metadata

Metadata

Assignees

Labels

P1Moderate IssueenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions