diff options
author | Alex Merry <alex.merry@cs.ox.ac.uk> | 2012-05-07 14:39:54 +0100 |
---|---|---|
committer | Alex Merry <alex.merry@cs.ox.ac.uk> | 2012-05-07 14:39:54 +0100 |
commit | 37e7f18392109225ca5c257d14eda2f89a938370 (patch) | |
tree | 09d6adf5d00c7ccb413cae5f2fb9df22e1d75c48 /tikzit/src/common/NSString+LatexConstants.m | |
parent | 6c41239ab07752b4ba5009522bbaca0f3e0cdbc6 (diff) |
Correctly remove $ at end of latex commands
Previously, a string like '$\alpha$' would retain the final $ when
displayed on a label.
Diffstat (limited to 'tikzit/src/common/NSString+LatexConstants.m')
-rw-r--r-- | tikzit/src/common/NSString+LatexConstants.m | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tikzit/src/common/NSString+LatexConstants.m b/tikzit/src/common/NSString+LatexConstants.m index d2d0ed8..bd598b7 100644 --- a/tikzit/src/common/NSString+LatexConstants.m +++ b/tikzit/src/common/NSString+LatexConstants.m @@ -176,7 +176,9 @@ static NSSet *texModifiers = nil; if (c=='\\') { state = 1; } else { - [buf appendFormat:@"%C", c]; + if (c!='$') { + [buf appendFormat:@"%C", c]; + } state = 0; } |