Skip to content

Annotation for code blocks that aren't expected to compile #56

@saecki

Description

@saecki

Currently packages often use the typ language for readme examples that aren't valid typst code, or don't compile successfully, e.g.

```typ
#let my-func(
  a: int,
  b: str,
) = { ... }
```

This is a proposal to explicitly annotate these examples with some sort of tag, for example ignore, no-run, should-fail, or even more complex expressions such asexpect-failure=syntax, error=eval, to indicate they won't compile:

```typ ignore
#let my-func(
  a: int,
  b: str,
) = { ... }
```

This will even leave syntax highlighting intact:

#let my-func(
  a: int,
  b: str,
) = { ... }

The purpose of adding these tags, is to allow treating all other typ code blocks as tests that should compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions