Skip to content

Commit

Permalink
DOC: fix examples block for to_html methods
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcar17 committed May 1, 2024
1 parent 35fdf9b commit ee53147
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions src/cogent3/core/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2224,10 +2224,21 @@ def to_html(
font_family
string denoting font family
To display in jupyter notebook:
Examples
---------
In a jupyter notebook, this code is used to provide the representation.
.. code-block:: python
seq_col # is rendered by jupyter
You can directly use the result for display in a notebook as
.. code-block:: python
>>> from IPython.core.display import HTML
>>> HTML(aln.to_html())
from IPython.core.display import HTML
HTML(seq_col.to_html())
"""
css, styles = self.moltype.get_css_style(
colors=colors, font_size=font_size, font_family=font_family
Expand Down Expand Up @@ -3138,10 +3149,21 @@ def to_html(
font_family
string denoting font family
To display in jupyter notebook:
Examples
---------
In a jupyter notebook, this code is used to provide the representation.
.. code-block:: python
aln # is rendered by jupyter
You can directly use the result for display in a notebook as
.. code-block:: python
>>> from IPython.core.display import HTML
>>> HTML(aln.to_html())
from IPython.core.display import HTML
HTML(aln.to_html())
"""
css, styles = self.moltype.get_css_style(
colors=colors, font_size=font_size, font_family=font_family
Expand Down

0 comments on commit ee53147

Please sign in to comment.