Fossil SCM

better quoting to make intent clearer, thanks to [forum:/forumpost/cf724a9bea]

jkosche 2025-04-13 12:39 tkt-improvements
Commit 3e16be4e027be739428ceff4ef582b1811f859171656979e983e3a1245c37226
1 file changed +2 -2
+2 -2
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -521,18 +521,18 @@
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_\\.\]+\$
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
@ }
533
-@ set hashpattern ^\[0-9a-f\]+\$
533
+@ set hashpattern {^[0-9a-f]+$}
534534
@ if [regexp $hashpattern $foundin] {
535535
@ set pattern $foundin*
536536
@ query {SELECT count(*) AS match FROM blob WHERE uuid GLOB $pattern} {
537537
@ if {$match} {set versionlink "/info/$urlfoundin"}
538538
@ }
539539
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -521,18 +521,18 @@
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 @ }
533 @ set hashpattern ^\[0-9a-f\]+\$
534 @ if [regexp $hashpattern $foundin] {
535 @ set pattern $foundin*
536 @ query {SELECT count(*) AS match FROM blob WHERE uuid GLOB $pattern} {
537 @ if {$match} {set versionlink "/info/$urlfoundin"}
538 @ }
539
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -521,18 +521,18 @@
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 @ }
533 @ set hashpattern {^[0-9a-f]+$}
534 @ if [regexp $hashpattern $foundin] {
535 @ set pattern $foundin*
536 @ query {SELECT count(*) AS match FROM blob WHERE uuid GLOB $pattern} {
537 @ if {$match} {set versionlink "/info/$urlfoundin"}
538 @ }
539

Keyboard Shortcuts

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