racket / racket/drracket

At-exp realignment problems when text splits onto a new line

Open
#93 0 comments 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

Lets say I have the following scribble file:

#lang scribble/base

This is an example paren bug that shouldn't happen in (@tt{Hello}).

When I hit alt+q to re-align it, it splits at the @tt, making the code look like:

#lang scribble/base

This is an example paren bug that shouldn't happen in (@tt{
 Hello}).

Which is fine, because at-exps ignore the first newline for text. But lets say that I want to add an additional word, say, prose before the @tt, and hit alt+q, the code now looks like:

#lang scribble/base

This is an example paren bug that shouldn't happen in prose
(@tt{ Hello}).

Note that the new space in @tt{ Hello}. Unlike before, this is not fine because at-exps don't throw away an initial space if text is on the same line. Instead, I would expect something like: @tt{Hell} to appear when formatting, so as to not change my prose.

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

Start by reproducing the Scribble example in DrRacket and use Alt+Q to observe how the at-exp is realigned when text moves across a line. Investigate the realignment behavior and verify that formatting does not introduce an unwanted space inside the at-exp while preserving the demonstrated line wrapping.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.