# escape_markdown

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/_markdown/escape_markdown)

Normalize line breaks and escape markdown syntax in external text.

## Signature

```python
escape_markdown(
    text: str,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `text` | `str` | Yes | Display string that may contain markdown punctuation. |

## Returns

`str`

`text` on one line with markdown-significant characters escaped.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/4bfa52000ef65ac623d8ada0cb67f67cbdd663ea/libs/code/deepagents_code/_markdown.py#L16)