How can I insert unbreakable space automatically after some characters?

Your solution works great, however I don’t think the regex should contain commas, so I updated it to the following:

#let const = ("a","A","k","K","i", "I", "u", "U", "s", "S", "o", "O", "v", "V")
#show regex(" [" + const.join() + "] " ): it => [ #it.text.trim()~]

…and that does the job very well. There are no edge cases that I know of that need to be handled, so I will go with that. Thank you very much

1 Like