mirror of
https://github.com/dergigi/boris.git
synced 2025-12-17 14:44:26 +01:00
Merge pull request #43 from dergigi/more-md-tests
Add basic markdown syntax test suite
This commit is contained in:
217
test/markdown/basic-blockquotes.md
Normal file
217
test/markdown/basic-blockquotes.md
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
# Basic Blockquotes Test
|
||||||
|
|
||||||
|
This file tests blockquote syntax using the `>` character.
|
||||||
|
|
||||||
|
## Basic Blockquotes
|
||||||
|
|
||||||
|
Blockquotes are created by placing a `>` character at the start of a line, followed by a space.
|
||||||
|
|
||||||
|
> This is a blockquote.
|
||||||
|
|
||||||
|
> This is another blockquote with multiple sentences. It demonstrates that blockquotes can contain extended text. The entire blockquote should be rendered with appropriate styling to distinguish it from regular paragraphs.
|
||||||
|
|
||||||
|
## Multiple Paragraph Blockquotes
|
||||||
|
|
||||||
|
Blockquotes can span multiple paragraphs by placing `>` at the start of each paragraph.
|
||||||
|
|
||||||
|
> This is the first paragraph in a blockquote.
|
||||||
|
>
|
||||||
|
> This is the second paragraph in the same blockquote.
|
||||||
|
|
||||||
|
> First paragraph.
|
||||||
|
>
|
||||||
|
> Second paragraph.
|
||||||
|
>
|
||||||
|
> Third paragraph.
|
||||||
|
|
||||||
|
## Blockquotes with Formatting
|
||||||
|
|
||||||
|
Blockquotes can contain inline formatting like bold, italic, and code.
|
||||||
|
|
||||||
|
> This blockquote contains **bold text**.
|
||||||
|
|
||||||
|
> This blockquote contains *italic text*.
|
||||||
|
|
||||||
|
> This blockquote contains ***bold and italic text***.
|
||||||
|
|
||||||
|
> This blockquote contains `code text`.
|
||||||
|
|
||||||
|
> This blockquote contains **bold**, *italic*, and `code` all together.
|
||||||
|
|
||||||
|
## Blockquotes with Links
|
||||||
|
|
||||||
|
Blockquotes can contain links.
|
||||||
|
|
||||||
|
> This blockquote contains a [link to example.com](https://example.com).
|
||||||
|
|
||||||
|
> This blockquote contains a [reference link][ref].
|
||||||
|
|
||||||
|
[ref]: https://example.com
|
||||||
|
|
||||||
|
## Nested Blockquotes
|
||||||
|
|
||||||
|
Blockquotes can be nested by using multiple `>` characters.
|
||||||
|
|
||||||
|
> This is the first level of a blockquote.
|
||||||
|
>
|
||||||
|
> > This is a nested blockquote.
|
||||||
|
>
|
||||||
|
> Back to the first level.
|
||||||
|
|
||||||
|
> First level.
|
||||||
|
>
|
||||||
|
> > Second level.
|
||||||
|
>
|
||||||
|
> > > Third level.
|
||||||
|
>
|
||||||
|
> > Back to second level.
|
||||||
|
>
|
||||||
|
> Back to first level.
|
||||||
|
|
||||||
|
## Blockquotes with Lists
|
||||||
|
|
||||||
|
Blockquotes can contain lists.
|
||||||
|
|
||||||
|
> This is a blockquote with a list:
|
||||||
|
>
|
||||||
|
> - First item
|
||||||
|
> - Second item
|
||||||
|
> - Third item
|
||||||
|
|
||||||
|
> This is a blockquote with a numbered list:
|
||||||
|
>
|
||||||
|
> 1. First item
|
||||||
|
> 2. Second item
|
||||||
|
> 3. Third item
|
||||||
|
|
||||||
|
> This is a blockquote with a nested list:
|
||||||
|
>
|
||||||
|
> - First item
|
||||||
|
> - Nested item
|
||||||
|
> - Another nested item
|
||||||
|
> - Second item
|
||||||
|
|
||||||
|
## Blockquotes with Code
|
||||||
|
|
||||||
|
Blockquotes can contain inline code and code blocks.
|
||||||
|
|
||||||
|
> This blockquote contains `inline code`.
|
||||||
|
|
||||||
|
> This blockquote contains a code block:
|
||||||
|
>
|
||||||
|
> ```
|
||||||
|
> Code block here
|
||||||
|
> More code
|
||||||
|
> ```
|
||||||
|
|
||||||
|
> This blockquote contains a code block with language:
|
||||||
|
>
|
||||||
|
> ```javascript
|
||||||
|
> function example() {
|
||||||
|
> return "Hello";
|
||||||
|
> }
|
||||||
|
> ```
|
||||||
|
|
||||||
|
## Blockquotes with Headings
|
||||||
|
|
||||||
|
Blockquotes can contain headings.
|
||||||
|
|
||||||
|
> # Heading Level 1
|
||||||
|
>
|
||||||
|
> ## Heading Level 2
|
||||||
|
>
|
||||||
|
> ### Heading Level 3
|
||||||
|
|
||||||
|
## Blockquotes with Horizontal Rules
|
||||||
|
|
||||||
|
Blockquotes can contain horizontal rules.
|
||||||
|
|
||||||
|
> This is text before the rule.
|
||||||
|
>
|
||||||
|
> ---
|
||||||
|
>
|
||||||
|
> This is text after the rule.
|
||||||
|
|
||||||
|
## Multiple Blockquotes
|
||||||
|
|
||||||
|
Multiple blockquotes can appear consecutively.
|
||||||
|
|
||||||
|
> This is the first blockquote.
|
||||||
|
|
||||||
|
> This is the second blockquote.
|
||||||
|
|
||||||
|
> This is the third blockquote.
|
||||||
|
|
||||||
|
## Blockquotes in Context
|
||||||
|
|
||||||
|
Blockquotes can appear alongside regular paragraphs and other elements.
|
||||||
|
|
||||||
|
This is a regular paragraph before the blockquote.
|
||||||
|
|
||||||
|
> This is a blockquote between paragraphs.
|
||||||
|
|
||||||
|
This is a regular paragraph after the blockquote.
|
||||||
|
|
||||||
|
## Empty Blockquotes
|
||||||
|
|
||||||
|
An empty blockquote can be created, though it may not render visibly.
|
||||||
|
|
||||||
|
>
|
||||||
|
|
||||||
|
## Blockquotes with Special Characters
|
||||||
|
|
||||||
|
Blockquotes can contain special characters and punctuation.
|
||||||
|
|
||||||
|
> This blockquote has numbers: 123, 456, 789.
|
||||||
|
|
||||||
|
> This blockquote has symbols: !@#$%^&*().
|
||||||
|
|
||||||
|
> This blockquote has quotes: "Hello" and 'World'.
|
||||||
|
|
||||||
|
> This blockquote has parentheses (like this) and brackets [like this].
|
||||||
|
|
||||||
|
## Long Blockquotes
|
||||||
|
|
||||||
|
Blockquotes can contain very long text that wraps across multiple lines.
|
||||||
|
|
||||||
|
> This is a very long blockquote that contains a substantial amount of text. It demonstrates how blockquotes handle extended content that might wrap across multiple visual lines in the rendered output. The blockquote should maintain its styling and indentation even when the text extends beyond a single line.
|
||||||
|
|
||||||
|
## Blockquotes with Mixed Content
|
||||||
|
|
||||||
|
Blockquotes can contain a mix of different content types.
|
||||||
|
|
||||||
|
> This blockquote contains **bold text**, *italic text*, and `code`.
|
||||||
|
>
|
||||||
|
> It also contains a [link](https://example.com).
|
||||||
|
>
|
||||||
|
> - And a list item
|
||||||
|
> - Another list item
|
||||||
|
>
|
||||||
|
> And more regular text.
|
||||||
|
|
||||||
|
## Edge Cases
|
||||||
|
|
||||||
|
### Blockquote with Only Spaces
|
||||||
|
|
||||||
|
>
|
||||||
|
|
||||||
|
### Blockquote with Trailing Spaces
|
||||||
|
|
||||||
|
> Blockquote with trailing spaces.
|
||||||
|
|
||||||
|
### Very Short Blockquote
|
||||||
|
|
||||||
|
> A
|
||||||
|
|
||||||
|
### Blockquote with Only Special Characters
|
||||||
|
|
||||||
|
> !@#$%^&*()
|
||||||
|
|
||||||
|
### Blockquote Marker Without Space
|
||||||
|
|
||||||
|
>This might not render correctly in some processors.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Source:** [basic-blockquotes.md](https://github.com/dergigi/boris/tree/master/test/markdown/basic-blockquotes.md)
|
||||||
|
|
||||||
310
test/markdown/basic-code.md
Normal file
310
test/markdown/basic-code.md
Normal file
@@ -0,0 +1,310 @@
|
|||||||
|
# Basic Code Test
|
||||||
|
|
||||||
|
This file tests inline code and code block syntax in markdown.
|
||||||
|
|
||||||
|
## Inline Code
|
||||||
|
|
||||||
|
Inline code is created using backticks (`` ` ``) around the text.
|
||||||
|
|
||||||
|
This paragraph contains `inline code`.
|
||||||
|
|
||||||
|
You can use `inline code` anywhere in a sentence.
|
||||||
|
|
||||||
|
`Code` can appear at the start of a sentence.
|
||||||
|
|
||||||
|
A sentence can end with `code`.
|
||||||
|
|
||||||
|
## Code Blocks
|
||||||
|
|
||||||
|
Code blocks are created using triple backticks (``` ``` ```) on lines before and after the code.
|
||||||
|
|
||||||
|
```
|
||||||
|
This is a code block.
|
||||||
|
It can contain multiple lines.
|
||||||
|
Each line is preserved as written.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Code Blocks with Language
|
||||||
|
|
||||||
|
Code blocks can specify a programming language for syntax highlighting.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
function example() {
|
||||||
|
return "Hello, World!";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```python
|
||||||
|
def example():
|
||||||
|
return "Hello, World!"
|
||||||
|
```
|
||||||
|
|
||||||
|
```html
|
||||||
|
<div>
|
||||||
|
<p>Hello, World!</p>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
```css
|
||||||
|
.example {
|
||||||
|
color: blue;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Multiple Code Blocks
|
||||||
|
|
||||||
|
Multiple code blocks can appear consecutively.
|
||||||
|
|
||||||
|
```
|
||||||
|
First code block
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
Second code block
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
Third code block
|
||||||
|
```
|
||||||
|
|
||||||
|
## Code Blocks with Formatting
|
||||||
|
|
||||||
|
Code blocks preserve all formatting, including spaces and indentation.
|
||||||
|
|
||||||
|
```
|
||||||
|
This code block
|
||||||
|
has indentation
|
||||||
|
that should be preserved
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
function example() {
|
||||||
|
if (condition) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Code Blocks with Special Characters
|
||||||
|
|
||||||
|
Code blocks can contain special characters and symbols.
|
||||||
|
|
||||||
|
```
|
||||||
|
!@#$%^&*()
|
||||||
|
[]{}()
|
||||||
|
<>
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
function test() {
|
||||||
|
console.log("Hello, World!");
|
||||||
|
return 123;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Inline Code with Special Characters
|
||||||
|
|
||||||
|
Inline code can contain special characters.
|
||||||
|
|
||||||
|
This has `code with !@#$%` in it.
|
||||||
|
|
||||||
|
This has `code with ()[]{}` in it.
|
||||||
|
|
||||||
|
This has `code with <>&` in it.
|
||||||
|
|
||||||
|
## Escaping Backticks in Inline Code
|
||||||
|
|
||||||
|
To include a backtick in inline code, use double backticks.
|
||||||
|
|
||||||
|
This contains `` `backtick` `` in the code.
|
||||||
|
|
||||||
|
This contains `` `code with backticks` `` in it.
|
||||||
|
|
||||||
|
## Code Blocks with Empty Lines
|
||||||
|
|
||||||
|
Code blocks can contain empty lines.
|
||||||
|
|
||||||
|
```
|
||||||
|
First line
|
||||||
|
|
||||||
|
Third line
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
Line one
|
||||||
|
|
||||||
|
Line three
|
||||||
|
|
||||||
|
Line five
|
||||||
|
```
|
||||||
|
|
||||||
|
## Code Blocks with Only Whitespace
|
||||||
|
|
||||||
|
Code blocks can contain only whitespace.
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Inline Code in Different Contexts
|
||||||
|
|
||||||
|
Inline code can appear in various contexts.
|
||||||
|
|
||||||
|
### In Paragraphs
|
||||||
|
|
||||||
|
This paragraph has `inline code` in it.
|
||||||
|
|
||||||
|
### In Lists
|
||||||
|
|
||||||
|
- Item with `inline code`
|
||||||
|
- Another item with `code`
|
||||||
|
|
||||||
|
1. Ordered item with `inline code`
|
||||||
|
2. Another ordered item with `code`
|
||||||
|
|
||||||
|
### In Blockquotes
|
||||||
|
|
||||||
|
> This blockquote contains `inline code`.
|
||||||
|
|
||||||
|
### In Headings
|
||||||
|
|
||||||
|
### Heading with `Code`
|
||||||
|
|
||||||
|
## Code Blocks in Different Contexts
|
||||||
|
|
||||||
|
### Code Blocks After Paragraphs
|
||||||
|
|
||||||
|
This is a paragraph.
|
||||||
|
|
||||||
|
```
|
||||||
|
Code block after paragraph
|
||||||
|
```
|
||||||
|
|
||||||
|
### Code Blocks Before Paragraphs
|
||||||
|
|
||||||
|
```
|
||||||
|
Code block before paragraph
|
||||||
|
```
|
||||||
|
|
||||||
|
This is a paragraph.
|
||||||
|
|
||||||
|
### Code Blocks Between Paragraphs
|
||||||
|
|
||||||
|
This is the first paragraph.
|
||||||
|
|
||||||
|
```
|
||||||
|
Code block in the middle
|
||||||
|
```
|
||||||
|
|
||||||
|
This is the second paragraph.
|
||||||
|
|
||||||
|
### Code Blocks in Lists
|
||||||
|
|
||||||
|
- List item before code block
|
||||||
|
|
||||||
|
```
|
||||||
|
Code block in list
|
||||||
|
```
|
||||||
|
|
||||||
|
- List item after code block
|
||||||
|
|
||||||
|
### Code Blocks in Blockquotes
|
||||||
|
|
||||||
|
> This is a blockquote with a code block:
|
||||||
|
>
|
||||||
|
> ```
|
||||||
|
> Code block in blockquote
|
||||||
|
> ```
|
||||||
|
|
||||||
|
## Long Code Blocks
|
||||||
|
|
||||||
|
Code blocks can contain very long lines of code.
|
||||||
|
|
||||||
|
```
|
||||||
|
This is a very long line of code that extends far beyond the normal width and should demonstrate how code blocks handle extended content that might require horizontal scrolling or wrapping depending on the rendering implementation.
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
function veryLongFunctionNameThatExtendsBeyondNormalWidth(parameterOne, parameterTwo, parameterThree, parameterFour) {
|
||||||
|
return parameterOne + parameterTwo + parameterThree + parameterFour;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Code Blocks with Many Lines
|
||||||
|
|
||||||
|
Code blocks can contain many lines of code.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
function example() {
|
||||||
|
let x = 1;
|
||||||
|
let y = 2;
|
||||||
|
let z = 3;
|
||||||
|
let a = 4;
|
||||||
|
let b = 5;
|
||||||
|
let c = 6;
|
||||||
|
let d = 7;
|
||||||
|
let e = 8;
|
||||||
|
let f = 9;
|
||||||
|
let g = 10;
|
||||||
|
return x + y + z + a + b + c + d + e + f + g;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Edge Cases
|
||||||
|
|
||||||
|
### Inline Code with Only Spaces
|
||||||
|
|
||||||
|
` `
|
||||||
|
|
||||||
|
### Inline Code with Only Special Characters
|
||||||
|
|
||||||
|
`!@#$%^&*()`
|
||||||
|
|
||||||
|
### Very Short Inline Code
|
||||||
|
|
||||||
|
`` `a` ``
|
||||||
|
|
||||||
|
### Inline Code at Word Boundaries
|
||||||
|
|
||||||
|
`code`word
|
||||||
|
|
||||||
|
word`code`
|
||||||
|
|
||||||
|
### Code Block with Only One Line
|
||||||
|
|
||||||
|
```
|
||||||
|
Single line code block
|
||||||
|
```
|
||||||
|
|
||||||
|
### Code Block with Trailing Spaces
|
||||||
|
|
||||||
|
```
|
||||||
|
Code block with trailing spaces
|
||||||
|
```
|
||||||
|
|
||||||
|
### Unclosed Code Block
|
||||||
|
|
||||||
|
```
|
||||||
|
This code block is not closed properly
|
||||||
|
|
||||||
|
### Code Block with Language but No Code
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
```
|
||||||
|
|
||||||
|
### Inline Code with Backticks
|
||||||
|
|
||||||
|
`` `code` ``
|
||||||
|
|
||||||
|
`` ``code`` ``
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Source:** [basic-code.md](https://github.com/dergigi/boris/tree/master/test/markdown/basic-code.md)
|
||||||
|
|
||||||
194
test/markdown/basic-emphasis.md
Normal file
194
test/markdown/basic-emphasis.md
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
**!!!**
|
||||||
|
|
||||||
|
*???*
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Source:** [basic-emphasis.md](https://github.com/dergigi/boris/tree/master/test/markdown/basic-emphasis.md)
|
||||||
|
|
||||||
219
test/markdown/basic-escaping.md
Normal file
219
test/markdown/basic-escaping.md
Normal file
@@ -0,0 +1,219 @@
|
|||||||
|
# Basic Escaping Test
|
||||||
|
|
||||||
|
This file tests character escaping in markdown using backslashes to display literal characters that would otherwise have special meaning.
|
||||||
|
|
||||||
|
## Escaping Special Characters
|
||||||
|
|
||||||
|
You can escape special markdown characters by placing a backslash (`\`) before them.
|
||||||
|
|
||||||
|
### Backslash
|
||||||
|
|
||||||
|
To display a literal backslash, escape it: \\
|
||||||
|
|
||||||
|
### Backtick
|
||||||
|
|
||||||
|
To display a literal backtick, escape it: \`
|
||||||
|
|
||||||
|
### Asterisk
|
||||||
|
|
||||||
|
To display a literal asterisk, escape it: \*
|
||||||
|
|
||||||
|
### Underscore
|
||||||
|
|
||||||
|
To display a literal underscore, escape it: \_
|
||||||
|
|
||||||
|
### Curly Braces
|
||||||
|
|
||||||
|
To display literal curly braces, escape them: \{ \}
|
||||||
|
|
||||||
|
### Square Brackets
|
||||||
|
|
||||||
|
To display literal square brackets, escape them: \[ \]
|
||||||
|
|
||||||
|
### Angle Brackets
|
||||||
|
|
||||||
|
To display literal angle brackets, escape them: \< \>
|
||||||
|
|
||||||
|
### Parentheses
|
||||||
|
|
||||||
|
To display literal parentheses, escape them: \( \)
|
||||||
|
|
||||||
|
### Pound Sign
|
||||||
|
|
||||||
|
To display a literal pound sign (hash), escape it: \#
|
||||||
|
|
||||||
|
### Plus Sign
|
||||||
|
|
||||||
|
To display a literal plus sign, escape it: \+
|
||||||
|
|
||||||
|
### Minus Sign
|
||||||
|
|
||||||
|
To display a literal minus sign (hyphen), escape it: \-
|
||||||
|
|
||||||
|
### Dot
|
||||||
|
|
||||||
|
To display a literal dot (period), escape it: \.
|
||||||
|
|
||||||
|
### Exclamation Mark
|
||||||
|
|
||||||
|
To display a literal exclamation mark, escape it: \!
|
||||||
|
|
||||||
|
### Pipe
|
||||||
|
|
||||||
|
To display a literal pipe character, escape it: \|
|
||||||
|
|
||||||
|
## Escaping in Different Contexts
|
||||||
|
|
||||||
|
### Escaping in Paragraphs
|
||||||
|
|
||||||
|
This paragraph contains escaped characters: \*asterisk\*, \_underscore\_, \`backtick\`.
|
||||||
|
|
||||||
|
### Escaping in Headings
|
||||||
|
|
||||||
|
#### Heading with \*Escaped\* Characters
|
||||||
|
|
||||||
|
#### Heading with \_Escaped\_ Characters
|
||||||
|
|
||||||
|
### Escaping in Lists
|
||||||
|
|
||||||
|
- Item with \*escaped asterisk\*
|
||||||
|
- Item with \_escaped underscore\_
|
||||||
|
- Item with \`escaped backtick\`
|
||||||
|
|
||||||
|
1. Ordered item with \*escaped\*
|
||||||
|
2. Another item with \_escaped\_
|
||||||
|
|
||||||
|
### Escaping in Blockquotes
|
||||||
|
|
||||||
|
> This blockquote contains \*escaped\* characters.
|
||||||
|
|
||||||
|
> This blockquote has \_escaped\_ underscores.
|
||||||
|
|
||||||
|
### Escaping in Links
|
||||||
|
|
||||||
|
You cannot escape characters inside link syntax, but you can escape them in the link text context.
|
||||||
|
|
||||||
|
This is a [link with \*escaped\* text](https://example.com).
|
||||||
|
|
||||||
|
## Multiple Escaped Characters
|
||||||
|
|
||||||
|
You can escape multiple characters in sequence.
|
||||||
|
|
||||||
|
\*\*This would be bold if not escaped\*\*
|
||||||
|
|
||||||
|
\*\*\*This would be bold and italic if not escaped\*\*\*
|
||||||
|
|
||||||
|
\`\`This would be code if not escaped\`\`
|
||||||
|
|
||||||
|
## Escaping vs. Not Escaping
|
||||||
|
|
||||||
|
### Without Escaping
|
||||||
|
|
||||||
|
This text has **bold** and *italic* formatting.
|
||||||
|
|
||||||
|
### With Escaping
|
||||||
|
|
||||||
|
This text has \*\*escaped bold\*\* and \*escaped italic\* markers.
|
||||||
|
|
||||||
|
## Escaping Special Characters in Code
|
||||||
|
|
||||||
|
Inside code blocks and inline code, characters are already literal and don't need escaping.
|
||||||
|
|
||||||
|
```
|
||||||
|
This code block contains *asterisks* and _underscores_ without escaping.
|
||||||
|
```
|
||||||
|
|
||||||
|
This paragraph contains `inline code with *asterisks*` that don't need escaping.
|
||||||
|
|
||||||
|
## Escaping at Word Boundaries
|
||||||
|
|
||||||
|
Escaped characters can appear at the start or end of words.
|
||||||
|
|
||||||
|
\*Start of word
|
||||||
|
|
||||||
|
End of word\*
|
||||||
|
|
||||||
|
\_Start of word
|
||||||
|
|
||||||
|
End of word\_
|
||||||
|
|
||||||
|
## Escaping with Punctuation
|
||||||
|
|
||||||
|
Escaped characters work correctly with adjacent punctuation.
|
||||||
|
|
||||||
|
\*Asterisk\*, with comma.
|
||||||
|
|
||||||
|
\*Asterisk\*. With period.
|
||||||
|
|
||||||
|
\*Asterisk\*! With exclamation.
|
||||||
|
|
||||||
|
\_Underscore\_, with comma.
|
||||||
|
|
||||||
|
\_Underscore\_. With period.
|
||||||
|
|
||||||
|
## Edge Cases
|
||||||
|
|
||||||
|
### Escaping Non-Special Characters
|
||||||
|
|
||||||
|
Escaping characters that don't have special meaning in markdown typically results in a literal backslash followed by the character.
|
||||||
|
|
||||||
|
\a
|
||||||
|
|
||||||
|
\b
|
||||||
|
|
||||||
|
\c
|
||||||
|
|
||||||
|
### Multiple Backslashes
|
||||||
|
|
||||||
|
\\\\
|
||||||
|
|
||||||
|
\\\\\\
|
||||||
|
|
||||||
|
### Escaping Spaces
|
||||||
|
|
||||||
|
Escaping a space typically doesn't have a special effect: \
|
||||||
|
|
||||||
|
### Escaping Newlines
|
||||||
|
|
||||||
|
Escaping a newline (backslash at end of line) may create a line break in some processors, but this is not part of basic markdown syntax.
|
||||||
|
|
||||||
|
### Escaping in Different Positions
|
||||||
|
|
||||||
|
Start: \*text
|
||||||
|
|
||||||
|
Middle: text\*text
|
||||||
|
|
||||||
|
End: text\*
|
||||||
|
|
||||||
|
### Escaping Special Character Sequences
|
||||||
|
|
||||||
|
\*\*\*
|
||||||
|
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
\-\-\-
|
||||||
|
|
||||||
|
## Real-World Examples
|
||||||
|
|
||||||
|
### Escaping in Documentation
|
||||||
|
|
||||||
|
When writing documentation about markdown, you often need to escape characters to show the syntax.
|
||||||
|
|
||||||
|
To create bold text, use \*\*two asterisks\*\*.
|
||||||
|
|
||||||
|
To create italic text, use \*one asterisk\*.
|
||||||
|
|
||||||
|
To create inline code, use \`backticks\`.
|
||||||
|
|
||||||
|
### Escaping in Examples
|
||||||
|
|
||||||
|
Here's how to escape a backtick: \`
|
||||||
|
|
||||||
|
Here's how to escape an asterisk: \*
|
||||||
|
|
||||||
|
Here's how to escape an underscore: \_
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Source:** [basic-escaping.md](https://github.com/dergigi/boris/tree/master/test/markdown/basic-escaping.md)
|
||||||
|
|
||||||
140
test/markdown/basic-headings.md
Normal file
140
test/markdown/basic-headings.md
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
# Basic Headings Test
|
||||||
|
|
||||||
|
This file tests markdown heading syntax, including all heading levels and alternate syntax forms.
|
||||||
|
|
||||||
|
## Heading Levels
|
||||||
|
|
||||||
|
Headings are created using number signs (`#`) followed by a space and the heading text. The number of `#` symbols determines the heading level.
|
||||||
|
|
||||||
|
# Heading Level 1
|
||||||
|
|
||||||
|
## Heading Level 2
|
||||||
|
|
||||||
|
### Heading Level 3
|
||||||
|
|
||||||
|
#### Heading Level 4
|
||||||
|
|
||||||
|
##### Heading Level 5
|
||||||
|
|
||||||
|
###### Heading Level 6
|
||||||
|
|
||||||
|
## Best Practices
|
||||||
|
|
||||||
|
Always include a space between the number signs and the heading text for compatibility across markdown processors.
|
||||||
|
|
||||||
|
# Correct: Space after #
|
||||||
|
|
||||||
|
#Incorrect: No space after #
|
||||||
|
|
||||||
|
## Blank Lines
|
||||||
|
|
||||||
|
For best compatibility, include blank lines before and after headings.
|
||||||
|
|
||||||
|
This paragraph is before the heading.
|
||||||
|
|
||||||
|
# Heading with blank lines
|
||||||
|
|
||||||
|
This paragraph is after the heading.
|
||||||
|
|
||||||
|
Without blank lines, this might not render correctly.
|
||||||
|
# Heading without blank lines
|
||||||
|
This text might be treated as part of the heading.
|
||||||
|
|
||||||
|
## Alternate Syntax (Setext)
|
||||||
|
|
||||||
|
Heading level 1 can also be created using equals signs (`=`) on the line below the text.
|
||||||
|
|
||||||
|
Heading Level 1
|
||||||
|
===============
|
||||||
|
|
||||||
|
Heading level 2 can be created using hyphens (`-`) on the line below the text.
|
||||||
|
|
||||||
|
Heading Level 2
|
||||||
|
---------------
|
||||||
|
|
||||||
|
## Headings with Formatting
|
||||||
|
|
||||||
|
Headings can contain inline formatting like bold and italic text.
|
||||||
|
|
||||||
|
### Heading with **Bold** Text
|
||||||
|
|
||||||
|
### Heading with *Italic* Text
|
||||||
|
|
||||||
|
### Heading with ***Bold and Italic*** Text
|
||||||
|
|
||||||
|
### Heading with `Code` Text
|
||||||
|
|
||||||
|
## Headings with Links
|
||||||
|
|
||||||
|
Headings can contain links.
|
||||||
|
|
||||||
|
### Heading with [Link](https://example.com)
|
||||||
|
|
||||||
|
### Heading with [Reference Link][ref]
|
||||||
|
|
||||||
|
[ref]: https://example.com
|
||||||
|
|
||||||
|
## Long Headings
|
||||||
|
|
||||||
|
This tests how headings handle very long text that might wrap across multiple lines on smaller screens or in narrow containers.
|
||||||
|
|
||||||
|
# This is a very long heading that contains many words and should demonstrate how the markdown processor handles headings that extend beyond a single line of text
|
||||||
|
|
||||||
|
## Special Characters in Headings
|
||||||
|
|
||||||
|
Headings can contain various special characters and punctuation.
|
||||||
|
|
||||||
|
### Heading with Numbers: 123
|
||||||
|
|
||||||
|
### Heading with Symbols: !@#$%^&*()
|
||||||
|
|
||||||
|
### Heading with Quotes: "Hello World"
|
||||||
|
|
||||||
|
### Heading with Parentheses (Like This)
|
||||||
|
|
||||||
|
### Heading with Brackets [Like This]
|
||||||
|
|
||||||
|
### Heading with Braces {Like This}
|
||||||
|
|
||||||
|
## Multiple Headings
|
||||||
|
|
||||||
|
Multiple headings of the same or different levels can appear consecutively.
|
||||||
|
|
||||||
|
# First H1
|
||||||
|
|
||||||
|
# Second H1
|
||||||
|
|
||||||
|
## First H2
|
||||||
|
|
||||||
|
## Second H2
|
||||||
|
|
||||||
|
### First H3
|
||||||
|
|
||||||
|
### Second H3
|
||||||
|
|
||||||
|
## Edge Cases
|
||||||
|
|
||||||
|
### Heading with Only Spaces
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
|
### Heading with Trailing Spaces
|
||||||
|
|
||||||
|
# Heading with trailing spaces
|
||||||
|
|
||||||
|
### Heading Starting with Number Sign
|
||||||
|
|
||||||
|
# #Heading that starts with a number sign
|
||||||
|
|
||||||
|
### Very Short Heading
|
||||||
|
|
||||||
|
# A
|
||||||
|
|
||||||
|
### Heading with Only Special Characters
|
||||||
|
|
||||||
|
# !@#$%^&*()
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Source:** [basic-headings.md](https://github.com/dergigi/boris/tree/master/test/markdown/basic-headings.md)
|
||||||
|
|
||||||
194
test/markdown/basic-horizontal-rules.md
Normal file
194
test/markdown/basic-horizontal-rules.md
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
# Basic Horizontal Rules Test
|
||||||
|
|
||||||
|
This file tests horizontal rule syntax using hyphens, asterisks, and underscores.
|
||||||
|
|
||||||
|
## Basic Horizontal Rules
|
||||||
|
|
||||||
|
Horizontal rules are created using three or more hyphens, asterisks, or underscores on their own line.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
## Minimum Characters
|
||||||
|
|
||||||
|
At least three characters are required, but more can be used.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Different Characters
|
||||||
|
|
||||||
|
Horizontal rules can be created with hyphens, asterisks, or underscores.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
## Horizontal Rules in Context
|
||||||
|
|
||||||
|
Horizontal rules can appear between paragraphs and other elements.
|
||||||
|
|
||||||
|
This is a paragraph before the horizontal rule.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
This is a paragraph after the horizontal rule.
|
||||||
|
|
||||||
|
## Multiple Horizontal Rules
|
||||||
|
|
||||||
|
Multiple horizontal rules can appear consecutively.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Horizontal Rules with Formatting
|
||||||
|
|
||||||
|
Horizontal rules are standalone elements and cannot contain formatting, but they can appear alongside formatted content.
|
||||||
|
|
||||||
|
This paragraph has **bold text**.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
This paragraph has *italic text*.
|
||||||
|
|
||||||
|
## Horizontal Rules with Lists
|
||||||
|
|
||||||
|
Horizontal rules can appear before and after lists.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- First item
|
||||||
|
- Second item
|
||||||
|
- Third item
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Horizontal Rules with Blockquotes
|
||||||
|
|
||||||
|
Horizontal rules can appear before and after blockquotes.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> This is a blockquote.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Horizontal Rules with Code Blocks
|
||||||
|
|
||||||
|
Horizontal rules can appear before and after code blocks.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
```
|
||||||
|
Code block here
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Horizontal Rules with Headings
|
||||||
|
|
||||||
|
Horizontal rules can appear before and after headings.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Heading Level 1
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Heading Level 2
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Spacing Around Horizontal Rules
|
||||||
|
|
||||||
|
Horizontal rules should be on their own line with blank lines before and after for best compatibility.
|
||||||
|
|
||||||
|
Paragraph before.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Paragraph after.
|
||||||
|
|
||||||
|
## Edge Cases
|
||||||
|
|
||||||
|
### Horizontal Rule with Spaces
|
||||||
|
|
||||||
|
- - -
|
||||||
|
|
||||||
|
* * *
|
||||||
|
|
||||||
|
_ _ _
|
||||||
|
|
||||||
|
### Horizontal Rule with Only Two Characters
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
|
**
|
||||||
|
|
||||||
|
__
|
||||||
|
|
||||||
|
### Horizontal Rule with Mixed Characters
|
||||||
|
|
||||||
|
-*_
|
||||||
|
|
||||||
|
*-_
|
||||||
|
|
||||||
|
_*-
|
||||||
|
|
||||||
|
### Horizontal Rule with Trailing Spaces
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
### Horizontal Rule with Leading Spaces
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
### Very Long Horizontal Rules
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
***********************************
|
||||||
|
|
||||||
|
___________________________________
|
||||||
|
|
||||||
|
### Horizontal Rule Between Other Elements
|
||||||
|
|
||||||
|
# Heading
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Another Heading
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Third Heading
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Paragraph text.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Source:** [basic-horizontal-rules.md](https://github.com/dergigi/boris/tree/master/test/markdown/basic-horizontal-rules.md)
|
||||||
|
|
||||||
95
test/markdown/basic-index.md
Normal file
95
test/markdown/basic-index.md
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
# Basic Markdown Syntax Test Index
|
||||||
|
|
||||||
|
This directory contains test files for basic markdown syntax features. Each file focuses on a specific aspect of the [Markdown Guide's Basic Syntax](https://www.markdownguide.org/basic-syntax/).
|
||||||
|
|
||||||
|
## Test Files
|
||||||
|
|
||||||
|
### [basic-headings.md](./basic-headings.md)
|
||||||
|
Tests heading syntax including:
|
||||||
|
- All heading levels (H1 through H6)
|
||||||
|
- Setext-style headings (alternate syntax)
|
||||||
|
- Headings with formatting and links
|
||||||
|
- Best practices for spacing and blank lines
|
||||||
|
|
||||||
|
### [basic-paragraphs-line-breaks.md](./basic-paragraphs-line-breaks.md)
|
||||||
|
Tests paragraph separation and line break syntax:
|
||||||
|
- Paragraph creation with blank lines
|
||||||
|
- Line breaks using trailing spaces
|
||||||
|
- HTML line breaks using `<br>` tag
|
||||||
|
- Best practices for paragraph formatting
|
||||||
|
|
||||||
|
### [basic-emphasis.md](./basic-emphasis.md)
|
||||||
|
Tests bold and italic text formatting:
|
||||||
|
- Bold text with `**` and `__`
|
||||||
|
- Italic text with `*` and `_`
|
||||||
|
- Combined bold and italic
|
||||||
|
- Mid-word emphasis best practices
|
||||||
|
|
||||||
|
### [basic-blockquotes.md](./basic-blockquotes.md)
|
||||||
|
Tests blockquote syntax:
|
||||||
|
- Basic blockquotes with `>`
|
||||||
|
- Multiple paragraph blockquotes
|
||||||
|
- Nested blockquotes
|
||||||
|
- Blockquotes containing lists, code, and formatting
|
||||||
|
|
||||||
|
### [basic-lists.md](./basic-lists.md)
|
||||||
|
Tests ordered and unordered list syntax:
|
||||||
|
- Unordered lists with `-`, `*`, and `+`
|
||||||
|
- Ordered lists with numbers
|
||||||
|
- Nested lists
|
||||||
|
- Lists with formatting, links, and code
|
||||||
|
|
||||||
|
### [basic-code.md](./basic-code.md)
|
||||||
|
Tests inline code and code block syntax:
|
||||||
|
- Inline code with backticks
|
||||||
|
- Code blocks with triple backticks
|
||||||
|
- Code blocks with language specification
|
||||||
|
- Escaping backticks in inline code
|
||||||
|
|
||||||
|
### [basic-horizontal-rules.md](./basic-horizontal-rules.md)
|
||||||
|
Tests horizontal rule syntax:
|
||||||
|
- Horizontal rules with `---`, `***`, and `___`
|
||||||
|
- Minimum character requirements
|
||||||
|
- Horizontal rules in various contexts
|
||||||
|
|
||||||
|
### [basic-links-and-images.md](./basic-links-and-images.md)
|
||||||
|
Tests link and image syntax:
|
||||||
|
- Inline links and reference links
|
||||||
|
- Links with titles
|
||||||
|
- Images with alt text and titles
|
||||||
|
- Linking images
|
||||||
|
- URL encoding best practices
|
||||||
|
|
||||||
|
### [basic-escaping.md](./basic-escaping.md)
|
||||||
|
Tests character escaping:
|
||||||
|
- Escaping special markdown characters with backslashes
|
||||||
|
- Escaping in different contexts
|
||||||
|
- All escapable characters per the Markdown Guide
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
These test files can be:
|
||||||
|
- Viewed in the app's markdown reader
|
||||||
|
- Published to Nostr relays using `./scripts/publish-markdown.sh`
|
||||||
|
|
||||||
|
### Publishing a Test File
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Publish a specific file
|
||||||
|
./scripts/publish-markdown.sh basic-headings.md [wss://relay.example.com]
|
||||||
|
|
||||||
|
# Interactive mode (choose from all files)
|
||||||
|
./scripts/publish-markdown.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Related Files
|
||||||
|
|
||||||
|
- [tables.md](./tables.md) - Tests markdown table syntax (GFM feature, not basic syntax)
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- These files test only **basic markdown syntax** as defined in the original Markdown specification
|
||||||
|
- Extended syntax features (like tables, footnotes, task lists) are not included here
|
||||||
|
- Each file starts with an H1 heading for title extraction by the publish script
|
||||||
|
- Files are kept under 420 lines per project conventions
|
||||||
|
|
||||||
217
test/markdown/basic-links-and-images.md
Normal file
217
test/markdown/basic-links-and-images.md
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
# Basic Links and Images Test
|
||||||
|
|
||||||
|
This file tests link and image syntax in markdown, including inline links, reference links, and images.
|
||||||
|
|
||||||
|
## Inline Links
|
||||||
|
|
||||||
|
Inline links are created using square brackets for the link text followed by parentheses containing the URL.
|
||||||
|
|
||||||
|
This is an [inline link](https://example.com).
|
||||||
|
|
||||||
|
You can have [multiple links](https://example.com) in the [same paragraph](https://example.org).
|
||||||
|
|
||||||
|
## Links with Titles
|
||||||
|
|
||||||
|
Links can include an optional title that appears as a tooltip when hovering.
|
||||||
|
|
||||||
|
This is a [link with title](https://example.com "Example Website").
|
||||||
|
|
||||||
|
This is another [link with title](https://example.org 'Another Example').
|
||||||
|
|
||||||
|
This link uses (parentheses) for the title: [link](https://example.com (Title in Parentheses)).
|
||||||
|
|
||||||
|
## Reference Links
|
||||||
|
|
||||||
|
Reference links use a two-part syntax: the link text in square brackets, and the URL definition elsewhere.
|
||||||
|
|
||||||
|
This is a [reference link][example].
|
||||||
|
|
||||||
|
This is another [reference link][another].
|
||||||
|
|
||||||
|
[example]: https://example.com
|
||||||
|
[another]: https://example.org
|
||||||
|
|
||||||
|
## Reference Links with Titles
|
||||||
|
|
||||||
|
Reference links can also include titles.
|
||||||
|
|
||||||
|
This is a [reference link with title][titled].
|
||||||
|
|
||||||
|
[titled]: https://example.com "Link Title"
|
||||||
|
|
||||||
|
This is another [reference link with title][titled2].
|
||||||
|
|
||||||
|
[titled2]: https://example.org 'Another Title'
|
||||||
|
|
||||||
|
## Implicit Reference Links
|
||||||
|
|
||||||
|
You can use the link text itself as the reference identifier.
|
||||||
|
|
||||||
|
This is an [implicit reference link][implicit reference link].
|
||||||
|
|
||||||
|
[implicit reference link]: https://example.com
|
||||||
|
|
||||||
|
## Links in Different Contexts
|
||||||
|
|
||||||
|
### Links in Paragraphs
|
||||||
|
|
||||||
|
This paragraph contains a [link](https://example.com) in the middle of the text.
|
||||||
|
|
||||||
|
### Links in Lists
|
||||||
|
|
||||||
|
- Item with [link](https://example.com)
|
||||||
|
- Another item with [link](https://example.org)
|
||||||
|
|
||||||
|
1. Ordered item with [link](https://example.com)
|
||||||
|
2. Another ordered item with [link](https://example.org)
|
||||||
|
|
||||||
|
### Links in Blockquotes
|
||||||
|
|
||||||
|
> This blockquote contains a [link](https://example.com).
|
||||||
|
|
||||||
|
### Links in Headings
|
||||||
|
|
||||||
|
### Heading with [Link](https://example.com)
|
||||||
|
|
||||||
|
## Links with Formatting
|
||||||
|
|
||||||
|
Links can contain formatting like bold and italic.
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
|
## Images
|
||||||
|
|
||||||
|
Images are created using an exclamation mark followed by square brackets for alt text and parentheses for the image URL.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Images with Titles
|
||||||
|
|
||||||
|
Images can include optional titles.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Reference Style Images
|
||||||
|
|
||||||
|
Images can use reference-style syntax.
|
||||||
|
|
||||||
|
![Reference image][img1]
|
||||||
|
|
||||||
|
![Another reference image][img2]
|
||||||
|
|
||||||
|
[img1]: https://example.com/image.jpg
|
||||||
|
[img2]: https://example.com/photo.png "Photo Title"
|
||||||
|
|
||||||
|
## Linking Images
|
||||||
|
|
||||||
|
To create a link that wraps an image, enclose the image syntax in square brackets followed by the link URL in parentheses.
|
||||||
|
|
||||||
|
[](https://example.com)
|
||||||
|
|
||||||
|
[](https://example.org "Link Title")
|
||||||
|
|
||||||
|
## Images in Different Contexts
|
||||||
|
|
||||||
|
### Images in Paragraphs
|
||||||
|
|
||||||
|
This paragraph contains an image: 
|
||||||
|
|
||||||
|
### Images in Lists
|
||||||
|
|
||||||
|
- Item with image: 
|
||||||
|
- Another item with image: 
|
||||||
|
|
||||||
|
### Images in Blockquotes
|
||||||
|
|
||||||
|
> This blockquote contains an image: 
|
||||||
|
|
||||||
|
## Relative and Absolute URLs
|
||||||
|
|
||||||
|
Links can use both relative and absolute URLs.
|
||||||
|
|
||||||
|
This is a [relative link](../page.html).
|
||||||
|
|
||||||
|
This is an [absolute link](https://example.com/page.html).
|
||||||
|
|
||||||
|
This is a [protocol-relative link](//example.com/page.html).
|
||||||
|
|
||||||
|
## Links with Special Characters
|
||||||
|
|
||||||
|
Links can contain special characters, but URLs with spaces should be encoded.
|
||||||
|
|
||||||
|
This is a [link with encoded space](https://example.com/my%20page.html).
|
||||||
|
|
||||||
|
This is a [link with parentheses](https://example.com/page%28with%29parentheses.html).
|
||||||
|
|
||||||
|
## Edge Cases
|
||||||
|
|
||||||
|
### Empty Link Text
|
||||||
|
|
||||||
|
[](https://example.com)
|
||||||
|
|
||||||
|
### Link with Only Spaces
|
||||||
|
|
||||||
|
[ ](https://example.com)
|
||||||
|
|
||||||
|
### Image with Empty Alt Text
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Image with Only Spaces in Alt Text
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Link Without URL
|
||||||
|
|
||||||
|
[Link text]()
|
||||||
|
|
||||||
|
### Reference Link Without Definition
|
||||||
|
|
||||||
|
This is a [broken reference link][broken].
|
||||||
|
|
||||||
|
### Very Long URLs
|
||||||
|
|
||||||
|
This is a [link with a very long URL](https://example.com/very/long/path/to/a/resource/that/extends/beyond/normal/width/and/tests/how/the/renderer/handles/extended/urls.html).
|
||||||
|
|
||||||
|
### Links with Numbers
|
||||||
|
|
||||||
|
[Link 123](https://example.com)
|
||||||
|
|
||||||
|
[123 Link](https://example.com)
|
||||||
|
|
||||||
|
### Images with Special Characters in Alt Text
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Best Practices
|
||||||
|
|
||||||
|
### URL Encoding
|
||||||
|
|
||||||
|
For compatibility, encode spaces in URLs with `%20`.
|
||||||
|
|
||||||
|
✅ [Correct link](https://example.com/my%20page.html)
|
||||||
|
|
||||||
|
❌ [Incorrect link](https://example.com/my page.html)
|
||||||
|
|
||||||
|
### Parentheses in URLs
|
||||||
|
|
||||||
|
Encode opening parenthesis as `%28` and closing parenthesis as `%29`.
|
||||||
|
|
||||||
|
✅ [Correct link](https://example.com/page%28with%29parentheses.html)
|
||||||
|
|
||||||
|
❌ [Incorrect link](https://example.com/page(with)parentheses.html)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Source:** [basic-links-and-images.md](https://github.com/dergigi/boris/tree/master/test/markdown/basic-links-and-images.md)
|
||||||
|
|
||||||
249
test/markdown/basic-lists.md
Normal file
249
test/markdown/basic-lists.md
Normal file
@@ -0,0 +1,249 @@
|
|||||||
|
# Basic Lists Test
|
||||||
|
|
||||||
|
This file tests ordered and unordered list syntax in markdown.
|
||||||
|
|
||||||
|
## Unordered Lists
|
||||||
|
|
||||||
|
Unordered lists are created using hyphens (`-`), asterisks (`*`), or plus signs (`+`) followed by a space.
|
||||||
|
|
||||||
|
- First item
|
||||||
|
- Second item
|
||||||
|
- Third item
|
||||||
|
|
||||||
|
* First item
|
||||||
|
* Second item
|
||||||
|
* Third item
|
||||||
|
|
||||||
|
+ First item
|
||||||
|
+ Second item
|
||||||
|
+ Third item
|
||||||
|
|
||||||
|
## Ordered Lists
|
||||||
|
|
||||||
|
Ordered lists are created using numbers followed by a period and a space.
|
||||||
|
|
||||||
|
1. First item
|
||||||
|
2. Second item
|
||||||
|
3. Third item
|
||||||
|
|
||||||
|
## List Items with Multiple Paragraphs
|
||||||
|
|
||||||
|
List items can contain multiple paragraphs by indenting subsequent paragraphs.
|
||||||
|
|
||||||
|
- First item
|
||||||
|
|
||||||
|
This is a second paragraph in the first item.
|
||||||
|
|
||||||
|
- Second item
|
||||||
|
|
||||||
|
This is a second paragraph in the second item.
|
||||||
|
|
||||||
|
This is a third paragraph in the second item.
|
||||||
|
|
||||||
|
## Nested Lists
|
||||||
|
|
||||||
|
Lists can be nested by indenting list items.
|
||||||
|
|
||||||
|
- First level item
|
||||||
|
- Second level item
|
||||||
|
- Another second level item
|
||||||
|
- Back to first level
|
||||||
|
|
||||||
|
1. First ordered item
|
||||||
|
- Nested unordered item
|
||||||
|
- Another nested unordered item
|
||||||
|
2. Second ordered item
|
||||||
|
- Nested unordered item
|
||||||
|
- Third level item
|
||||||
|
|
||||||
|
- Unordered item
|
||||||
|
1. Nested ordered item
|
||||||
|
2. Another nested ordered item
|
||||||
|
- Another unordered item
|
||||||
|
|
||||||
|
## Lists with Formatting
|
||||||
|
|
||||||
|
List items can contain inline formatting like bold, italic, and code.
|
||||||
|
|
||||||
|
- Item with **bold text**
|
||||||
|
- Item with *italic text*
|
||||||
|
- Item with ***bold and italic text***
|
||||||
|
- Item with `code text`
|
||||||
|
- Item with **bold**, *italic*, and `code` together
|
||||||
|
|
||||||
|
1. Ordered item with **bold text**
|
||||||
|
2. Ordered item with *italic text*
|
||||||
|
3. Ordered item with `code text`
|
||||||
|
|
||||||
|
## Lists with Links
|
||||||
|
|
||||||
|
List items can contain links.
|
||||||
|
|
||||||
|
- Item with [inline link](https://example.com)
|
||||||
|
- Item with [reference link][ref]
|
||||||
|
|
||||||
|
[ref]: https://example.com
|
||||||
|
|
||||||
|
1. Ordered item with [link](https://example.com)
|
||||||
|
2. Another ordered item with [link](https://example.com)
|
||||||
|
|
||||||
|
## Lists with Code
|
||||||
|
|
||||||
|
List items can contain inline code and code blocks.
|
||||||
|
|
||||||
|
- Item with `inline code`
|
||||||
|
- Item with code block:
|
||||||
|
|
||||||
|
```
|
||||||
|
Code block here
|
||||||
|
More code
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Ordered item with `inline code`
|
||||||
|
2. Ordered item with code block:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
function example() {
|
||||||
|
return "Hello";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Lists with Blockquotes
|
||||||
|
|
||||||
|
List items can contain blockquotes.
|
||||||
|
|
||||||
|
- Item with blockquote:
|
||||||
|
|
||||||
|
> This is a blockquote inside a list item.
|
||||||
|
|
||||||
|
1. Ordered item with blockquote:
|
||||||
|
|
||||||
|
> This is a blockquote inside an ordered list item.
|
||||||
|
|
||||||
|
## Lists with Other Lists
|
||||||
|
|
||||||
|
Lists can contain other lists as nested items.
|
||||||
|
|
||||||
|
- First item
|
||||||
|
- Nested unordered list
|
||||||
|
- Deeper nesting
|
||||||
|
- Another nested item
|
||||||
|
- Second item
|
||||||
|
1. Nested ordered list
|
||||||
|
2. Another ordered item
|
||||||
|
- Even deeper nesting
|
||||||
|
|
||||||
|
## Ordered Lists with Different Start Numbers
|
||||||
|
|
||||||
|
Ordered lists can start with any number, but markdown processors typically normalize them.
|
||||||
|
|
||||||
|
1. First item
|
||||||
|
2. Second item
|
||||||
|
3. Third item
|
||||||
|
|
||||||
|
5. Starting at five
|
||||||
|
6. Second item
|
||||||
|
7. Third item
|
||||||
|
|
||||||
|
10. Starting at ten
|
||||||
|
11. Second item
|
||||||
|
12. Third item
|
||||||
|
|
||||||
|
## Mixed List Types
|
||||||
|
|
||||||
|
You can mix ordered and unordered lists at the same level.
|
||||||
|
|
||||||
|
- Unordered item
|
||||||
|
- Another unordered item
|
||||||
|
|
||||||
|
1. Ordered item
|
||||||
|
2. Another ordered item
|
||||||
|
|
||||||
|
- Back to unordered
|
||||||
|
|
||||||
|
## Long List Items
|
||||||
|
|
||||||
|
List items can contain extended text that wraps across multiple lines.
|
||||||
|
|
||||||
|
- This is a very long list item that contains a substantial amount of text. It demonstrates how list items handle extended content that might wrap across multiple visual lines in the rendered output. The list item should maintain proper formatting and indentation.
|
||||||
|
|
||||||
|
- Another long item with multiple sentences. Each sentence flows naturally into the next. The entire item should render as a cohesive unit with appropriate line wrapping based on the container width.
|
||||||
|
|
||||||
|
## Lists with Special Characters
|
||||||
|
|
||||||
|
List items can contain special characters and punctuation.
|
||||||
|
|
||||||
|
- Item with numbers: 123, 456, 789
|
||||||
|
- Item with symbols: !@#$%^&*()
|
||||||
|
- Item with quotes: "Hello" and 'World'
|
||||||
|
- Item with parentheses (like this) and brackets [like this]
|
||||||
|
|
||||||
|
1. Ordered item with numbers: 123
|
||||||
|
2. Ordered item with symbols: !@#$%^&*()
|
||||||
|
3. Ordered item with quotes: "Hello"
|
||||||
|
|
||||||
|
## Empty List Items
|
||||||
|
|
||||||
|
An empty list item can be created, though it may not render visibly.
|
||||||
|
|
||||||
|
-
|
||||||
|
|
||||||
|
1.
|
||||||
|
|
||||||
|
## Edge Cases
|
||||||
|
|
||||||
|
### List with Only Spaces
|
||||||
|
|
||||||
|
-
|
||||||
|
|
||||||
|
### List Item with Trailing Spaces
|
||||||
|
|
||||||
|
- Item with trailing spaces.
|
||||||
|
|
||||||
|
### Very Short List Items
|
||||||
|
|
||||||
|
- A
|
||||||
|
- B
|
||||||
|
- C
|
||||||
|
|
||||||
|
### List with Only Special Characters
|
||||||
|
|
||||||
|
- !@#$%^&*()
|
||||||
|
- !@#$%^&*()
|
||||||
|
|
||||||
|
### List Marker Without Space
|
||||||
|
|
||||||
|
-This might not render correctly in some processors.
|
||||||
|
|
||||||
|
1.This might not render correctly in some processors.
|
||||||
|
|
||||||
|
### Single Item Lists
|
||||||
|
|
||||||
|
- Only one item
|
||||||
|
|
||||||
|
1. Only one item
|
||||||
|
|
||||||
|
### Lists with Many Items
|
||||||
|
|
||||||
|
This tests how lists handle a larger number of items.
|
||||||
|
|
||||||
|
1. First item
|
||||||
|
2. Second item
|
||||||
|
3. Third item
|
||||||
|
4. Fourth item
|
||||||
|
5. Fifth item
|
||||||
|
6. Sixth item
|
||||||
|
7. Seventh item
|
||||||
|
8. Eighth item
|
||||||
|
9. Ninth item
|
||||||
|
10. Tenth item
|
||||||
|
11. Eleventh item
|
||||||
|
12. Twelfth item
|
||||||
|
13. Thirteenth item
|
||||||
|
14. Fourteenth item
|
||||||
|
15. Fifteenth item
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Source:** [basic-lists.md](https://github.com/dergigi/boris/tree/master/test/markdown/basic-lists.md)
|
||||||
|
|
||||||
156
test/markdown/basic-paragraphs-line-breaks.md
Normal file
156
test/markdown/basic-paragraphs-line-breaks.md
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
# Basic Paragraphs and Line Breaks Test
|
||||||
|
|
||||||
|
This file tests paragraph separation and line break syntax in markdown.
|
||||||
|
|
||||||
|
## Paragraphs
|
||||||
|
|
||||||
|
Paragraphs are created by separating blocks of text with blank lines. A paragraph is one or more consecutive lines of text separated by blank lines.
|
||||||
|
|
||||||
|
This is the first paragraph. It contains multiple sentences. Each sentence flows naturally into the next. The paragraph continues until a blank line appears.
|
||||||
|
|
||||||
|
This is the second paragraph. It is separated from the first paragraph by a blank line. Paragraphs should render as distinct blocks of text with appropriate spacing between them.
|
||||||
|
|
||||||
|
This is the third paragraph. It demonstrates that multiple paragraphs can appear consecutively, each separated by a blank line.
|
||||||
|
|
||||||
|
## Single Line Paragraphs
|
||||||
|
|
||||||
|
A paragraph can consist of a single line of text.
|
||||||
|
|
||||||
|
This is a single-line paragraph.
|
||||||
|
|
||||||
|
This is another single-line paragraph.
|
||||||
|
|
||||||
|
## Paragraphs with Multiple Sentences
|
||||||
|
|
||||||
|
Paragraphs can contain multiple sentences. Each sentence ends with appropriate punctuation. The sentences flow together as a cohesive unit. This paragraph demonstrates that natural paragraph structure is preserved.
|
||||||
|
|
||||||
|
## Line Breaks
|
||||||
|
|
||||||
|
To create a line break within a paragraph, end a line with two or more spaces followed by a return.
|
||||||
|
|
||||||
|
This is the first line.
|
||||||
|
This is the second line created with trailing spaces.
|
||||||
|
|
||||||
|
This demonstrates that line breaks create a new line within the same paragraph, rather than starting a new paragraph.
|
||||||
|
|
||||||
|
## HTML Line Breaks
|
||||||
|
|
||||||
|
If your markdown processor supports HTML, you can use the `<br>` tag for line breaks.
|
||||||
|
|
||||||
|
This is the first line.<br>
|
||||||
|
This is the second line created with an HTML break tag.
|
||||||
|
|
||||||
|
This is another line.<br>
|
||||||
|
And another line after the break.
|
||||||
|
|
||||||
|
## Best Practices
|
||||||
|
|
||||||
|
### Don't Indent Paragraphs
|
||||||
|
|
||||||
|
Paragraphs should not be indented with spaces or tabs unless they are part of a list.
|
||||||
|
|
||||||
|
This is a correctly formatted paragraph without indentation.
|
||||||
|
|
||||||
|
This paragraph is incorrectly indented with spaces.
|
||||||
|
|
||||||
|
This paragraph is correctly formatted again.
|
||||||
|
|
||||||
|
### Blank Lines Between Paragraphs
|
||||||
|
|
||||||
|
Always use blank lines to separate paragraphs for compatibility.
|
||||||
|
|
||||||
|
This paragraph is correctly separated.
|
||||||
|
|
||||||
|
This paragraph is also correctly separated.
|
||||||
|
|
||||||
|
Without a blank line, this might not render as a separate paragraph.
|
||||||
|
This text might be treated as part of the previous paragraph.
|
||||||
|
|
||||||
|
## Multiple Line Breaks
|
||||||
|
|
||||||
|
Multiple line breaks within a paragraph can be created using trailing spaces or HTML breaks.
|
||||||
|
|
||||||
|
Line one.
|
||||||
|
Line two.
|
||||||
|
Line three.
|
||||||
|
|
||||||
|
Line one.<br>
|
||||||
|
Line two.<br>
|
||||||
|
Line three.
|
||||||
|
|
||||||
|
## Paragraphs with Formatting
|
||||||
|
|
||||||
|
Paragraphs can contain inline formatting like bold, italic, and code.
|
||||||
|
|
||||||
|
This paragraph contains **bold text** and *italic text* and `code text`.
|
||||||
|
|
||||||
|
This paragraph demonstrates that formatting works correctly within paragraph boundaries.
|
||||||
|
|
||||||
|
## Paragraphs with Links
|
||||||
|
|
||||||
|
Paragraphs can contain links and other inline elements.
|
||||||
|
|
||||||
|
This paragraph contains a [link to example.com](https://example.com) and another [reference link][ref].
|
||||||
|
|
||||||
|
[ref]: https://example.com
|
||||||
|
|
||||||
|
## Long Paragraphs
|
||||||
|
|
||||||
|
This paragraph contains a substantial amount of text to test how the markdown processor handles longer paragraphs. It includes multiple sentences that flow together naturally. The paragraph should render as a single cohesive block of text with appropriate line wrapping based on the container width. This tests that paragraph rendering works correctly even with extended content that might wrap across multiple visual lines in the rendered output.
|
||||||
|
|
||||||
|
## Paragraphs with Special Characters
|
||||||
|
|
||||||
|
Paragraphs can contain various special characters and punctuation marks.
|
||||||
|
|
||||||
|
This paragraph has numbers: 123, 456, 789.
|
||||||
|
|
||||||
|
This paragraph has symbols: !@#$%^&*().
|
||||||
|
|
||||||
|
This paragraph has quotes: "Hello" and 'World'.
|
||||||
|
|
||||||
|
This paragraph has parentheses (like this) and brackets [like this].
|
||||||
|
|
||||||
|
## Empty Paragraphs
|
||||||
|
|
||||||
|
An empty line creates a paragraph break, but multiple empty lines should still create a single paragraph break.
|
||||||
|
|
||||||
|
Paragraph before empty lines.
|
||||||
|
|
||||||
|
Paragraph after empty lines.
|
||||||
|
|
||||||
|
## Paragraphs with Code
|
||||||
|
|
||||||
|
Paragraphs can contain inline code and code blocks.
|
||||||
|
|
||||||
|
This paragraph contains `inline code` within the text flow.
|
||||||
|
|
||||||
|
This paragraph appears before a code block.
|
||||||
|
|
||||||
|
```
|
||||||
|
Code block here
|
||||||
|
```
|
||||||
|
|
||||||
|
This paragraph appears after a code block.
|
||||||
|
|
||||||
|
## Edge Cases
|
||||||
|
|
||||||
|
### Paragraph with Only Whitespace
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Paragraph with Trailing Spaces
|
||||||
|
|
||||||
|
This paragraph has trailing spaces.
|
||||||
|
|
||||||
|
### Very Short Paragraph
|
||||||
|
|
||||||
|
A.
|
||||||
|
|
||||||
|
### Paragraph with Only Special Characters
|
||||||
|
|
||||||
|
!@#$%^&*()
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Source:** [basic-paragraphs-line-breaks.md](https://github.com/dergigi/boris/tree/master/test/markdown/basic-paragraphs-line-breaks.md)
|
||||||
|
|
||||||
Reference in New Issue
Block a user