JetBrains / JetBrains/markdown

CRLF line endings are not parsed correctly.

Open
#49 7 comments 7 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
958
Forks
104
Avg merge
17h 30m
Merged PRs (30d)
12

Description

The CommmonMark spec [requires CR and CRLF](https://spec.commonmark.org/0.29/#line-ending) to be supported as line endings, but this library parses CRLF incorrectly. For example:

```kotlin
MarkdownParser(CommonMarkFlavourDescriptor()).buildMarkdownTreeFromString("a \r\nb")
```

parses as:

```
Markdown:PARAGRAPH
Markdown:TEXT 'a'
Markdown:BR '·␍'
Markdown:EOL '␊'
Markdown:TEXT 'b'
```

and renders as:

```

a

b


```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.