Skip to content

Spell checker does not respect text.lang if the *.typ is not included in main.typ #675

@YDX-2147483647

Description

@YDX-2147483647

Description

All Chinese characters are considered misspellings if text.lang ≠ "zh".

If I am previewing an English main.typ, and having another Chinese side.typ that is not included/imported in main.typ, then the content of side.typ will be considered misspellings even though I set text(lang: "zh") in side.typ.

// main.typ
#set text(lang: "en")

English
// #set text(lang: "zh")
// side.typ
#set text(lang: "zh")

中文
main.typ side.typ

The behavior is not stable. As shown in the following screenshots, the spell checking result of side.typ depends on whether and where I write #set text(lang: "zh") in main.typ.

Image Image Image

Reproduction URL

https://typst.app/project/rt7RCtMFgDLlFw4duOkfmE

Browsers

Firefox

OS

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.improveRelated to the diagnostics, comments, and spellcheckspellcheckAbout spellcheck.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions