Like other inline markup, whitespace immediately after opening is not allowed . foo$ 1+1 = 2$ bar .
foo$ 1+1 = 2$ bar
foo $1+1 = 2 $bar