diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dcb53a..1ba8732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Last changes: +Version `0.9.42 (4 Aug'22)` + + - CHANGE: RE for TODO comments is a variable + + Version `0.9.41 (27 May'22)` - NEW : hl_commands to list all Tcl/Tk commands registered here diff --git a/hl_tcl.tcl b/hl_tcl.tcl index b409537..10e918d 100755 --- a/hl_tcl.tcl +++ b/hl_tcl.tcl @@ -6,7 +6,7 @@ # License: MIT. ########################################################### -package provide hl_tcl 0.9.41 +package provide hl_tcl 0.9.42 # ______________________ Common data ____________________ # @@ -77,6 +77,7 @@ namespace eval ::hl_tcl { set data(RE0) {(^|[\{\}\[;]+)\s*([:\w*]+)(\s|\]|\}|\\|$|;){0}} ;# test: pwd;pwd;pwd set data(RE1) {([\{\}\[;])+\s*([:\w*]+)(\s|\]|\}|\\|$)} set data(RE5) {(^|[^\\])(\[|\]|\$|\{|\})} + set data(RETODO) {^\s*#\s*(!|TODO)} set data(LBR) {\{(\[\"} set data(RBR) {\})\]\"} @@ -332,8 +333,9 @@ proc ::hl_tcl::my::HighlightComment {txt line ln k} { # ln - line's number # k - comment's starting position in line + variable data set stcom [string range $line $k end] - if {[regexp {^\s*#\s*(!|TODO)} $stcom]} { + if {[regexp $data(RETODO) $stcom]} { $txt tag add tagCMN2 $ln.$k $ln.end ;# "!" and TODO comments } else { $txt tag add tagCMN $ln.$k $ln.end diff --git a/pkgIndex.tcl b/pkgIndex.tcl index 4964171..e04c898 100644 --- a/pkgIndex.tcl +++ b/pkgIndex.tcl @@ -1,5 +1,5 @@ -package ifneeded hl_tcl 0.9.41 [list source [file join $dir hl_tcl.tcl]] +package ifneeded hl_tcl 0.9.42 [list source [file join $dir hl_tcl.tcl]] # short intro (for Ruff! docs generator)