From 9578ce3e67739cf8a7a8dcbffb60f8ab88bec7a6 Mon Sep 17 00:00:00 2001 From: Joris Kraak Date: Tue, 12 Jul 2022 09:53:40 +0200 Subject: [PATCH] docs(API): include docstrings for `Diagram` methods directly 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. --- docs/src/api.md | 2 ++ src/Kroki.jl | 18 ------------------ 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/docs/src/api.md b/docs/src/api.md index fb25f21..e929be2 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -9,6 +9,8 @@ CurrentModule = Kroki ```@docs Kroki Diagram +Diagram(::Symbol, ::AbstractString) +Diagram(::Symbol; ::Union{Nothing,AbstractString}, ::Union{Nothing,AbstractString}) render ``` diff --git a/src/Kroki.jl b/src/Kroki.jl index eefc2bf..c627515 100644 --- a/src/Kroki.jl +++ b/src/Kroki.jl @@ -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 ```