racket / racket/scribble

Contract violation when using prefab struct datums w/linebreaks in `racketblock`

Open
#356 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
250
Forks
102
Avg merge
11d 11h
Merged PRs (30d)
1

Description

This program:

#lang scribble/manual

@racketblock[
  '#s(doc
   (1
    2
    3))]

Results in:

syntax-e: contract violation
  expected: syntax?
  given: #f

Compare this version, which does not produce any errors:

@racketblock[
 '#s(doc (1
          2
          3))]

I would expect that the first work as well as the second, since both forms are valid when used directly in racket/base.

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 running the provided #lang scribble/manual example and compare the two racketblock forms, then inspect the racketblock entry point and its handling of prefab struct datums across line breaks. Done means the first form renders without the syntax-e contract violation, matching the behavior of the second form.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.