-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix removal of temporary div for headings forwarding
Issue-50: #50
- Loading branch information
Showing
3 changed files
with
48 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"""Tests for headings.""" | ||
|
||
from __future__ import annotations | ||
|
||
from textwrap import dedent | ||
from typing import TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
from markdown import Markdown | ||
|
||
|
||
def test_headings_removal(md: Markdown) -> None: | ||
"""Headings should leave no trace behind. | ||
Parameters: | ||
md: A Markdown instance (fixture). | ||
""" | ||
html = md.convert( | ||
dedent( | ||
""" | ||
=== "File layout" | ||
```tree | ||
./ | ||
hello.md | ||
``` | ||
""", | ||
), | ||
) | ||
assert 'class="markdown-exec"' not in html |