Fossil SCM
Fix rendering on the /file page that causes text files to be reported as binary. Caused by check-in [6643d4a0c1aabb85].
Commit
e5d30a7c34db7c2e7268b06b72c1ec999110396a080d8735bafe37c7062d041f
Parent
a6177fd43dbef3c…
1 file changed
+1
-1
+1
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -2509,11 +2509,11 @@ | ||
| 2509 | 2509 | style_submenu_checkbox("ln", "Line Numbers", 0, 0); |
| 2510 | 2510 | } |
| 2511 | 2511 | blob_to_utf8_no_bom(&content, 0); |
| 2512 | 2512 | if( zMime==0 ) zMime = mimetype_from_content(&content); |
| 2513 | 2513 | @ <blockquote class="file-content"> |
| 2514 | - if( zMime==0 ){ | |
| 2514 | + if( zMime==0 || strncmp(zMime, "text/", 5)==0 ){ | |
| 2515 | 2515 | const char *z, *zFileName, *zExt; |
| 2516 | 2516 | z = blob_str(&content); |
| 2517 | 2517 | zFileName = db_text(0, |
| 2518 | 2518 | "SELECT name FROM mlink, filename" |
| 2519 | 2519 | " WHERE filename.fnid=mlink.fnid" |
| 2520 | 2520 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2509,11 +2509,11 @@ | |
| 2509 | style_submenu_checkbox("ln", "Line Numbers", 0, 0); |
| 2510 | } |
| 2511 | blob_to_utf8_no_bom(&content, 0); |
| 2512 | if( zMime==0 ) zMime = mimetype_from_content(&content); |
| 2513 | @ <blockquote class="file-content"> |
| 2514 | if( zMime==0 ){ |
| 2515 | const char *z, *zFileName, *zExt; |
| 2516 | z = blob_str(&content); |
| 2517 | zFileName = db_text(0, |
| 2518 | "SELECT name FROM mlink, filename" |
| 2519 | " WHERE filename.fnid=mlink.fnid" |
| 2520 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2509,11 +2509,11 @@ | |
| 2509 | style_submenu_checkbox("ln", "Line Numbers", 0, 0); |
| 2510 | } |
| 2511 | blob_to_utf8_no_bom(&content, 0); |
| 2512 | if( zMime==0 ) zMime = mimetype_from_content(&content); |
| 2513 | @ <blockquote class="file-content"> |
| 2514 | if( zMime==0 || strncmp(zMime, "text/", 5)==0 ){ |
| 2515 | const char *z, *zFileName, *zExt; |
| 2516 | z = blob_str(&content); |
| 2517 | zFileName = db_text(0, |
| 2518 | "SELECT name FROM mlink, filename" |
| 2519 | " WHERE filename.fnid=mlink.fnid" |
| 2520 |