Skip to content

Commit 45a6a2a

Browse files
authored
Merge pull request #1133 from lkies/fix-repr
Fix Latex not being rendered in HTML output in VSCode
2 parents 58e7ad9 + bb35a88 commit 45a6a2a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

control/iosys.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ def _repr_latex_(self):
314314
def _repr_html_(self):
315315
# Defaults to using __repr__; override in subclasses
316316
return None
317+
318+
def _repr_markdown_(self):
319+
return self._repr_html_()
317320

318321
@property
319322
def repr_format(self):

control/tests/statesp_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,6 +1440,7 @@ def test_html_repr(gmats, ref, dt, dtref, repr_type, num_format, editsdefaults):
14401440
dt_html = dtref.format(dt=dt, fmt=defaults['statesp.latex_num_format'])
14411441
ref_html = ref[refkey].format(dt=dt_html)
14421442
assert g._repr_html_() == ref_html
1443+
assert g._repr_html_() == g._repr_markdown_()
14431444

14441445

14451446
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)