Fossil SCM

better regexp to match the hyphen, thanks to [forum:/forumpost/81529972df]

jkosche 2025-04-13 12:15 tkt-improvements
Commit ac848122fa4ee1a70a69c7d8d4bdd4235d401f18a6c431941c925143438debbd
1 file changed +1 -1
+1 -1
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -521,11 +521,11 @@
521521
@ <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td>
522522
@ <td colspan="3" valign="top" class="tktDspValue">
523523
@ <th1>
524524
@ set versionlink ""
525525
@ set urlfoundin [httpize $foundin]
526
-@ set tagpattern ^\[0-9A-Za-z_\\.\\x2d\]+\$
526
+@ set tagpattern ^\[-0-9A-Za-z_\\.\]+\$
527527
@ if [regexp $tagpattern $foundin] {
528528
@ query {SELECT count(*) AS match FROM tag
529529
@ WHERE tagname=concat('sym-',$foundin)} {
530530
@ if {$match} {set versionlink "/timeline?t=$urlfoundin"}
531531
@ }
532532
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -521,11 +521,11 @@
521 @ <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td>
522 @ <td colspan="3" valign="top" class="tktDspValue">
523 @ <th1>
524 @ set versionlink ""
525 @ set urlfoundin [httpize $foundin]
526 @ set tagpattern ^\[0-9A-Za-z_\\.\\x2d\]+\$
527 @ if [regexp $tagpattern $foundin] {
528 @ query {SELECT count(*) AS match FROM tag
529 @ WHERE tagname=concat('sym-',$foundin)} {
530 @ if {$match} {set versionlink "/timeline?t=$urlfoundin"}
531 @ }
532
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -521,11 +521,11 @@
521 @ <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td>
522 @ <td colspan="3" valign="top" class="tktDspValue">
523 @ <th1>
524 @ set versionlink ""
525 @ set urlfoundin [httpize $foundin]
526 @ set tagpattern ^\[-0-9A-Za-z_\\.\]+\$
527 @ if [regexp $tagpattern $foundin] {
528 @ query {SELECT count(*) AS match FROM tag
529 @ WHERE tagname=concat('sym-',$foundin)} {
530 @ if {$match} {set versionlink "/timeline?t=$urlfoundin"}
531 @ }
532

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button