-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug: handle hash sign inside code blocks
fixes #2
- Loading branch information
Showing
5 changed files
with
98 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Title | ||
An example document with code blocks containing `#` characters to verify these are not included as TOC items. | ||
|
||
## Heading 1 | ||
|
||
``` | ||
## plaintext | ||
### lines | ||
``` | ||
|
||
## Heading 2 | ||
|
||
```sh | ||
## shell | ||
### lines | ||
#### with | ||
##### comments | ||
echo "skip this" | ||
``` | ||
|
||
## Heading 3 | ||
|
||
```python | ||
## python | ||
### lines | ||
#### with | ||
##### comments | ||
|
||
if __name__ == '__main__': | ||
print('skip this') | ||
``` | ||
|
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,37 @@ | ||
# Title | ||
An example document with code blocks containing `#` characters to verify these are not included as TOC items. | ||
|
||
<!---mdtoc begin---> | ||
* [Heading 1](#heading-1) | ||
* [Heading 2](#heading-2) | ||
* [Heading 3](#heading-3) | ||
<!---mdtoc end---> | ||
## Heading 1 | ||
|
||
``` | ||
## plaintext | ||
### lines | ||
``` | ||
|
||
## Heading 2 | ||
|
||
```sh | ||
## shell | ||
### lines | ||
#### with | ||
##### comments | ||
echo "skip this" | ||
``` | ||
|
||
## Heading 3 | ||
|
||
```python | ||
## python | ||
### lines | ||
#### with | ||
##### comments | ||
|
||
if __name__ == '__main__': | ||
print('skip this') | ||
``` | ||
|
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