Describe the bug
dprint-plugin-markdown version: 0.20.0
Input Code
In PowerShell, special characters are escaped using backticks:
- New line: `` `n ``
...
- Backtick: ` `` ` or ``` `` ```
Expected Output
In PowerShell, special characters are escaped using backticks:
- New line: `` `n ``
...
- Backtick: ` `` ` or ` `` `
Actual Output
In PowerShell, special characters are escaped using backticks:
- New line: `` `n ``
...
- Backtick: `` `` `` or `` `` ``
Discussion
The minimal number of backticks required to enclose the code block is the next available integer number of backticks.
For example, if the content of the code block is
Start from 1, it searches for the next number of consecutive backticks that the code block does not contain, which is 3 in this case. Therefore, 3 backticks are required to enclose this code block.
In the PowerShell example, only 1 backtick is required because there are no lone backtick within the code block.
Describe the bug
dprint-plugin-markdown version: 0.20.0
Input Code
Expected Output
Actual Output
Discussion
The minimal number of backticks required to enclose the code block is the next available integer number of backticks.
For example, if the content of the code block is
Start from 1, it searches for the next number of consecutive backticks that the code block does not contain, which is 3 in this case. Therefore, 3 backticks are required to enclose this code block.
In the PowerShell example, only 1 backtick is required because there are no lone backtick within the code block.