코드 블록 줄번호 기본 숨김
This commit is contained in:
@@ -170,7 +170,7 @@ const createBlock = (type = 'paragraph', text = '', level = null, id = '', optio
|
||||
calloutBackground: options.calloutBackground || 'blue',
|
||||
quoteBackground: options.quoteBackground || 'gray',
|
||||
codeLanguage: options.codeLanguage || '',
|
||||
codeShowLineNumbers: options.codeShowLineNumbers !== false
|
||||
codeShowLineNumbers: options.codeShowLineNumbers === true
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -723,7 +723,7 @@ const parseMarkdownBlocks = (markdown) => {
|
||||
|
||||
if (trimmedLine.startsWith('```')) {
|
||||
const startLine = index
|
||||
const fenceOptions = parseCodeFenceLine(trimmedLine) || { language: '', showLineNumbers: true }
|
||||
const fenceOptions = parseCodeFenceLine(trimmedLine) || { language: '', showLineNumbers: false }
|
||||
const codeLines = []
|
||||
index += 1
|
||||
|
||||
@@ -1868,7 +1868,7 @@ const applyParagraphShortcutSplit = (block, before, after) => {
|
||||
}
|
||||
|
||||
if (/^```[A-Za-z0-9_-]*$/.test(head)) {
|
||||
const opener = head === '```' ? buildCodeFenceOpener({ language: '', showLineNumbers: true }) : head
|
||||
const opener = head === '```' ? buildCodeFenceOpener({ language: '', showLineNumbers: false }) : head
|
||||
|
||||
pendingFocusLine.value = block.meta.startLine + 1
|
||||
pendingFocusPosition.value = 'start'
|
||||
|
||||
Reference in New Issue
Block a user