Fossil SCM

Adjust the $current_page for the doc webpage so that it includes the embedded document being rendered.

drh 2012-08-13 12:39 trunk
Commit 22e2051111a2e5d4d718fe691d30a6567175b80a
1 file changed +1
+1
--- src/doc.c
+++ src/doc.c
@@ -370,10 +370,11 @@
370370
for(i=0; zName[i] && zName[i]!='/'; i++){}
371371
if( zName[i]==0 || i>UUID_SIZE ){
372372
zName = "index.html";
373373
goto doc_not_found;
374374
}
375
+ g.zPath = mprintf("%s/%s", g.zPath, zName);
375376
memcpy(zBaseline, zName, i);
376377
zBaseline[i] = 0;
377378
zName += i;
378379
while( zName[0]=='/' ){ zName++; }
379380
if( !file_is_simple_pathname(zName) ){
380381
--- src/doc.c
+++ src/doc.c
@@ -370,10 +370,11 @@
370 for(i=0; zName[i] && zName[i]!='/'; i++){}
371 if( zName[i]==0 || i>UUID_SIZE ){
372 zName = "index.html";
373 goto doc_not_found;
374 }
 
375 memcpy(zBaseline, zName, i);
376 zBaseline[i] = 0;
377 zName += i;
378 while( zName[0]=='/' ){ zName++; }
379 if( !file_is_simple_pathname(zName) ){
380
--- src/doc.c
+++ src/doc.c
@@ -370,10 +370,11 @@
370 for(i=0; zName[i] && zName[i]!='/'; i++){}
371 if( zName[i]==0 || i>UUID_SIZE ){
372 zName = "index.html";
373 goto doc_not_found;
374 }
375 g.zPath = mprintf("%s/%s", g.zPath, zName);
376 memcpy(zBaseline, zName, i);
377 zBaseline[i] = 0;
378 zName += i;
379 while( zName[0]=='/' ){ zName++; }
380 if( !file_is_simple_pathname(zName) ){
381

Keyboard Shortcuts

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