-
-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tilde, backtick in fenced code info string
Related to mdx-js/mdx#630. Closes GH-421. Closes GH-422. Reviewed-by: Marouane Fazouane <fazouanem3@gmail.com> Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com> Reviewed-by: John Otander <johnotander@gmail.com>
- Loading branch information
Showing
5 changed files
with
933 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
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,28 @@ | ||
If the info string comes after a backtick fence, it may not contain any backtick | ||
characters. | ||
The reason for this restriction is that otherwise some inline code would be | ||
incorrectly interpreted as the beginning of a fenced code block. | ||
|
||
Tildes in info strings are fine: | ||
|
||
```js filename=~/.bashrc | ||
console.log(1) | ||
``` | ||
|
||
Tildes in info strings are fine after tilde fences: | ||
|
||
~~~js filename=~/.bashrc | ||
console.log(1) | ||
~~~ | ||
|
||
Backticks in info strings are fine after tilde fences: | ||
|
||
~~~js title=`.bashrc` | ||
console.log(1) | ||
~~~ | ||
|
||
Backticks in info strings are **not** fine after backtick fences: | ||
|
||
```js title=`.bashrc` | ||
console.log(1) | ||
``` |
Oops, something went wrong.