In SugarCube 2, I want to format a Dungeons & Dragons-style attribute block so that the parenthetical texts announcing the modifiers are flush with each other regardless of whether their respective attributes are 1 or 2 digits. My game is in Courier, so every character is the same size, which means that doing so should be as simple as inserting a single extra space before the parenthetical text corresponding to any attribute that is only 1 digit. My immediate thought was to have an <<if>> macro insert that space whenever the corresponding attribute is lower than 10:
STR <<print $STR>><<if $STR lt 10>> <</if>> (Modifier <<if $STRModifier >= 0>>+<</if>><<print $STRModifier>>)
CON <<print $CON>><<if $CON lt 10>> <</if>> (Modifier <<if $CONModifier >= 0>>+<</if>><<print $CONModifier>>)
--and as you can see, I'd had success doing a similar thing to insert a + sign before non-negative modifiers. Unfortunately, in this case, the extra space seems to just disappear from the outputs. I know that the <<if>> macro itself is working as intended, and I've tried all sorts of variations, but in every case, it seems like SugarCube is trimming the extra whitespace against my wishes. I know that the documentation says that this does not happen. What am I doing wrong?