Documentation Source Text

Check-in [96334c601b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a bug in the back-links of the evidence display generator.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 96334c601b874c2b40954ec180c63b264ad96a54
User & Date: drh 2010-07-14 22:40:41
Context
2010-07-15
18:41
Fix typos in the wal.html document. check-in: ad5454b5e0 user: drh tags: trunk
2010-07-14
22:40
Fix a bug in the back-links of the evidence display generator. check-in: 96334c601b user: drh tags: trunk
18:39
Improved documentation of the IN and NOT IN operators. Push back the 3.7.0 release date to 2010-07-22. check-in: 07096801a3 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to format_evidence.tcl.

    96     96   # The input file is named $src.  The HTMLized output should be written
    97     97   # into $docdir/$dest.  The URL should be $dest with added fragment
    98     98   # information.  Evidence provided by input file $src can be found in
    99     99   # the evidence table with srccat=$srccat and srcfile=$srcfile.
   100    100   #
   101    101   proc htmlize_evidence {src srccat srcfile docdir dest} {
   102    102     htmlizer_start $src $docdir/$dest
          103  +  set up [regsub -all {[^/]+} [file dir $dest] ..]
   103    104     db eval {
   104    105        SELECT srcline, reqno, requirement.srcfile AS fn
   105    106          FROM evidence JOIN requirement USING(reqno)
   106    107         WHERE evidence.srcfile=$srcfile
   107    108           AND evidence.srccat=$srccat
   108    109         ORDER BY srcline
   109    110     } {
   110    111       htmlizer_xfer $srcline
   111    112       htmlizer_puts_raw "<a name=\"ln$srcline\"></a>"
   112    113       set line [htmlizer_gets]
   113    114       if {[regexp {^(.*)(R-\d\d\d[\d-]+)(.*$)} $line all pre link post]} {
   114    115          set pre [htmlizer_escape $pre]
   115    116          set post [htmlizer_escape $post]
   116         -       htmlizer_puts_raw "$pre<a href=\"../$fn#$reqno\">$link</a>$post\n"
          117  +       htmlizer_puts_raw "$pre<a href=\"$up/$fn#$reqno\">$link</a>$post\n"
   117    118       } else {
   118    119          htmlizer_puts $line
   119    120       }
   120    121     }
   121    122     htmlizer_finish
   122    123     db eval {
   123    124       UPDATE evidence SET url=$dest || '#ln' || srcline