Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use render instead of to_md in README #61

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ f_obj = get_function("quartodoc", "get_function")
# render ---
renderer = MdRenderer(header_level = 1)
print(
renderer.to_md(f_obj)
renderer.render(f_obj)
)
```

Expand Down Expand Up @@ -100,7 +100,7 @@ quartodoc consists of two pieces:
* **collection**: using the library [griffe](https://github.com/mkdocstrings/griffe) to statically
collect information about functions and classes in a program.
* **docstring parsing**: also handled by griffe, which breaks it into a tree structure.
* **docstring rendering**: use plum-dispatch on methods like MdRenderer.to_md to decide
* **docstring rendering**: use plum-dispatch on methods like MdRenderer.render to decide
how to visit and render each piece of the tree (e.g. the examples section, a parameter, etc..).

Here is a quick example of how you can grab a function from griffe and walk through it.
Expand Down Expand Up @@ -132,7 +132,7 @@ from quartodoc import MdRenderer
renderer = MdRenderer()

print(
renderer.to_md(docstring[1])
renderer.render(docstring[1])
)
```

Expand Down