Skip to content

Commit

Permalink
docs(API): include docstrings for Diagram methods directly
Browse files Browse the repository at this point in the history
Instead of duplicating the docstrings and signatures for the
constructors of the `Diagram` type in its docstring, the constructors
should be added to the API themselves.
  • Loading branch information
bauglir committed Jul 12, 2022
1 parent b31dc50 commit 9578ce3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
2 changes: 2 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ CurrentModule = Kroki
```@docs
Kroki
Diagram
Diagram(::Symbol, ::AbstractString)
Diagram(::Symbol; ::Union{Nothing,AbstractString}, ::Union{Nothing,AbstractString})
render
```

Expand Down
18 changes: 0 additions & 18 deletions src/Kroki.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,6 @@ const Maybe{T} = Union{Nothing, T} where {T}
"""
A representation of a diagram that can be rendered by a Kroki service.
# Constructors
```
Diagram(type::Symbol, specification::AbstractString)
```
Constructs a `Diagram` from the `specification` for a specific `type` of
diagram.
```
Diagram(type::Symbol; path::AbstractString, specification::AbstractString)
```
Constructs a `Diagram` from the `specification` for a specific `type` of
diagram, or loads the `specification` from the provided `path`.
Specifying both, or neither, keyword arguments is invalid.
# Examples
```
Expand Down

0 comments on commit 9578ce3

Please sign in to comment.