Skip to content

Commit 68811df

Browse files
committed
update docstrings
1 parent c6dfe10 commit 68811df

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/cmarkgfm/cmark.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ class Options(object):
2626

2727

2828
def markdown_to_html(text, options=0):
29-
"""Render the given text to Markdown.
29+
"""Render the given Markdown text to HTML.
3030
3131
This is a direct interface to ``cmark_markdown_to_html``.
3232
3333
Args:
34-
text (str): The text to render to Markdown.
34+
text (str): The Markdown text to render to HTML.
3535
options (int): The cmark options.
3636
3737
Returns:
38-
str: The rendered markdown.
38+
str: The HTML rendered from Markdown.
3939
"""
4040
encoded_text = text.encode('utf-8')
4141
raw_result = _cmark.lib.cmark_markdown_to_html(
@@ -44,18 +44,18 @@ def markdown_to_html(text, options=0):
4444

4545

4646
def markdown_to_html_with_extensions(text, options=0, extensions=None):
47-
"""Render the given text to Markdown, using extensions.
47+
"""Render the given Markdown text to HTML, using extensions.
4848
4949
This is a high-level wrapper over the various functions needed to enable
50-
extensions, attach them to a parser, and render html.
50+
extensions, attach them to a parser, and render HTML.
5151
5252
Args:
53-
text (str): The text to render to Markdown.
53+
text (str): The Markdown text to render to HTML.
5454
options (int): The cmark options.
5555
extensions (Sequence[str]): The list of extension names to use.
5656
5757
Returns:
58-
str: The rendered markdown.
58+
str: The HTML rendered from Markdown.
5959
"""
6060
if extensions is None:
6161
extensions = []
@@ -95,15 +95,16 @@ def markdown_to_html_with_extensions(text, options=0, extensions=None):
9595
def github_flavored_markdown_to_html(text, options=0):
9696
"""Render the given GitHub-flavored Makrdown to HTML.
9797
98-
This is a small wrapper over :func:`markdown_to_html_with_extensions` that
99-
just applies GitHub's extensions.
98+
This is a small wrapper over :func:`markdown_to_html_with_extensions`.
99+
100+
The GitHub extensions and the option CMARK_OPT_GITHUB_PRE_LANG are applied.
100101
101102
Args:
102-
text (str): The text to render to Markdown.
103+
text (str): The Markdown text to render to HTML.
103104
options (int): The cmark options.
104105
105106
Returns:
106-
str: The rendered markdown.
107+
str: The HTML rendered from Markdown.
107108
"""
108109
# Force some more options; see
109110
# <https://github.com/theacodes/cmarkgfm/issues/37#issuecomment-852925142>

0 commit comments

Comments
 (0)