markdownlint/test/reference-links-and-images.md

5.5 KiB

Reference Links and Images

Full reference link: text

Collapsed reference link: label

Shortcut reference link: label

Same line: text label label

Mixed case: TEXT LABEL LABEL

With spaces: text text

With nested brackets: t[ex]t

With inline content: text

With inline code span: code

Shortcut inline code span: code

Multi-line full text: [multi line][multi line full text]

Multi-line full label: [text][multi line full label]

Multi-line collapsed label: [multi line collapsed label][]

Multi-line shortcut label: [multi line shortcut label]

Multi-line full text: [multi line][blockquote multi line full text]

Multi-line full label: [text][blockquote multi line full label]

Multi-line collapsed label: [blockquote multi line collapsed label][]

Multi-line shortcut label: [blockquote multi line shortcut label]

Multi-line shortcut label: [blockquote blockquote multi line shortcut label]

Dedicated line: text

Dedicated line with trailing colon: text:

Shortcut ending in colon: [colon]:

Use of multi-line label: [multi-line-label][]

Standard link: text

Wrapped in brackets: text][unique0 unique1][ unique2

[Embedded [text][unique3] in [unique4][] brackets [unique5]]

Missing label: [text][missing] {MD052}

Mixed valid/invalid: text [text][missing] {MD052}

Missing multi-line label {MD052}: [text][missing label]

Space: [text] [wrong]

Empty: [text][ ]

Code span: [wrong]

Code span: [wrong][]

Code span: [text][wrong]

Code span: [[wrong]]

Code span: [[wrong][]]

Code span: [[text][wrong]]

Escaped left text: [text][wrong]

Escaped right text: [text][wrong]

Escaped left label: [text][wrong]

Escaped right label: [text][wrong]

Valid Images

Full style: text

Collapsed style: image1

Shortcut style: image2

Image in link: text image4 image5

Image in shortcut link: [text][unique6] [image7][unique7] [image8][unique8]

Wrapped in brackets: [![text][unique9]]

Embedded [in ![text][unique10] brackets]

Invalid Images

Image only: ![text][missing] {MD052}

Image in link: ![text][missing] {MD052}

Non-Images

Escaped left text: ![text][wrong]

Escaped right text: ![text][wrong]

Escaped left label: ![text][wrong]

Escaped right label: ![text][wrong]

Valid Footnotes

Footnote1

Invalid Footnotes

Missing[^2]

Valid Labels

Ignored Labels

Invalid Labels

Duplicate: label: {MD053}

Unused: [unused]: {MD053}

Unused footnote:

[Escaped left]: text

[Escaped right]: text

Link and image: text text

Bad link with image [text][missing] {MD052}

Shortcut One-Way Handling

Validates the label: shortcut

Not flagged due to ambiguity: [ignored]

Open Bracket Pairs

Unmatched [ in text

Hidden reference: [hidden][] {MD052}

Text with a 2 in it


  1. https://example.com/footnote [multi line full text]: https://example.com/multi-line-full-text [multi line full label]: https://example.com/multi-line-full-label [multi line collapsed label]: https://example.com/multi-line-collapsed-label [multi line shortcut label]: https://example.com/multi-line-shortcut-label [blockquote multi line full text]: https://example.com/blockquote-multi-line-full-text [blockquote multi line full label]: https://example.com/blockquote-multi-line-full-label [blockquote multi line collapsed label]: https://example.com/blockquote-multi-line-collapsed-label [blockquote multi line shortcut label]: https://example.com/blockquote-multi-line-shortcut-label [blockquote blockquote multi line shortcut label]: https://example.com/blockquote-blockquote-multi-line-shortcut-label [colon]: https://example.com/colon [multi-line-label]: https://example.com/multi-line-label [unique0]: https://example.com/unique0 [unique1]: https://example.com/unique1 [unique2]: https://example.com/unique2 [unique3]: https://example.com/unique3 [unique4]: https://example.com/unique4 [unique5]: https://example.com/unique5 [unique6]: https://example.com/unique6 [unique7]: https://example.com/unique7 [unique8]: https://example.com/unique8 [unique9]: https://example.com/unique9 [unique10]: https://example.com/unique10 ↩︎

  2. Footnote with an embedded-reference in it ↩︎