File: test_striphmtl.py

package info (click to toggle)
pymdown-extensions 10.13-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,104 kB
  • sloc: python: 60,117; javascript: 846; sh: 8; makefile: 5
file content (49 lines) | stat: -rw-r--r-- 1,053 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"""Test cases for StripHTML."""
from .. import util


class TestStripHTML(util.MdCase):
    """Test legacy stripping in HTML."""

    extension = ['pymdownx.striphtml']
    extension_configs = {}

    def test_multiple_inline(self):
        """Test multiple inline."""

        self.check_markdown(
            r'''
            Comments test:
            <!-- BEGIN INCLUDE -->

            - One
            - Two
            - Three
            <!-- END INCLUDE -->

            ## Paragraph

            <!-- BEGIN INCLUDE -->
            - One
            - Two
            - Three
            <!-- END INCLUDE -->
            Comments test end
            ''',
            r'''
            <p>Comments test:</p>
            <ul>
            <li>One</li>
            <li>Two</li>
            <li>Three</li>
            </ul>
            <h2>Paragraph</h2>
            <ul>
            <li>One</li>
            <li>Two</li>
            <li>Three</li>
            </ul>
            <p>Comments test end</p>
            ''',
            True
        )