수정 모드 줄바꿈 표식 개선

This commit is contained in:
2026-05-14 17:09:10 +09:00
parent 849e86802f
commit 62e501f8d0
9 changed files with 28 additions and 11 deletions

View File

@@ -129,14 +129,14 @@ const isMarkdownBlockStart = (line) => {
* @param {string} line - 마크다운 행
* @returns {boolean} hard break 여부
*/
const hasMarkdownHardBreak = (line) => / {2,}$/.test(line)
const hasMarkdownHardBreak = (line) => /( {2,}|\\)$/.test(line)
/**
* 문단 행에서 hard break 표식을 제거한다.
* @param {string} line - 마크다운 행
* @returns {string} 정리된 문단 행
*/
const cleanParagraphLine = (line) => line.replace(/ {2,}$/, '').trim()
const cleanParagraphLine = (line) => line.replace(/( {2,}|\\)$/, '').trim()
/**
* 빈 줄 공백 블록 높이를 반환한다.
@@ -647,7 +647,7 @@ const showNextImage = () => {
class="content-markdown-renderer__code my-6 overflow-x-auto rounded bg-[#15171a] px-4 py-3 text-sm leading-6 text-white"
><code>{{ block.text }}</code></pre>
<hr v-else-if="block.type === 'divider'" class="content-markdown-renderer__divider my-10 border-line">
<p v-else class="content-markdown-renderer__paragraph mb-2.5 text-[15px] leading-8 text-[var(--site-text)] last:mb-0">
<p v-else class="content-markdown-renderer__paragraph mb-2.5 text-[15px] leading-4 text-[var(--site-text)] last:mb-0">
<template v-for="(lineSegments, lineIndex) in parseInlineSegmentLines(block.text)" :key="`${block.id}-paragraph-line-${lineIndex}`">
<br v-if="lineIndex > 0">
<template v-for="(segment, segmentIndex) in lineSegments" :key="`${block.id}-paragraph-${lineIndex}-${segmentIndex}`">