racket / racket/drracket

Indentation depends on if a line is blank or not

Open
#318 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
516
Forks
103
PR merge metrics
No merged PRs in 30d

Description

The following program is indented with cmd-i (Except the | marks the end of a blank line not a pipe character in the file):

#lang scribble/base
@list{
      |
}
@list{
 a
}

As you can see the line after the @list{ indents to a different depth depending on if the line has content or not.

While this usually doesn't effect the rendering of anything and is mostly invisible, it winds up being annoying because I wind up with the situation <return> <types some text> "Why is this indented so oddly?!", then needing to remember I must reindent after adding text to a new line.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior in DrRacket with the provided Scribble program, using cmd-i on blank and non-blank lines. Trace the indentation entry point for Scribble code and make the indentation after @list{ consistent regardless of whether the line is blank, then verify both examples produce the same indentation.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.