Skip to content

Show-set rules lose highlighting with where specifications #100

@thornoar

Description

@thornoar

Consider the following show-set rule:

#show heading.where(level: 2): set text(stroke: red)

Here, the text becomes white after the second colon. In fact, it seems that the problem is the symbols between the first colon and the set keyword. If these symbols exist, the highlighting is lost. However, such show-set rules start being correctly highlighted if the unnamed function notation (=>) is used, like that:

#show heading.where(level: 2): it => {
  // something
}

Unfortunately, this does not seem to be a reliable workaround. In some cases, a show-set rule (like the first one) is necessary, for example when you need to modify the behavior of the very function you select for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions