Skip to content

Commit 20203fc

Browse files
committed
Cleaned up docs
1 parent dd3095d commit 20203fc

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

snakemd/templates.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,20 @@ def __init__(
158158
)
159159

160160
def __str__(self):
161+
"""
162+
Renders the checklist as a markdown string. Checklists
163+
function very similarly to unorded lists, but require
164+
additional information about the status of each task
165+
(i.e., whether it is checked or not).
166+
167+
.. code-block:: markdown
168+
169+
- [ ] Do reading
170+
- [X] Do writing
171+
172+
:return:
173+
the list as a markdown string
174+
"""
161175
output = []
162176
i = 1
163177
for item in self._items:
@@ -178,7 +192,7 @@ def __str__(self):
178192
i += 1
179193

180194
checklist = "\n".join(output)
181-
logger.debug("Rendered markdown list: %r", checklist)
195+
logger.debug("Rendered checklist: %r", checklist)
182196
return checklist
183197

184198
def __repr__(self) -> str:

0 commit comments

Comments
 (0)