docsifyjs / docsify

šŸƒ A magical documentation site generator.
https://docsify.js.org
MIT License
27.78k stars 5.68k forks source link

code block is broken by list #2100

Closed LiJohnson closed 1 year ago

LiJohnson commented 1 year ago

Bug Report

a list item with code block and code block has a blank line codesandbox

Steps to reproduce

here is markdown code

image

console.log(a +b)



#### What is current behaviour

<img width="591" alt="image" src="https://github.com/docsifyjs/docsify/assets/2616788/b41f4384-f68c-42f0-ab03-57c90a6580f4">

#### What is the expected behaviour

#### Other relevant information

<!-- (Update "[ ]" to "[x]" to check a box) -->
- [ ] Bug does still occur when all/other plugins are disabled?

- Your OS: 
- Node.js version: 
- npm/yarn version: 
- Browser version: 
- Docsify version: 
- Docsify plugins: 

<!-- Love docsify? Please consider supporting our collective:
šŸ‘‰  https://opencollective.com/docsify/donate -->

#### Please create a reproducible sandbox 

[![Edit 307qqv236](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/307qqv236)

#### Mention the docsify version in which this bug was not present (if any)
sy-records commented 1 year ago

use

- list 1

```js
let a = 1;
let b = 2;
console.log(a + b);
let a = 1;
let b = 2;
// blank line

console.log(a + b);
LiJohnson commented 1 year ago

use

- list 1

```js
let a = 1;
let b = 2;
console.log(a + b);
  • list 2
let a = 1;
let b = 2;
// blank line

console.log(a + b);

if leave a blank line alter list item, code block will not intdent . preview here image