Update source links in each basic markdown test file to link to the specific file path rather than the directory.
3.6 KiB
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.
Loveisbold
Loveisitalic
Loveisbolditalic
Best Practices
Use Asterisks for Mid-Word Emphasis
For compatibility, use asterisks when emphasizing the middle of a word.
Loveisbold (correct)
Love__is__bold (may not work in all processors)
Acatmeow (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.
This is a italic link.
This is a bold italic link.
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
!!!
???
Source: basic-emphasis.md