##// END OF EJS Templates
fix latex_transformer and add test
Matthias BUSSONNIER -
Show More
@@ -63,7 +63,7 b' def remove_math_space(text):'
63 63 math_lines += 1
64 64 if math_lines > 1:
65 65 within_math = False
66 ptext = ptext+text[math_start_index:index]+"\n"
66 ptext = ptext+text[math_start_index:index]
67 67
68 68 # Remember the last character so we can easily watch
69 69 # for backslashes
@@ -11,6 +11,15 b' def test_space(input, reference):'
11 11
12 12
13 13 def test_evens():
14 unchanged = [
15 """
16 you should be able to type
17
18 $ a single dollar and go to the line
19
20 it shouldn't be transformed.
21 """
22 ]
14 23 references = [
15 24 ('$e$','$e$'),
16 25 ('$ e $','$e$'),
@@ -19,7 +28,11 b' def test_evens():'
19 28 ('xxx$e^i $yyy','xxx$e^i$yyy'),
20 29 ('xxx$ e^i$yyy','xxx$e^i$yyy'),
21 30 ('\$ e $ e $','\$ e $e$'),
31 ('',''),
22 32 ]
23 33
24 34 for k,v in references :
25 35 yield test_space, k,v
36
37 for unch in unchanged :
38 yield test_space, unch, unch
General Comments 0
You need to be logged in to leave comments. Login now