imzbf / md-editor-v3

Markdown editor for vue3, developed in jsx and typescript, dark theme、beautify content by prettier、render articles directly、paste or clip the picture and upload it...
https://imzbf.github.io/md-editor-v3
MIT License
1.63k stars 156 forks source link

代码块未知原因不显示 #570

Closed Msg-Lbo closed 4 months ago

Msg-Lbo commented 4 months ago

描述这个Bug

描述:

在使用代码块时,粘贴了一段json代码,导致了代码块不显示(收缩),经过尝试,部分地方代码结尾使用回车就会触发这个bug.

bug文本:

{ "version": 1.1, "atDirectives": [ { "name": "@tailwind", "description": "Use the @tailwind directive to insert Tailwind's base, components, utilities and screens styles into your CSS.", "references": [ { "name": "Tailwind Documentation", "url": "https://tailwindcss.com/docs/functions-and-directives#tailwind" } ] }, { "name": "@apply", "description": "Use the @apply directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.", "references": [ { "name": "Tailwind Documentation", "url": "https://tailwindcss.com/docs/functions-and-directives#apply" } ] }, { "name": "@responsive", "description": "You can generate responsive variants of your own classes by wrapping their definitions in the @responsive directive:\ncss\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n\n", "references": [ { "name": "Tailwind Documentation", "url": "https://tailwindcss.com/docs/functions-and-directives#responsive" } ] }, { "name": "@screen", "description": "The @screen directive allows you to create media queries that reference your breakpoints by name instead of duplicating their values in your own CSS:\ncss\n@screen sm {\n /* ... */\n}\n\n…gets transformed into this:\ncss\n@media (min-width: 640px) {\n /* ... */\n}\n\n", "references": [ { "name": "Tailwind Documentation", "url": "https://tailwindcss.com/docs/functions-and-directives#screen" } ] }, { "name": "@variants", "description": "Generate hover, focus, active and other variants of your own utilities by wrapping their definitions in the @variants directive:\ncss\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n\n", "references": [ { "name": "Tailwind Documentation", "url": "https://tailwindcss.com/docs/functions-and-directives#variants" } ] } ] }

版本号

"md-editor-v3": "^4.16.7",

问题重现链接

No response

imzbf commented 4 months ago

默认超过30行代码就会折叠,如果你不喜欢折叠代码的功能,可以通过相应的文档关闭这个功能:https://imzbf.github.io/md-editor-v3/zh-CN/docs#%F0%9F%95%B9%20codeFoldable