haskell / haskell/haskell-mode

delete-trailing-whitespace removes empty LHS code lines

Open
#1,855 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
1.4k
Forks
354
Avg merge
5d 10h
Merged PRs (30d)
2

Description

In `literate-haskell-mode`, given some input like

```
foo
> bar
>
> baz
quux
```

The command `delete-trailing-whitespace` removes the empty code lines, producing:

```
foo
> bar

> baz
quux
```

The problem with this is that this results in two separate code blocks for `bar` and `baz` which are potentially typeset very differently than a single code block containing three lines with the middle being empty.

Contributor guide

Open the contributing guide

Research direction

Reproduce the example in literate-haskell-mode by running delete-trailing-whitespace on the supplied buffer. Trace the command's handling of the empty line prefixed with `>`, and consider the issue complete when that line remains part of the surrounding code block instead of becoming a separate block.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs, emacs-lisp, haskell
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.