Fossil

Check-in [35698c9c]
Login

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

Overview
Comment:Add support for document titles to the TH1 docs feature.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:35698c9c43478f8f7c7621a53a08c85f9b028c01
User & Date: mistachkin 2017-02-23 07:52:02
References
2017-05-27
03:21
Fix support for 'raw' mode for embedded TH1 docs broken by check-in [35698c9c43478f8f]. check-in: 05df5d2e user: mistachkin tags: trunk
Context
2017-02-24
14:52
Fix MD5 function (actually: byteReverse) for ARM processors. If OpenSSL is available, use their MD5 impl. Exchange SHA1Final() method parameters, being compatible with OpenSSL. check-in: b88ef030 user: jan.nijtmans tags: trunk
2017-02-23
13:42
Run the "PRAGMA optimize" command as the database is closing. This change is intended as a test of "PRAGMA optimize". check-in: 90555227 user: drh tags: optimize-pragma
07:52
Add support for document titles to the TH1 docs feature. check-in: 35698c9c user: mistachkin tags: trunk
07:51
Fix harmless compiler warning seen with MSVC. check-in: afcff499 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/doc.c.

706
707
708
709
710
711
712







713
714
715


716
717
718
719
720
721
722
    convert_href_and_output(&filebody);
    style_footer();
#ifdef FOSSIL_ENABLE_TH1_DOCS
  }else if( Th_AreDocsEnabled() &&
            fossil_strcmp(zMime, "application/x-th1")==0 ){
    int raw = P("raw")!=0;
    if( !raw ){







      style_header("%h", zName);
    }
    Th_Render(blob_str(&filebody));


    if( !raw ){
      style_footer();
    }
#endif
  }else{
    cgi_set_content_type(zMime);
    cgi_set_content(&filebody);







>
>
>
>
>
>
>
|
<
|
>
>







706
707
708
709
710
711
712
713
714
715
716
717
718
719
720

721
722
723
724
725
726
727
728
729
730
    convert_href_and_output(&filebody);
    style_footer();
#ifdef FOSSIL_ENABLE_TH1_DOCS
  }else if( Th_AreDocsEnabled() &&
            fossil_strcmp(zMime, "application/x-th1")==0 ){
    int raw = P("raw")!=0;
    if( !raw ){
      Blob tail;
      blob_zero(&tail);
      if( wiki_find_title(&filebody, &title, &tail) ){
        style_header("%s", blob_str(&title));
        Th_Render(blob_str(&tail));
        blob_reset(&tail);
      }else{
        style_header("%h", zName);

        Th_Render(blob_str(&filebody));
      }
    }
    if( !raw ){
      style_footer();
    }
#endif
  }else{
    cgi_set_content_type(zMime);
    cgi_set_content(&filebody);