Page: CORNER CASE TESTS

1. Nested Lists (Unordered and Ordered)

Markdown allows for nested lists, but formatting errors can occur if indentation isn't consistent.

Issue to Check:

Make sure to use consistent indentation. Improper nesting might break the list rendering.


2. List Mixed with Code Blocks

Lists and code blocks can conflict if the indentation is not handled correctly.\ - List item 1\

Some code here

Issue to Check:

Ensure the code block is properly indented to avoid being interpreted as part of the list. You may need extra spaces before the backticks.


3. Multiple Consecutive Blockquotes

Markdown supports blockquotes, but multiple blockquotes in succession can sometimes cause layout issues if the renderer isn’t handling them properly.

First blockquote

Second blockquote

Third blockquote

Issue to Check:

Check if the blockquotes display as separate sections or get combined into one block. Some renderers may not support multiple consecutive blockquotes.


4. Strikethrough with Links or Images

Sometimes, combining strikethrough with links or images can cause rendering issues.

This is a ~~link~~ with strikethrough. Image with strikethrough

Issue to Check:

Ensure the combination of strikethrough and links/images is displayed correctly. Some Markdown processors might not handle this well.


5. Inline Code Inside Blockquote

Inline code inside blockquotes can sometimes cause confusion with formatting.

This is a blockquote with inline code.

Issue to Check:

Verify that the inline code (code) inside the blockquote displays as expected and does not interfere with the blockquote formatting.


6. Escaping Special Characters

Certain characters have special meaning in Markdown, such as #, *, _, and []. If you need to display them literally, you must escape them.

# This is a header symbol, not a header. * This is an asterisk, not a list marker. _ This is an underscore, not italic.

Issue to Check:

Ensure the characters are correctly displayed as plain text and not interpreted by the Markdown processor.


7. Trailing Commas in Lists or Tables

Trailing commas in lists or tables might be incorrectly handled or cause misalignment.

or

| Header 1 | Header 2 | |----------|----------| | Data 1 | Data 2 | | Data 3 | Data 4 | | Data 5 | Data 6 |

Issue to Check:

Check if the trailing commas or extra table rows are correctly handled by the renderer.


8. Broken Links

Links that are broken or lead to 404 pages should be tested to see how they are displayed.

This is a broken link

Issue to Check:

Ensure that broken links are either displayed as regular links with an error message or highlighted as a warning in the Markdown rendering.


9. Complex Tables with Mismatched Column Numbers

Tables with mismatched columns can cause misalignment or rendering issues.

| Header 1 | Header 2 | |----------|----------| | Data 1 | Data 2 | | Data 3 |

Issue to Check:

Test if the Markdown processor handles mismatched column numbers and whether the table is displayed correctly or broken.


10. Mixing Inline and Block-Level Elements

Inline elements (e.g., *italic*, **bold**) and block-level elements (e.g., paragraphs, lists) can sometimes conflict if they are mixed improperly.

Issue to Check:

Ensure that inline elements are properly nested within block-level elements and don’t break the formatting.


11. HTML in Markdown

Markdown allows HTML, but some Markdown parsers may have issues rendering raw HTML in certain contexts.

<p>This is a paragraph in HTML</p> <div>This is a div</div>

Issue to Check:

Check if raw HTML elements are properly parsed and displayed, or if they cause issues with the layout.


12. Empty Lists

Empty lists with no list items can sometimes render as empty or incorrectly.

Issue to Check:

Ensure that the list renders as an empty list and does not cause unwanted whitespace or errors.


13. Line Breaks and Newlines

Different Markdown processors treat line breaks and newlines differently. A single line break may not always create a new paragraph.

This is a sentence
This is the next line.

Issue to Check:

Make sure the line break is recognized, and the text moves to a new line. Check if a double line break is required for a paragraph.


14. Emoji Rendering in Different Markdown Processors

Not all Markdown processors may render emojis consistently, especially if the platform doesn’t support them.

Hello, world! 🌍🚀

Issue to Check:

Test whether emojis are rendered correctly across different platforms or Markdown renderers.


15. Large Code Blocks with Long Lines

Code blocks that are too wide may break the layout, especially on smaller screens.

```python

def reallylongfunctionnamethatexceedsthewidthofthescreen(): print("This is a very long line of code")

```

Issue to Check:

Ensure the code block wraps properly or is scrollable horizontally.


16. Multiple Links with Same Text

Multiple links with the same anchor text can cause confusion or unwanted formatting.

Google Google

Issue to Check:

Check how multiple links with the same anchor text are handled and whether they cause any layout issues.


17. Handling Non-Breaking Spaces

In some cases, non-breaking spaces (&nbsp;) are needed but may not render properly in all Markdown processors.

This is a non-breaking space.

Issue to Check:

Ensure that non-breaking spaces render correctly, especially in HTML contexts.


18. Link References with Special Characters

If a link reference contains special characters, it may not render correctly.

Link

Issue to Check:

Verify that links with special characters are correctly encoded and rendered.


By testing these edge cases and corner cases in your Markdown documents, you can ensure that they are robust, compatible across platforms, and that they render as expected in various Markdown viewers and processors.

Edit