| @@ 61-77 (lines=17) @@ | ||
| 58 | assert doc.content[4].format == 'tex' |
|
| 59 | assert doc.content[6].format == 'tex' |
|
| 60 | ||
| 61 | def test_code(): |
|
| 62 | doc = Doc( |
|
| 63 | Para( |
|
| 64 | Code('', classes = ['tip', 'listing']), |
|
| 65 | Code('', classes = ['tip']), |
|
| 66 | Code('', classes = ['warning']), |
|
| 67 | Code('', attributes = {'latex-tip-icon': 'warning', 'latex-tip-position': 'right', 'latex-tip-size': 24}), |
|
| 68 | ), |
|
| 69 | metadata=metadata(), |
|
| 70 | format='latex', |
|
| 71 | api_version=(1, 17, 2) |
|
| 72 | ) |
|
| 73 | pandoc_latex_tip.main(doc) |
|
| 74 | assert doc.content[0].content[0].format == 'tex' |
|
| 75 | assert doc.content[0].content[2].format == 'tex' |
|
| 76 | assert doc.content[0].content[4].format == 'tex' |
|
| 77 | assert doc.content[0].content[6].format == 'tex' |
|
| 78 | ||
| 79 | def test_codeblock(): |
|
| 80 | doc = Doc( |
|
| @@ 27-43 (lines=17) @@ | ||
| 24 | ) |
|
| 25 | } |
|
| 26 | ||
| 27 | def test_span(): |
|
| 28 | doc = Doc( |
|
| 29 | Para( |
|
| 30 | Span(classes = ['tip', 'listing']), |
|
| 31 | Span(classes = ['tip']), |
|
| 32 | Span(classes = ['warning']), |
|
| 33 | Span(attributes = {'latex-tip-icon': 'warning', 'latex-tip-position': 'right', 'latex-tip-size': 24}) |
|
| 34 | ), |
|
| 35 | metadata=metadata(), |
|
| 36 | format='latex', |
|
| 37 | api_version=(1, 17, 2) |
|
| 38 | ) |
|
| 39 | pandoc_latex_tip.main(doc) |
|
| 40 | assert doc.content[0].content[0].format == 'tex' |
|
| 41 | assert doc.content[0].content[2].format == 'tex' |
|
| 42 | assert doc.content[0].content[4].format == 'tex' |
|
| 43 | assert doc.content[0].content[6].format == 'tex' |
|
| 44 | ||
| 45 | def test_div(): |
|
| 46 | doc = Doc( |
|