Text with * asterisks * should be escaped.
Text with _ underscores _ should be escaped.
Multiple ** asterisks ** and __ underscores __.
At start: *asterisk and _underscore
At end: asterisk* and underscore_
Square brackets: [text in brackets]
Parentheses: (text in parentheses)
Combined: [link](url) should be escaped
Nested: [[nested]] and ((nested))
# Hash at start of line
Text with # hash in middle
Multiple ### hashes
Hashtag: #markdown #test
Single backtick: ` should be escaped
Multiple backticks: ``` should be escaped
Inline code: `code` should be preserved
+ Plus at start
- Minus at start
Text with + and - in middle
Math: 5 + 3 - 2 = 6
1. Numbered list item
2. Another item
Text with 1. in middle
Version: 1.2.3
Less than: < should be escaped
Greater than: > should be escaped
Email: <user@example.com>
HTML tag: <div>content</div>
Pipe symbol: | should be escaped in tables
Multiple pipes: || and |||
Text | with | pipes
Single backslash: \ should be escaped
Path: C:\Users\Documents
Escaped: \* \_ \# \`
! Exclamation at start
Text with ! in middle
Image syntax:  should be escaped
Single tilde: ~ in text
Double tilde: ~~ for strikethrough
Path: ~/Documents
Equals: = in text
Multiple: === and ====
Math: x = 5
Complex: *[text]* and _[link]_ and `code` with # hash
All together: * _ [ ] ( ) # ` + - . | \ ! ~ =
In sentence: Use *asterisks* for [links](url) and `code` with #tags.