Skip to content

Commit 88fa531

Browse files
committed
Gitlab standalone: add newline after script tag
1 parent ed62da8 commit 88fa531

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

mdx_math.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def run(self, lines):
7373
for math_block_start, math_block_end in reversed(math_blocks):
7474
math_lines = lines[math_block_start + 1:math_block_end]
7575
math_content = '\n'.join(math_lines)
76-
html = '<script type="%s; mode=display">\n%s\n</script>'
76+
html = '<script type="%s; mode=display">\n%s\n</script>\n'
7777
html %= (self._content_type, math_content)
7878
placeholder = self.md.htmlStash.store(html)
7979
lines[math_block_start:math_block_end + 1] = [placeholder]

test_data/standalone_gitlab.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
e^{i \varphi} =
33
\cos \varphi + i \sin \varphi
44
</script>
5+
56
<script type="math/tex; mode=display">
67
\text{one more math block}
78
</script>

test_data/standalone_gitlab_nested.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<script type="math/tex; mode=display">
44
e^{i \varphi} =
55
\cos \varphi + i \sin \varphi
6-
</script></li>
6+
</script>
7+
</li>
78
</ul>

0 commit comments

Comments
 (0)