In Polish, it’s a common practice to include a hyphen at the start of the line when breaking a word with a hyphen in it.
In that case, the word biało-czarny could be hyphenated to: biało- -czarny
In LaTeX, this could be achieved using \discretionary{-}{-}{-}. Is there anything similar to this in Typst? I don’t want to manually break it using -\ -
Starting with Typst v0.12, which is currently available for testing, this will happen automatically when setting the language to Polish using #set text(lang: "pl").
The same is true for the languages Lower Sorbian, Czech, Croatian, Portuguese, Slovak, and (in some cases) Spanish.
I’m neither aware of any way to currently do something like that, nor of any concrete plans to add one, but who knows what the future will bring.
To add a bit of context for any readers unfamiliar with the \discretionary macro: It can be used for words whose hyphenated form is different from. For example, the old German spelling rules dictated the word “lecker” to be hyphenated as “lek-/ker”, which can be set via \discretionary{lek-}{ker}{lecker}.