# `Noizu.Slack.Mrkdwn`
[🔗](https://github.com/noizu-labs-sdks/elixir-slack/blob/v0.1.0/lib/noizu/slack/mrkdwn.ex#L1)

GitHub-flavoured Markdown → Slack `mrkdwn`. Deterministic, line-based, no deps.

| Markdown | mrkdwn |
|---|---|
| `# Heading` (any level) | `*Heading*` |
| `**bold**` / `__bold__` | `*bold*` |
| `*em*` | `_em_` |
| `~~strike~~` | `~strike~` |
| `[text](url)` / `![alt](url)` / `<url>` | `<url\|text>` / `<url\|alt>` / `<url>` |
| `- item` / `* item` / `+ item` | `• item` (nested: 4 spaces per level) |
| `- [ ] todo` / `- [x] done` | `• ☐ todo` / `• ☑ done` |
| `1. item` | `1. item` |
| `> quote` | `> quote` |
| `---` | a rule line |
| fenced code | ```` ``` ```` fences kept (language tag dropped), body verbatim |
| `inline code` | kept |
| tables | monospace (fenced) block with padded columns |
| HTML tags | stripped (`<br>` → newline) |

`&`, `<`, `>` in text are escaped as Slack requires (`escape: false` disables).
Runs of blank lines collapse to one.

# `from_markdown`

```elixir
@spec from_markdown(String.t(), keyword()) :: String.t()
```

Converts GitHub-flavoured markdown to Slack mrkdwn. Options: `:escape` (default `true`).

# `to_blocks`

```elixir
@spec to_blocks(String.t(), keyword()) :: [Noizu.Slack.Blocks.block()]
```

Converts markdown and splits it into section blocks, each within the section text
limit (`:max_chars`, default 3000). Splits prefer paragraph boundaries, then line
boundaries; code fences are re-opened/closed across splits. Returns a plain list —
run it through `Noizu.Slack.Blocks.validate/1` to enforce the 50-block cap.

---

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