Bug: Two lines around Code Fences.
See original GitHub issueDescribe the Bug
Will add two lines around Code Fences.
How to Reproduce
Steps to reproduce the behavior:
- Enable Empty Line Around Code Fences
- Enable Consecutive blank lines
Expected Behavior
A clear and concise description of what you expected to happen.
Expected output if applicable:
The formatted result:
``` markdown
1. 修改 php.ini
```
upload_max_filesize = 20M
post_max_size = 20M
```
2. 修改 Nginx 配置文件
```
client_max_body_size 20m; # 文件最大大小
```
1111
```
int a = 0;
```
2222
```
The code block not in the list is correct, it is around with a blank line. The code block in the list will be around two blank lines. I think the code block around with one line is correct.
Device
- Desktop
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Inline code blocks in code fence mode - bug - Discourse Meta
In 4SI mode, the </> button has two very different behaviors, one where you select just part of a line (Example 1), and...
Read more >A problem with backtick code fences - #20 by pothibo - Spec
this I think is a clear bug — shouldn't a line starting with 3 backticks parse either as inline code or code block?!...
Read more >Code fences that don't specify language have abnormal line ...
I have some code fences where I just have plaintext, so I leave them as just 3 backticks without a language suffix.
Read more >Sometimes diff isn't shown in edits to code inside source fences
It seems the visual highlight of revision/code differences in source fences is currently broken for some posts in the suggested edits review ...
Read more >Off-by-one error - Wikipedia
An off-by-one error or off-by-one bug is a logic error involving the discrete equivalent of a boundary condition. It often occurs in computer...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should be taken care of now. It will be pushed out with the next release. If you would like, you may go ahead and use the master version of the plugin before then.
Please let us know if the issue persists either on master or in the next release.
Looks like I have a fix for the bug. The issue is that it was trying to match the whitespace of it with that of the previous line which is technically how it was written, but I see that that is not really necessary, so I have gone ahead and removed that part of the logic. This should take care of the problem and will hopefully not create any others.