Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | If embedded wiki documentation begins with <title>...</title> then use the text within the markup as the title of the document. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
f88e2e7a131d4aa0bf20ced6597b326f |
| User & Date: | drh 2009-06-07 17:27:45.000 |
Context
|
2009-06-07
| ||
| 17:45 | Add the logo to the repository. Make the logo appear on the homepage. ... (check-in: 5882d97495 user: drh tags: trunk) | |
| 17:27 | If embedded wiki documentation begins with <title>...</title> then use the text within the markup as the title of the document. ... (check-in: f88e2e7a13 user: drh tags: trunk) | |
| 17:05 | Update the SQLite implementation to the latest as of the time of this comment (SQLite CVS version 6726). This fixes an alignment problem. Ticket [95ab8f02c3]. ... (check-in: e1917f2cee user: drh tags: trunk) | |
Changes
Changes to src/doc.c.
| ︙ | ︙ | |||
435 436 437 438 439 440 441 |
}
/* The file is now contained in the filebody blob. Deliver the
** file to the user
*/
zMime = mimetype_from_name(zName);
if( strcmp(zMime, "application/x-fossil-wiki")==0 ){
| > > > > > | | > | 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 |
}
/* The file is now contained in the filebody blob. Deliver the
** file to the user
*/
zMime = mimetype_from_name(zName);
if( strcmp(zMime, "application/x-fossil-wiki")==0 ){
Blob title, tail;
if( wiki_find_title(&filebody, &title, &tail) ){
style_header(blob_str(&title));
wiki_convert(&tail, 0, 0);
}else{
style_header("Documentation");
wiki_convert(&filebody, 0, 0);
}
style_footer();
}else if( strcmp(zMime, "text/plain")==0 ){
style_header("Documentation");
@ <blockquote><pre>
@ %h(blob_str(&filebody))
@ </pre></blockquote>
style_footer();
|
| ︙ | ︙ |
Changes to src/wikiformat.c.
| ︙ | ︙ | |||
1334 1335 1336 1337 1338 1339 1340 |
Blob in, out;
if( g.argc!=3 ) usage("FILE");
blob_zero(&out);
blob_read_from_file(&in, g.argv[2]);
wiki_convert(&in, &out, 0);
blob_write_to_file(&out, "-");
}
| > > > > > > > > > > > > > > > > > > > > > > > > > > | 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 |
Blob in, out;
if( g.argc!=3 ) usage("FILE");
blob_zero(&out);
blob_read_from_file(&in, g.argv[2]);
wiki_convert(&in, &out, 0);
blob_write_to_file(&out, "-");
}
/*
** Search for a <title>...</title> at the beginning of a wiki page.
** Return true (nonzero) if a title is found. Return zero if there is
** not title.
**
** If a title is found, initialize the pTitle blob to be the content
** of the title and initialize pTail to be the text that follows the
** title.
*/
int wiki_find_title(Blob *pIn, Blob *pTitle, Blob *pTail){
char *z;
int i;
int iStart;
z = blob_str(pIn);
for(i=0; isspace(z[i]); i++){}
if( z[i]!='<' ) return 0;
i++;
if( strncmp(&z[i],"title>", 6)!=0 ) return 0;
iStart = i+6;
for(i=iStart; z[i] && (z[i]!='<' || strncmp(&z[i],"</title>",8)!=0); i++){}
if( z[i]!='<' ) return 0;
blob_init(pTitle, &z[iStart], i-iStart);
blob_init(pTail, &z[i+8], -1);
return 1;
}
|
Changes to www/index.wiki.
1 2 3 4 5 6 7 | <h1>Fossil: Distributed Revision Control, Wiki, and Bug-Tracking</h1> Fossil is a [http://en.wikipedia.org/wiki/Revision_control | distributed software version control system] that includes an integrated [./wikitheory.wiki | distributed wiki] and an integrated [./bugtheory.wiki | distributed bug-tracking system] all in a single, | > | 1 2 3 4 5 6 7 8 | <title>Fossil Home Page</title> <h1>Fossil: Distributed Revision Control, Wiki, and Bug-Tracking</h1> Fossil is a [http://en.wikipedia.org/wiki/Revision_control | distributed software version control system] that includes an integrated [./wikitheory.wiki | distributed wiki] and an integrated [./bugtheory.wiki | distributed bug-tracking system] all in a single, |
| ︙ | ︙ |