Добавил отображение цитат.

This commit is contained in:
2026-04-08 19:55:34 +03:00
parent 4a967c6b6c
commit 6b21f83d03
4 changed files with 23 additions and 3 deletions

1
.gitignore vendored
View File

@@ -8,3 +8,4 @@ debian/*.tmp
debian/errors debian/errors
*.tmp *.tmp
errors errors
test.tcl

7
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
projman (2.0.0-beta6) stable; urgency=medium
* Добавил обновление информации в просмотрщике MD при сохранении открытого в редакторе файла.
-- Sergey Kalinin <svk@nuk-svk.ru> Wed, 8 Apr 2026 18:17:24 +0300
projman (2.0.0-beta6) stable; urgency=medium projman (2.0.0-beta6) stable; urgency=medium
* Новая сборка * Новая сборка
@@ -553,3 +559,4 @@ projman (2.0.0-alfa0) stable; urgency=medium

View File

@@ -64,6 +64,7 @@ proc ShowMD {fileFullPath {reload "false"}} {
$txt tag configure bold -font $cfgVariables(boldFont) $txt tag configure bold -font $cfgVariables(boldFont)
$txt tag configure italicBold -font $cfgVariables(italicBoldFont) $txt tag configure italicBold -font $cfgVariables(italicBoldFont)
$txt tag configure link -foreground $cfgVariables(linkFG) -font $cfgVariables(linkFont) $txt tag configure link -foreground $cfgVariables(linkFG) -font $cfgVariables(linkFont)
$txt tag configure quote -background $cfgVariables(codeBlockBG)
} else { } else {
set txt .viewer.frmHelp.txt set txt .viewer.frmHelp.txt
$txt delete 0.0 end $txt delete 0.0 end
@@ -106,6 +107,13 @@ proc ShowMD {fileFullPath {reload "false"}} {
ProcessLineWithURL $line $txt $result ProcessLineWithURL $line $txt $result
} elseif {$textTag eq "markable"} { } elseif {$textTag eq "markable"} {
ProcessLineWithMark $line $txt $result ProcessLineWithMark $line $txt $result
} elseif {$textTag eq "quote"} {
set symList [split [lindex $result 2] ">"]
for {set i 1} { $i < [llength $symList]} {incr i} {
$txt insert end " " quote
$txt insert end " "
}
$txt insert end [lindex $result 1]\n
} else { } else {
$txt insert end "[lindex $result 1]\n" $textTag $txt insert end "[lindex $result 1]\n" $textTag
} }
@@ -303,6 +311,11 @@ proc MarkDownParser {line} {
set result [ExtractURL $line {\[([^\]]+)\]\(([^)]+)\)}] set result [ExtractURL $line {\[([^\]]+)\]\(([^)]+)\)}]
return [list link $result] return [list link $result]
} }
# Quoted text
if [regexp -nocase -line -- {(^>(?:>|\s)*)(.*)$} $line match v1 v2] {
puts "Quoted text $match"
return [list quote $v2 $v1]
}
return [list {} $line] return [list {} $line]
@@ -385,4 +398,3 @@ proc ExtractBlocks {line pattern} {
} }
return $result return $result
} }

View File

@@ -10,7 +10,7 @@ exec wish8.6 "$0" -- "$@"
###################################################### ######################################################
# Version: 2.0.0 # Version: 2.0.0
# Release: beta6 # Release: beta6
# Build: 08042026165056 # Build: 08042026181732
###################################################### ######################################################
# определим текущую версию, релиз и т.д. # определим текущую версию, релиз и т.д.