Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for the Markdown Macro #52607

Merged
merged 4 commits into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions stdlib/Markdown/docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,16 @@ If no title text is specified after the admonition type, then the type name will

Admonitions, like most other toplevel elements, can contain other toplevel elements (e.g. lists, images).

## [Markdown String Literals](@id stdlib-markdown-literals)

The `md""` macro allows you to embed Markdown strings directly into your Julia code.
This macro is designed to simplify the inclusion of Markdown-formatted text within your Julia source files.

### Usage

```julia
result = md"This is a **custom** Markdown string with [a link](http://example.com)."
```
## Markdown Syntax Extensions

Julia's markdown supports interpolation in a very similar way to basic string literals, with the
Expand All @@ -403,9 +413,6 @@ complex features (such as references) without cluttering the basic syntax.
In principle, the Markdown parser itself can also be arbitrarily extended by packages, or an entirely
custom flavour of Markdown can be used, but this should generally be unnecessary.

## [Markdown String Literals](@id stdlib-markdown-literals)

Markdown strings can be constructed using the string literal syntax `md"..."`.

## [API reference](@id stdlib-markdown-api)

Expand Down