-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Highlight strikethrough text in headings
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
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,41 @@ | ||
Before: | ||
let g:vim_markdown_strikethrough = 1 | ||
syn off | syn on | ||
|
||
After: | ||
unlet! g:vim_markdown_strikethrough | ||
|
||
Given markdown; | ||
a ~~b~~ c | ||
|
||
Execute (strikethrough): | ||
AssertNotEqual SyntaxOf('a'), 'mkdStrike' | ||
AssertEqual SyntaxOf('b'), 'mkdStrike' | ||
AssertNotEqual SyntaxOf('c'), 'mkdStrike' | ||
|
||
Given markdown; | ||
# ~~h1~~ | ||
## ~~h2~~ | ||
### ~~h3~~ | ||
#### ~~h4~~ | ||
##### ~~h5~~ | ||
###### ~~h6~~ | ||
|
||
Execute (strikethrough in atx headings): | ||
AssertEqual SyntaxOf('h1'), 'mkdStrike' | ||
AssertEqual SyntaxOf('h2'), 'mkdStrike' | ||
AssertEqual SyntaxOf('h3'), 'mkdStrike' | ||
AssertEqual SyntaxOf('h4'), 'mkdStrike' | ||
AssertEqual SyntaxOf('h5'), 'mkdStrike' | ||
AssertEqual SyntaxOf('h6'), 'mkdStrike' | ||
|
||
Given markdown; | ||
~~h1~~ | ||
= | ||
|
||
~~h2~~ | ||
- | ||
|
||
Execute (strikethrough in setext headings): | ||
AssertEqual SyntaxOf('h1'), 'mkdStrike' | ||
AssertEqual SyntaxOf('h2'), 'mkdStrike' |