Diff
Not logged in

Differences From:

File src/doc.c part of check-in [23e96cf795] - Fix errors in the mimetype-generator table for documentation files. by drh on 2009-01-30 02:26:57. [view]

To:

File src/doc.c part of check-in [f88e2e7a13] - If embedded wiki documentation begins with <title>...</title> then use the text within the markup as the title of the document. by drh on 2009-06-07 17:27:45. [view]

@@ -438,10 +438,16 @@
   ** file to the user
   */
   zMime = mimetype_from_name(zName);
   if( strcmp(zMime, "application/x-fossil-wiki")==0 ){
-    style_header("Documentation");
-    wiki_convert(&filebody, 0, 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>