Fossil SCM
Ensure that the wiki and markdown rule text has been materialized prior to rendering it.
Commit
e95c5514fcabde637e4f7954f1f72b5642bd2f8e44d2cbeeaf7f4a3e8633717e
Parent
6b139de03f349cc…
1 file changed
+2
+2
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -219,10 +219,11 @@ | ||
| 219 | 219 | style_submenu_element("Formatted", "%R/md_rules"); |
| 220 | 220 | }else{ |
| 221 | 221 | style_submenu_element("Plain-Text", "%R/md_rules?txt=1"); |
| 222 | 222 | } |
| 223 | 223 | blob_init(&x, builtin_text("markdown.md"), -1); |
| 224 | + blob_materialize(&x); | |
| 224 | 225 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown"); |
| 225 | 226 | blob_reset(&x); |
| 226 | 227 | style_footer(); |
| 227 | 228 | } |
| 228 | 229 | |
| @@ -239,10 +240,11 @@ | ||
| 239 | 240 | style_submenu_element("Formatted", "%R/wiki_rules"); |
| 240 | 241 | }else{ |
| 241 | 242 | style_submenu_element("Plain-Text", "%R/wiki_rules?txt=1"); |
| 242 | 243 | } |
| 243 | 244 | blob_init(&x, builtin_text("wiki.wiki"), -1); |
| 245 | + blob_materialize(&x); | |
| 244 | 246 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-fossil-wiki"); |
| 245 | 247 | blob_reset(&x); |
| 246 | 248 | style_footer(); |
| 247 | 249 | } |
| 248 | 250 | |
| 249 | 251 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -219,10 +219,11 @@ | |
| 219 | style_submenu_element("Formatted", "%R/md_rules"); |
| 220 | }else{ |
| 221 | style_submenu_element("Plain-Text", "%R/md_rules?txt=1"); |
| 222 | } |
| 223 | blob_init(&x, builtin_text("markdown.md"), -1); |
| 224 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown"); |
| 225 | blob_reset(&x); |
| 226 | style_footer(); |
| 227 | } |
| 228 | |
| @@ -239,10 +240,11 @@ | |
| 239 | style_submenu_element("Formatted", "%R/wiki_rules"); |
| 240 | }else{ |
| 241 | style_submenu_element("Plain-Text", "%R/wiki_rules?txt=1"); |
| 242 | } |
| 243 | blob_init(&x, builtin_text("wiki.wiki"), -1); |
| 244 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-fossil-wiki"); |
| 245 | blob_reset(&x); |
| 246 | style_footer(); |
| 247 | } |
| 248 | |
| 249 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -219,10 +219,11 @@ | |
| 219 | style_submenu_element("Formatted", "%R/md_rules"); |
| 220 | }else{ |
| 221 | style_submenu_element("Plain-Text", "%R/md_rules?txt=1"); |
| 222 | } |
| 223 | blob_init(&x, builtin_text("markdown.md"), -1); |
| 224 | blob_materialize(&x); |
| 225 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown"); |
| 226 | blob_reset(&x); |
| 227 | style_footer(); |
| 228 | } |
| 229 | |
| @@ -239,10 +240,11 @@ | |
| 240 | style_submenu_element("Formatted", "%R/wiki_rules"); |
| 241 | }else{ |
| 242 | style_submenu_element("Plain-Text", "%R/wiki_rules?txt=1"); |
| 243 | } |
| 244 | blob_init(&x, builtin_text("wiki.wiki"), -1); |
| 245 | blob_materialize(&x); |
| 246 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-fossil-wiki"); |
| 247 | blob_reset(&x); |
| 248 | style_footer(); |
| 249 | } |
| 250 | |
| 251 |