# `SnakeBridge.Docs.MarkdownConverter`
[🔗](https://github.com/nshkrdotcom/snakebridge/blob/v0.16.0/lib/snakebridge/docs/markdown_converter.ex#L1)

Converts parsed Python docstrings to Elixir ExDoc Markdown format.

This module transforms structured docstring data into Markdown that
is compatible with ExDoc and follows Elixir documentation conventions.

# `convert`

```elixir
@spec convert(map()) :: String.t()
```

Converts a parsed docstring structure to ExDoc Markdown format.

## Parameters

- `parsed` - A map with keys: `:short_description`, `:long_description`,
  `:params`, `:returns`, `:raises`, `:examples`

## Returns

A Markdown string suitable for use in `@doc` or `@moduledoc`.

# `convert_example`

```elixir
@spec convert_example(String.t()) :: String.t()
```

Converts a Python doctest example to Elixir iex format.

## Examples

    iex> MarkdownConverter.convert_example(">>> func(1, 2)\n3")
    "    iex> func(1, 2)\n    3"

# `convert_exception`

```elixir
@spec convert_exception(String.t() | nil) :: String.t()
```

Converts a Python exception type to an Elixir exception module.

## Examples

    iex> MarkdownConverter.convert_exception("ValueError")
    "ArgumentError"

# `convert_type`

```elixir
@spec convert_type(String.t() | nil) :: String.t()
```

Converts a Python type annotation to an Elixir typespec format.

## Examples

    iex> MarkdownConverter.convert_type("int")
    "integer()"

    iex> MarkdownConverter.convert_type("list[str]")
    "list(String.t())"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
