Skip to content

Preserve the last empty comment line after eval plugin#631

Merged
pepeiborra merged 1 commit into
haskell:masterfrom
expipiplus1:joe-preserve-eval-spacing
Nov 27, 2020
Merged

Preserve the last empty comment line after eval plugin#631
pepeiborra merged 1 commit into
haskell:masterfrom
expipiplus1:joe-preserve-eval-spacing

Conversation

@expipiplus1

Copy link
Copy Markdown
Contributor
-- >>> foo
--
-- >>> bar

After running the plugin on both prompts we end up with this:

-- >>> foo
-- foo_output
--
-- >>> bar
-- bar_output

instead of

-- >>> foo
-- foo_output
-- >>> bar
-- bar_output

```haskell
-- >>> foo
--
-- >>> bar
```

After running the plugin on both prompts we end up with this:

```haskell
-- >>> foo
-- foo_output
--
-- >>> bar
-- bar_output
```

instead of

```haskell
-- >>> foo
-- foo_output
-- >>> bar
-- bar_output
```

@Ailrun Ailrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please provide some rationals for this change?

@expipiplus1

Copy link
Copy Markdown
Contributor Author

Could you please provide some rationals for this change?

Sure, I often have code of the form

-- >>> doctest1
-- result
--
-- >>> doctest2
-- result2
myFunction :: _

When I use the eval plugin the pleasing space between the doctests is removed.

@pepeiborra pepeiborra left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pepeiborra
pepeiborra merged commit d0fb85e into haskell:master Nov 27, 2020
@pepeiborra

Copy link
Copy Markdown
Collaborator

Thanks Joe!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants