mirror of
https://github.com/dergigi/boris.git
synced 2026-02-10 09:34:49 +01:00
feat: add basic markdown syntax test files
Add comprehensive test suite for basic markdown syntax features: - basic-headings.md: All heading levels and setext syntax - basic-paragraphs-line-breaks.md: Paragraph separation and line breaks - basic-emphasis.md: Bold and italic formatting - basic-blockquotes.md: Blockquotes with nested content - basic-lists.md: Ordered and unordered lists with nesting - basic-code.md: Inline code and code blocks - basic-horizontal-rules.md: Horizontal rule variants - basic-links-and-images.md: Links and images with various syntax - basic-escaping.md: Character escaping - basic-index.md: Index of all test files All files follow the Markdown Guide's Basic Syntax specification.
This commit is contained in:
190
test/markdown/basic-emphasis.md
Normal file
190
test/markdown/basic-emphasis.md
Normal file
@@ -0,0 +1,190 @@
|
||||
# Basic Emphasis Test
|
||||
|
||||
This file tests bold and italic text formatting using asterisks and underscores.
|
||||
|
||||
## Bold Text
|
||||
|
||||
Bold text is created using two asterisks or two underscores before and after the text.
|
||||
|
||||
I just love **bold text**.
|
||||
|
||||
I also love __bold text with underscores__.
|
||||
|
||||
**Bold text** can appear at the start of a sentence.
|
||||
|
||||
A sentence can end with **bold text**.
|
||||
|
||||
A sentence can have **bold text** in the middle.
|
||||
|
||||
## Italic Text
|
||||
|
||||
Italic text is created using one asterisk or one underscore before and after the text.
|
||||
|
||||
Italicized text is the *cat's meow*.
|
||||
|
||||
Italicized text is also the _cat's meow_.
|
||||
|
||||
*Italic text* can appear at the start of a sentence.
|
||||
|
||||
A sentence can end with *italic text*.
|
||||
|
||||
A sentence can have *italic text* in the middle.
|
||||
|
||||
## Bold and Italic Together
|
||||
|
||||
To emphasize text with both bold and italics, use three asterisks or three underscores.
|
||||
|
||||
This text is ***bold and italic***.
|
||||
|
||||
This text is also ___bold and italic___.
|
||||
|
||||
***Bold and italic*** can appear at the start of a sentence.
|
||||
|
||||
A sentence can end with ***bold and italic***.
|
||||
|
||||
A sentence can have ***bold and italic*** in the middle.
|
||||
|
||||
## Mid-Word Emphasis
|
||||
|
||||
You can emphasize the middle of a word for emphasis.
|
||||
|
||||
Love**is**bold
|
||||
|
||||
Love*is*italic
|
||||
|
||||
Love***is***bolditalic
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Use Asterisks for Mid-Word Emphasis
|
||||
|
||||
For compatibility, use asterisks when emphasizing the middle of a word.
|
||||
|
||||
Love**is**bold (correct)
|
||||
|
||||
Love__is__bold (may not work in all processors)
|
||||
|
||||
A*cat*meow (correct)
|
||||
|
||||
A_cat_meow (may not work in all processors)
|
||||
|
||||
### Spacing Around Emphasis
|
||||
|
||||
Emphasis markers should be directly adjacent to the text being emphasized.
|
||||
|
||||
This is **correct** spacing.
|
||||
|
||||
This is ** incorrect ** spacing.
|
||||
|
||||
This is *correct* spacing.
|
||||
|
||||
This is * incorrect * spacing.
|
||||
|
||||
## Multiple Emphasis in One Paragraph
|
||||
|
||||
A single paragraph can contain multiple instances of bold, italic, and combined emphasis.
|
||||
|
||||
This paragraph has **bold text**, *italic text*, and ***bold italic text*** all together. You can use **multiple bold** sections and *multiple italic* sections in the same paragraph.
|
||||
|
||||
## Emphasis with Punctuation
|
||||
|
||||
Emphasis works correctly with adjacent punctuation marks.
|
||||
|
||||
**Bold text**, with a comma.
|
||||
|
||||
**Bold text.** With a period.
|
||||
|
||||
**Bold text!** With an exclamation.
|
||||
|
||||
**Bold text?** With a question mark.
|
||||
|
||||
*Italic text*, with a comma.
|
||||
|
||||
*Italic text.* With a period.
|
||||
|
||||
*Italic text!* With an exclamation.
|
||||
|
||||
*Italic text?* With a question mark.
|
||||
|
||||
## Emphasis at Word Boundaries
|
||||
|
||||
Emphasis can appear at the start or end of words.
|
||||
|
||||
**Start** of a word.
|
||||
|
||||
End of a **word**.
|
||||
|
||||
*Start* of a word.
|
||||
|
||||
End of a *word*.
|
||||
|
||||
## Emphasis with Links
|
||||
|
||||
Emphasis can be combined with links.
|
||||
|
||||
This is a [**bold link**](https://example.com).
|
||||
|
||||
This is a [*italic link*](https://example.com).
|
||||
|
||||
This is a [***bold italic link***](https://example.com).
|
||||
|
||||
## Emphasis with Code
|
||||
|
||||
Emphasis cannot be used inside code blocks, but can appear alongside inline code.
|
||||
|
||||
This has `code` and **bold** together.
|
||||
|
||||
This has `code` and *italic* together.
|
||||
|
||||
## Nested Emphasis
|
||||
|
||||
You cannot nest emphasis of the same type, but you can combine different types.
|
||||
|
||||
***Bold and italic*** is valid.
|
||||
|
||||
**Bold with *italic inside* bold** is valid.
|
||||
|
||||
*Italic with **bold inside** italic* is valid.
|
||||
|
||||
## Edge Cases
|
||||
|
||||
### Emphasis with Only Spaces
|
||||
|
||||
** **
|
||||
|
||||
* *
|
||||
|
||||
### Emphasis with Special Characters
|
||||
|
||||
**Bold with !@#$%**
|
||||
|
||||
*Italic with !@#$%*
|
||||
|
||||
### Very Short Emphasis
|
||||
|
||||
****
|
||||
|
||||
***
|
||||
|
||||
**
|
||||
|
||||
*
|
||||
|
||||
### Emphasis Markers Without Closing
|
||||
|
||||
**Bold text without closing
|
||||
|
||||
*Italic text without closing
|
||||
|
||||
### Emphasis with Numbers
|
||||
|
||||
**123**
|
||||
|
||||
*456*
|
||||
|
||||
### Emphasis with Only Punctuation
|
||||
|
||||
**!!!**
|
||||
|
||||
*???*
|
||||
|
||||
Reference in New Issue
Block a user