Skip to content

Parser is unaware of system-dependent newlines #212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mmichaelis opened this issue Dec 5, 2023 · 0 comments
Open

Parser is unaware of system-dependent newlines #212

mmichaelis opened this issue Dec 5, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request P1 Moderate Issue

Comments

@mmichaelis
Copy link

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.

@JiLiZART JiLiZART self-assigned this Dec 5, 2023
@JiLiZART JiLiZART added the enhancement New feature or request label Dec 5, 2023
@JiLiZART JiLiZART added the P1 Moderate Issue label Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1 Moderate Issue
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants