How to prevent a single line break from being treated as a space?

Hi everyone,

By default a line break between text is treated as a space “␣”. This means:

foo
bar

prints as:

foo bar

How can I prevent single line break from being treated as a space for a whole document?

I want the example above to print as:

foobar

Thanks in advance!

You could do the following:

#{
  [foo]
  [bar]
}

There is no option to change the default behaviour. But it’s been discussed in this issue: Customizing source line break behavior · Issue #710 · typst/typst · GitHub or maybe here Ignore linebreaks between CJK characters in source code · Issue #792 · typst/typst · GitHub

1 Like