| |
@@ -99,7 +99,8 @@
|
| |
self.assertEqual(output.status_code, 200)
|
| |
output_text = output.get_data(as_text=True)
|
| |
self.assertIn(
|
| |
- '<pre class="syntaxhighlightblock"><code>foo\n bar</code></pre>',
|
| |
+ '<pre class="syntaxhighlightblock">'
|
| |
+ '<code class="lang-plaintext">foo\n bar</code></pre>',
|
| |
output_text
|
| |
)
|
| |
|
| |
@@ -213,7 +214,8 @@
|
| |
'text/html; charset=utf-8')
|
| |
self.assertIn('</span> Å ource', output_text)
|
| |
self.assertIn(
|
| |
- '<pre class="syntaxhighlightblock"><code>Row 0\n</code></pre>',
|
| |
+ '<pre class="syntaxhighlightblock">'
|
| |
+ '<code class="lang-plaintext">Row 0\n</code></pre>',
|
| |
output_text
|
| |
)
|
| |
|
| |
@@ -313,7 +315,8 @@
|
| |
self.assertEqual(output.status_code, 200)
|
| |
output_text = output.get_data(as_text=True)
|
| |
self.assertIn(
|
| |
- '<pre class="syntaxhighlightblock"><code>foo\n barRow 0\n'
|
| |
+ '<pre class="syntaxhighlightblock"><code class="lang-plaintext">'
|
| |
+ 'foo\n barRow 0\n'
|
| |
'Row 1\nRow 2\nRow 3\nRow 4\nRow 5\nRow 6\nRow 7\nRow 8\n'
|
| |
'Row 9\n</code></pre>', output_text
|
| |
)
|
| |
Currently, highlight.js tries to autodetect languages, and in some cases fails.
This is a work in progress
This currently works to override .spec and .patch files (with that extension specifically) so that highlighter is used on those files.
Not sure about the approach here, but this works, and @pingou if you have any feedback, that would be awesome