Ignore:
Timestamp:
Jun 10, 2014, 10:23:10 PM (6 years ago)
Author:
cal@…
Message:

guide: new, more macports-y layout to replace the somewhat oldstyle layout of the guide

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc-new/toc-for-chunked.tcl

    r38440 r120885  
    77regexp {<div class="toc">.+?</div>} [read $file] replacement
    88close $file
    9 set replacement "<body>$replacement<div class=\"book\">"
     9set replacement "<body\\1><div class=\"book\">$replacement"
    1010
    1111# Add the table of contents to all other html files.
    1212foreach path [glob -directory [lindex $argv 0] {*.html}] {
    13     if {$path == "index.html"} {
     13    if {[file tail $path] == "index.html"} {
    1414        continue
    1515    }
     
    1717    set file [open $path r+]
    1818    set data [read $file]
    19     regsub {<body>} $data $replacement data
     19    regsub {<body([^>]+)>} $data $replacement data
    2020    regsub {</body>} $data {</div></body>} data
    2121    seek $file 0
Note: See TracChangeset for help on using the changeset viewer.