elm-explorations / elm-explorations/markdown
New lines at the end of code blocks are being removed
- Dominant language
- Elm
- Stars
- 31
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
New lines at the end of code blocks are being removed.
If you check github code blocks for instance, they are not removed, just like the code in this very markdown:
```elm
a = 5
```
To reproduce, simply try adding some new lines at the end such as:
```elm
import Markdown
...
view =
Markdown.toHtml
[]
"""```javascript
a = 5
```
"""
```
And you will get the following:

NOTE that it chopped off all the final empty newlines.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the Markdown.toHtml entry point shown in the reproduction and trace how fenced code blocks handle trailing empty lines. Reproduce the Elm example, then verify that the resulting code block preserves its final newlines instead of chopping them off.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elm
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100