rescript-lang / rescript-lang/rescript-lang.org

Playground: Syntax highlighting breakage for polyvar usage in external

Open
#339 1 comment 0 reactions 1 assignee View on GitHub

@tsnobip is already working on this.

Since Apr 28, 2026.

bug playground
Dominant language
MDX
Stars
1.9k
Forks
260
Avg merge
3d 9h
Merged PRs (30d)
17

Description

Following example breaks the highlighter at #"best fit"

@obj
external dateTimeFormatOptions: (
  ~localeMatcher: [#"best fit" | #lookup]=?,
  ~formatMatcher: [@as("best fit") #bestFit | #basic]=?,
  ~timeZone: string=?,
  ~hour12: bool=?,
  ~weekday: [#narrow | #short | #long]=?,
  ~era: [#narrow | #short | #long]=?,
  ~year: [#numeric | @as("2-digit") #twoDigit]=?,
  ~month: [
    | #numeric
    | @as("2-digit") #twoDigit
    | #narrow
    | #short
    | #long
  ]=?,
  ~day: [#numeric | @as("2-digit") #twoDigit]=?,
  ~hour: [#numeric | @as("2-digit") #twoDigit]=?,
  ~minute: [#numeric | @as("2-digit") #twoDigit]=?,
  ~second: [#numeric | @as("2-digit") #twoDigit]=?,
  ~timeZoneName: [#short | #long]=?,
  ~format: string=?,
  unit,
) => dateTimeFormatOptions = ""


Playground Link

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.