Skip to content

Commit d7ff750

Browse files
committed
docs: uniform API table return types
Returns column now leads with the typespec (%Art{}, :atom | nil, [String.t()], map() | nil) and keeps the prose as a short suffix; render/1 drops the per-field list since the following paragraph documents the Art fields.
1 parent fcc36c6 commit d7ff750

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ end
2222

2323
| Function | Returns |
2424
|---------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
25-
| `LovelyMermaid.render(src)` | `%LovelyMermaid.Art{}` (`plain`, `styled` [[span]], `width`, `class_defs`, `warnings`) or `nil` |
25+
| `LovelyMermaid.render(src)` | `%LovelyMermaid.Art{}` or `nil` |
2626
| `LovelyMermaid.diagram_kind(src)` | `:flowchart \| :state \| :class \| :er \| :sequence \| :pie \| :mindmap \| :timeline \| :gitgraph \| nil` |
27-
| `LovelyMermaid.SourceBox.source_box(src, max_width \\ nil)` | Framed source lines, for when a diagram won't render |
28-
| `LovelyMermaid.Ansi.to_ansi(art, theme \\ Ansi.default_theme())` | ANSI-coloured lines from `art.styled` |
29-
| `LovelyMermaid.ClassStyle.resolve_class_style(classes, class_defs)` | Merged `classDef` style for a span, or `nil` |
27+
| `LovelyMermaid.SourceBox.source_box(src, max_width \\ nil)` | `%LovelyMermaid.Art{}` — framed source lines, for when a diagram won't render |
28+
| `LovelyMermaid.Ansi.to_ansi(art, theme \\ Ansi.default_theme())` | `[String.t()]`ANSI-coloured lines from `art.styled` |
29+
| `LovelyMermaid.ClassStyle.resolve_class_style(classes, class_defs)` | `map() \| nil` — merged `classDef` style for a span |
3030

3131
Each `span` in `styled` is a `LovelyMermaid.Span``%Span{text, role}`
3232
with `classes` (author-assigned names from `:::name` / `class A,B name`)

0 commit comments

Comments
 (0)