v1.4.1: 관리자 미디어 업로드 한도·라이브 에디터 UX 개선
종류별 업로드 크기 한도와 413 안내를 추가하고, 임베드·미디어 라이브 프리뷰·제목 Enter 포커스·스크롤 동작을 보정한다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -37,6 +37,13 @@ const findFencedBlockEnd = (lines, startLine) => {
|
||||
return -1
|
||||
}
|
||||
|
||||
/**
|
||||
* 단독 URL 줄인지 확인한다.
|
||||
* @param {string} line - 마크다운 줄
|
||||
* @returns {boolean} 단독 URL 여부
|
||||
*/
|
||||
const isStandaloneUrlLine = (line) => /^https?:\/\/\S+$/i.test(String(line || '').trim())
|
||||
|
||||
/**
|
||||
* 갤러리 fenced 블록을 파싱한다.
|
||||
* @param {string[]} lines - 본문 줄 목록
|
||||
@@ -74,6 +81,17 @@ const resolveGalleryBlock = (lines, currentLine) => {
|
||||
* @returns {{ kind: 'embed', startLine: number, endLine: number, url: string }|null}
|
||||
*/
|
||||
const resolveEmbedBlock = (lines, currentLine) => {
|
||||
const standaloneUrl = String(lines[currentLine] || '').trim()
|
||||
|
||||
if (isStandaloneUrlLine(standaloneUrl)) {
|
||||
return {
|
||||
kind: 'embed',
|
||||
startLine: currentLine,
|
||||
endLine: currentLine,
|
||||
url: standaloneUrl
|
||||
}
|
||||
}
|
||||
|
||||
const embedStart = findFencedBlockStart(lines, currentLine, ':::embed')
|
||||
|
||||
if (embedStart === -1) {
|
||||
|
||||
Reference in New Issue
Block a user