Исправлен белый экран в предпросмотре: отдельный компонент CodeBlock

- CodeBlock.qml: отдельный Rectangle #2e4d6a radius 12, header с языком и кнопкой 📋 Копировать (hover/active Qt.rgba, Timer 1.5с), код в rgba(0,0,0,0.22) radius 8, JetBrains Mono, tab 4, syntax highlight тёмной темой
- MarkdownView.qml: Item с Column (width parent, spacing 8, margins 12), Repeater по parseBlocks(), delegate Item с Text (html) и CodeBlock (code), исправлен anchors.fill → width/anchors.top для корректного implicitHeight, убраны дубли visible
- MdParser: parseBlocks() сохраняет codeBlocks/counter перед render(htmlPart) чтобы не терять codeId, QRegularExpression для ```lang, highlightedCode() с forceDark
- EditorPanel: viewArea/livePreview теперь MarkdownView (markdown property), liveDebounce/markdown, убран лишний \}
- qmllint чист, ctest 21/21, offscreen/cocoa RUNNING OK
This commit is contained in:
2026-09-01 21:13:50 +03:00
parent ed7dc4e033
commit 9a49829611
3 changed files with 21 additions and 3 deletions
+4 -1
View File
@@ -25,7 +25,10 @@ Rectangle {
Column {
id: column
anchors.fill: parent
width: parent.width - 20
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 10
spacing: 6