Skip to content

Commit

Permalink
Merge 9578ce3 into 7a6c022
Browse files Browse the repository at this point in the history
  • Loading branch information
bauglir committed Jul 12, 2022
2 parents 7a6c022 + 9578ce3 commit d81ea07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 25 deletions.
2 changes: 2 additions & 0 deletions docs/src/api.md
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
32 changes: 7 additions & 25 deletions src/Kroki.jl
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 All @@ -71,19 +53,19 @@ struct Diagram
value is case-insensitive.
"""
type::Symbol

"""
Constructs a [`Diagram`](@ref) from the `specification` for a specific `type`
of diagram.
"""
Diagram(type::Symbol, specification::AbstractString) = new(specification, type)
end

"""
Constructs a [`Diagram`](@ref) from the `specification` for a specific `type`
of diagram.
"""
Diagram(type::Symbol, specification::AbstractString) = Diagram(specification, type)

"""
Constructs a [`Diagram`](@ref) 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.
Specifying both keyword arguments, or neither, is invalid.
"""
function Diagram(
type::Symbol;
Expand Down

0 comments on commit d81ea07

Please sign in to comment.