코드 블록 줄번호 기본 숨김

This commit is contained in:
2026-06-26 15:51:46 +09:00
parent 8e3bf4a874
commit b7362df274
11 changed files with 39 additions and 18 deletions

View File

@@ -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'