Skip to content

Commit

Permalink
v0.9.42
Browse files Browse the repository at this point in the history
  • Loading branch information
aplsimple committed Aug 6, 2022
1 parent 2cac1dc commit 418a0a6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 4 additions & 2 deletions hl_tcl.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# License: MIT.
###########################################################

package provide hl_tcl 0.9.41
package provide hl_tcl 0.9.42

# ______________________ Common data ____________________ #

Expand Down Expand Up @@ -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) {\})\]\"}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkgIndex.tcl
Original file line number Diff line number Diff line change
@@ -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)

Expand Down

0 comments on commit 418a0a6

Please sign in to comment.