@@ -91,10 +91,8 @@ def testBasicCodeHilite(self):
91
91
text = '\t # A Code Comment'
92
92
md = markdown .Markdown (extensions = ['markdown.extensions.codehilite' ])
93
93
if self .has_pygments :
94
- self .assertEqual (md .convert (text ),
95
- '<div class="codehilite">'
96
- '<pre><span class="c"># A Code Comment</span>\n '
97
- '</pre></div>' )
94
+ # Pygments can use random lexer here as we did not specify the language
95
+ self .assertTrue (md .convert (text ).startswith ('<div class="codehilite"><pre>' ))
98
96
else :
99
97
self .assertEqual (md .convert (text ),
100
98
'<pre class="codehilite"><code># A Code Comment'
@@ -105,7 +103,7 @@ def testLinenumsTrue(self):
105
103
md = markdown .Markdown (
106
104
extensions = [markdown .extensions .codehilite .CodeHiliteExtension (linenums = True )])
107
105
if self .has_pygments :
108
- # Differant versions of pygments output slightly different markup.
106
+ # Different versions of pygments output slightly different markup.
109
107
# So we use 'startwith' and test just enough to confirm that
110
108
# pygments received and processed linenums.
111
109
self .assertTrue (md .convert (text ).startswith (
@@ -134,10 +132,8 @@ def testLinenumsNone(self):
134
132
md = markdown .Markdown (
135
133
extensions = [markdown .extensions .codehilite .CodeHiliteExtension (linenums = None )])
136
134
if self .has_pygments :
137
- self .assertEqual (md .convert (text ),
138
- '<div class="codehilite">'
139
- '<pre><span class="c"># A Code Comment</span>\n '
140
- '</pre></div>' )
135
+ # Pygments can use random lexer here as we did not specify the language
136
+ self .assertTrue (md .convert (text ).startswith ('<div class="codehilite"><pre>' ))
141
137
else :
142
138
self .assertEqual (md .convert (text ),
143
139
'<pre class="codehilite"><code># A Code Comment'
0 commit comments