Fossil SCM

Add experimental 'raw' mode for embedded TH1 docs feature.

mistachkin 2016-08-12 13:44 trunk merge
Commit ccd8a9cbe4fc43b0b373a0a415b445e9bbbeacc0
1 file changed +7 -2
+7 -2
--- src/doc.c
+++ src/doc.c
@@ -686,13 +686,18 @@
686686
convert_href_and_output(&filebody);
687687
style_footer();
688688
#ifdef FOSSIL_ENABLE_TH1_DOCS
689689
}else if( Th_AreDocsEnabled() &&
690690
fossil_strcmp(zMime, "application/x-th1")==0 ){
691
- style_header("%h", zName);
691
+ int raw = P("raw")!=0;
692
+ if( !raw ){
693
+ style_header("%h", zName);
694
+ }
692695
Th_Render(blob_str(&filebody));
693
- style_footer();
696
+ if( !raw ){
697
+ style_footer();
698
+ }
694699
#endif
695700
}else{
696701
cgi_set_content_type(zMime);
697702
cgi_set_content(&filebody);
698703
}
699704
--- src/doc.c
+++ src/doc.c
@@ -686,13 +686,18 @@
686 convert_href_and_output(&filebody);
687 style_footer();
688 #ifdef FOSSIL_ENABLE_TH1_DOCS
689 }else if( Th_AreDocsEnabled() &&
690 fossil_strcmp(zMime, "application/x-th1")==0 ){
691 style_header("%h", zName);
 
 
 
692 Th_Render(blob_str(&filebody));
693 style_footer();
 
 
694 #endif
695 }else{
696 cgi_set_content_type(zMime);
697 cgi_set_content(&filebody);
698 }
699
--- src/doc.c
+++ src/doc.c
@@ -686,13 +686,18 @@
686 convert_href_and_output(&filebody);
687 style_footer();
688 #ifdef FOSSIL_ENABLE_TH1_DOCS
689 }else if( Th_AreDocsEnabled() &&
690 fossil_strcmp(zMime, "application/x-th1")==0 ){
691 int raw = P("raw")!=0;
692 if( !raw ){
693 style_header("%h", zName);
694 }
695 Th_Render(blob_str(&filebody));
696 if( !raw ){
697 style_footer();
698 }
699 #endif
700 }else{
701 cgi_set_content_type(zMime);
702 cgi_set_content(&filebody);
703 }
704

Keyboard Shortcuts

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