mirror of
https://github.com/marktext/marktext.git
synced 2025-05-03 21:03:35 +08:00
fix: do not show language picker in code block
This commit is contained in:
parent
d127c3f4cb
commit
49cab6dc11
@ -16,7 +16,7 @@ const checkEditLanguage = (paragraph, selectionState) => {
|
||||
const text = paragraph.textContent
|
||||
const { start } = selectionState
|
||||
const token = text.match(/(^`{3,})([^`]+)/)
|
||||
if (paragraph.tagName !== 'SPAN') return false
|
||||
if (paragraph.tagName !== 'SPAN' || paragraph.classList.contains('ag-code-line')) return false
|
||||
if (token) {
|
||||
const len = token[1].length
|
||||
const lang = token[2].trim()
|
||||
|
Loading…
Reference in New Issue
Block a user