|
@@ 206-220 (lines=15) @@
|
| 203 |
|
def test_numbering_level(): |
| 204 |
|
init() |
| 205 |
|
|
| 206 |
|
src = Para(createListStr(u'Exercise +.+.#')) |
| 207 |
|
dest = Para([ |
| 208 |
|
Span( |
| 209 |
|
[u'exercise:0.0.1', ['pandoc-numbering-text', 'exercise'], []], |
| 210 |
|
[Strong(createListStr(u'Exercise 0.0.1'))] |
| 211 |
|
) |
| 212 |
|
]) |
| 213 |
|
|
| 214 |
|
assert pandoc_numbering.numbering(src['t'], src['c'], '', {}) == dest |
| 215 |
|
|
| 216 |
|
src = Header(1, [u'first-chapter', [], []], createListStr(u'First chapter')) |
| 217 |
|
pandoc_numbering.numbering(src['t'], src['c'], '', {}) |
| 218 |
|
|
| 219 |
|
src = Header(2, [u'first-section', [], []], createListStr(u'First section')) |
| 220 |
|
pandoc_numbering.numbering(src['t'], src['c'], '', {}) |
| 221 |
|
|
| 222 |
|
src = Para(createListStr(u'Exercise +.+.#')) |
| 223 |
|
dest = Para([ |
|
@@ 121-135 (lines=15) @@
|
| 118 |
|
|
| 119 |
|
src = Para(createListStr(u'Exercise #ex:')) |
| 120 |
|
dest = Para([ |
| 121 |
|
Span( |
| 122 |
|
[u'ex:1', ['pandoc-numbering-text', 'ex'], []], |
| 123 |
|
[Strong(createListStr(u'Exercise 1'))] |
| 124 |
|
) |
| 125 |
|
]) |
| 126 |
|
|
| 127 |
|
assert pandoc_numbering.numbering(src['t'], src['c'], '', {}) == dest |
| 128 |
|
|
| 129 |
|
src = Para(createListStr(u'Exercise #')) |
| 130 |
|
dest = Para([ |
| 131 |
|
Span( |
| 132 |
|
[u'exercise:1', ['pandoc-numbering-text', 'exercise'], []], |
| 133 |
|
[Strong(createListStr(u'Exercise 1'))] |
| 134 |
|
) |
| 135 |
|
]) |
| 136 |
|
|
| 137 |
|
assert pandoc_numbering.numbering(src['t'], src['c'], '', {}) == dest |
| 138 |
|
|