Moerill / token-mold

MIT License
24 stars 33 forks source link

[BUG] Spaces are removed #81

Closed roman-yakobnyuk closed 2 years ago

roman-yakobnyuk commented 3 years ago

Hi!

Love this module, but having a small problem with it:

Describe the bug Using the feature to automatically add numbers to the tokens, I am unable to put a space before the number, as on configuration space all numbers get stripped. What I am trying to do is to achieve something like this: "Kobold 1", "Kobold 2" etc. Currently it turns into "Kobold1", "Kobold2".

Module incompatibilities I have been able to reproduce this with all other modules disabled

Desktop (please complete the following information): Latest FVTT version, Mac OS Client.

vexofp commented 3 years ago

As a work-around, the BRAILLE PATTERN BLANK character looks like a space, but is not stripped.

https://stackoverflow.com/a/59523326

smarekp commented 3 years ago

Using a ZERO WIDTH SPACE followed by a normal SPACE [] works for me. Apparently ZERO WIDTH SPACE is not considered whitespace, and therefore it and any subsequent whitespace are not trimmed.

Using a BRAILLE PATTERN BLANK [] as @vexofp suggested also works, but it's much wider than a normal SPACE and doesn't look as nice in my opinion.

vexofp commented 3 years ago

The ZERO WIDTH SPACE does let it look nicer! I found I needed one both before and after the space, however [​ ​]. I am guessing that this depends on whether or not you also have a parenthesis (or other non-whitespace character) asd part of your prefix.