Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(toml): Update frontmatter parser for RFC 3503 #14792

Merged
merged 10 commits into from
Nov 15, 2024
Merged

Commits on Nov 8, 2024

  1. Configuration menu
    Copy the full SHA
    f018624 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d769cb5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2ea0d97 View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2024

  1. Configuration menu
    Copy the full SHA
    c88c789 View commit details
    Browse the repository at this point in the history
  2. refactor(toml): Remove 'tick' language

    We've switched to dashes
    epage committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    8c88f23 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    45c2ff8 View commit details
    Browse the repository at this point in the history
  4. refactor(toml): Preserve the full newline for shebang

    The shebang is thrown away so this has no end-user impact
    epage committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    51db441 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8918634 View commit details
    Browse the repository at this point in the history
  6. fix(toml): Don't error on leading whitespace in infostring

    According to the [RFC](https://rust-lang.github.io/rfcs/3503-frontmatter.html):
    
    > Opens with 3+ dashes followed by 0+ whitespace,
    > an optional term (one or more characters excluding whitespace and commas),
    > 0+ whitespace, and a newline
    epage committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    c1248ad View commit details
    Browse the repository at this point in the history
  7. fix(toml): Strip blank linkes before frontmatter

    From the [RFC](https://rust-lang.github.io/rfcs/3503-frontmatter.html)
    
    > When parsing Rust source, after stripping the shebang (#!), rustc will strip the frontmatter:
    >
    > - May include 0+ blank lines (whitespace + newline)
    
    The question is what is a non-newline whitespace and what is a newline.
    Looking at the [Reference](https://doc.rust-lang.org/reference/whitespace.html),
    the answer is "unsure", particularly because the Rust language doesn't
    generally try to distinguish them.
    I kept things basic for now and we can revisit later.
    epage committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    82836b0 View commit details
    Browse the repository at this point in the history