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

How to use @repl and @example in docstring? #2556

Open
AnzhiZhang opened this issue Aug 8, 2024 · 0 comments
Open

How to use @repl and @example in docstring? #2556

AnzhiZhang opened this issue Aug 8, 2024 · 0 comments

Comments

@AnzhiZhang
Copy link
Contributor

I want to use @example in docstring to demostrate plots in the doc. Use them in the markdown file works but in docstrings just rendered a code piece.

I tried to search in docs and issues but not founded. Is it possiable to do that?

Example:

"""
```@example
using Plots
x = range(0, 10, length=100)
y = sin.(x)
plot(x, y)
```
"""
function func() end

doc.md

```@doc
func
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant