generic text markup tools
修訂 | 5ccefa7cf69a8e7ad626f3ffa4cf6d0d7f08b238 (tree) |
---|---|
時間 | 2014-02-06 20:18:08 |
作者 | hylom <hylom@hylo...> |
Commiter | hylom |
fix ctable
@@ -1,6 +1,7 @@ | ||
1 | 1 | { |
2 | 2 | "usePlugins": [ |
3 | - "ctable" | |
3 | + "ctable", | |
4 | + "imagetools" | |
4 | 5 | ], |
5 | 6 | "modes": { |
6 | 7 | "global": { |
@@ -53,14 +53,14 @@ def renderTable(context, args): | ||
53 | 53 | break; |
54 | 54 | rowspan += 1; |
55 | 55 | if rowspan > 0: |
56 | - attrs["rowspan"] = rowspan | |
56 | + attrs["rowspan"] = rowspan + 1 | |
57 | 57 | colspan = 0 |
58 | 58 | for y in range(j+1, width): |
59 | 59 | if table_rows[i][y] != "": |
60 | 60 | break; |
61 | 61 | colspan += 1; |
62 | 62 | if colspan > 0: |
63 | - attrs["colspan"] = colspan | |
63 | + attrs["colspan"] = colspan + 1 | |
64 | 64 | |
65 | 65 | buf += start_tag(tag, attrs) + table_rows[i][j] + end_tag(tag) |
66 | 66 | buf += "\n</tr>" |
@@ -69,6 +69,7 @@ def renderTable(context, args): | ||
69 | 69 | |
70 | 70 | def flushTable(context, args): |
71 | 71 | ret = renderTable(context, args) |
72 | - table_rows = [] | |
72 | + table_rows[:] = [] | |
73 | + table_attrs.clear() | |
73 | 74 | return ret |
74 | 75 |