Files
AyuGramDesktop/Telegram/SourceFiles/tests/fixtures/markdown_iv/markdown-example.md
T
2026-05-19 12:49:08 +04:00

6.3 KiB

Markdown Display Test File

This file is a comprehensive Markdown sample for testing rendering behavior.

Table of Contents


Headings

H1 Heading

H2 Heading

H3 Heading

H4 Heading

H5 Heading
H6 Heading

Text Styles

Plain text paragraph with normal sentence flow.

Bold text

Bold text with underscores

Italic text

Italic text with underscores

Bold + italic

Strikethrough

Inline code

Combination: bold, italic, strike, and code in one line.

HTML-based styles (depends on renderer support):

  • H2O using subscript
  • E = mc2 using superscript
  • Highlighted text using HTML mark

Blockquotes

Single-level blockquote.

Multi-line blockquote: This is line 1. This is line 2.

Nested quote level 1

Nested quote level 2

Nested quote level 3

Quote with formatting: bold, italic, and code.

Lists

Unordered Lists

  • Item A
  • Item B
  • Item C
  • Item using asterisk
  • Another asterisk item
  • Item using plus
  • Another plus item

Ordered Lists

  1. First item

  2. Second item

  3. Third item

  4. Numbering can restart at 1

  5. Many parsers auto-increment

  6. Final item

Mixed and Nested Lists

  1. Top-level ordered item
  2. Top-level ordered item
  • Nested unordered under ordered
  • Another nested unordered
  1. Nested ordered under unordered
  2. Nested ordered second item
  3. Back to top-level ordered
  • Top-level unordered
  1. Nested ordered
  2. Nested ordered second
  • Back to unordered

Code

Fenced Code Block (no language)

This is a plain fenced code block.
Special chars: < > & * _ `

Fenced Code Block (language: javascript)

function greet(name) {
  console.log(`Hello, ${name}!`);
}

greet("Markdown");

Fenced Code Block (language: python)

def fib(n):
    a, b = 0, 1
    out = []
    while len(out) < n:
        out.append(a)
        a, b = b, a + b
    return out

print(fib(8))

Indented Code Block

This is an indented code block.
It starts with four spaces.

Inline link: OpenAI

Autolink URL: https://example.com/path?query=1&lang=en

Autolink email: test@example.com

Reference-style link: Search Engine

Link with title: Markdown Guide

Relative link (for app routing tests): Local Path

Images

Inline image:

Placeholder image

Reference image:

Ref image

Data URI image: a red dot

Broken image test:

Broken image

Tables

Column A Column B Column C
Text Bold Code
Left Center Right
Multi word With link Strikethrough

Alignment table:

Left Align Center Align Right Align
apple middle 10
banana center 200
cherry aligned 3000

Task Lists

  • Completed task
  • Incomplete task
  • Completed with inline code
  • Pending with link

Rules and Breaks

Paragraph above first rule.


Paragraph above second rule.


Paragraph above third rule.


Line break test (two spaces at end of line):
This should be on a new line.

HTML line break test:
This should also be on a new line.

Escaping Characters

Literal asterisks: *not italic*

Literal underscores: _not italic_

Literal backticks: `not code`

Literal brackets: [not a link]

Literal hash: # not a heading

Literal pipe in table-like text: A | B

Footnotes

Footnote reference one.1

Footnote reference two with more text.2

Inline HTML

HTML block content

This paragraph is inside a div element.

Click to expand details/summary block Hidden content inside details. Useful for testing collapsible sections.

Definition Lists (renderer-dependent)

Term 1
Definition for term 1
Term 2
First definition for term 2
Second definition for term 2

Math (renderer-dependent)

Inline math style: a^2 + b^2 = c^2

Block math style:


\int_0^1 x^2\,dx = \frac{1}{3}

Diagram Blocks (renderer-dependent)

graph TD
    A[Start] --> B{Condition}
    B -->|Yes| C[Do thing]
    B -->|No| D[Do other thing]
    C --> E[End]
    D --> E[End]

Edge Cases

Empty emphasis markers:


Long line test:

ThisIsALongUnbrokenStringToTestWrappingBehavior_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdefghijklmnopqrstuvwxyz_0123456789

Unicode test:

  • Accents: cafe, naive, fiance
  • Cyrillic: primer teksta
  • Greek: alpha beta gamma

Backslash at end of line test:\

HTML comment should be hidden in some renderers:

Final Checklist

  • Headings render correctly
  • Inline styles render correctly
  • Nested lists and mixed lists render correctly
  • Code blocks and syntax highlighting work
  • Tables render with alignment
  • Images and broken images handled correctly
  • Footnotes and reference links work
  • HTML blocks are sanitized or rendered as expected
  • Renderer-dependent features fail gracefully if unsupported

  1. This is footnote number one. ↩︎

  2. This is a longer footnote with formatting, code, and a link. ↩︎