Fossil SCM

Merge trunk, also change "Svg" to "SVG"

andygoth 2020-09-28 02:15 andygoth-html-caps merge
Commit c319f52cf79accd718147ea227039219fd46fc587f04497752650fc03bc00366
2 files changed +11 +11
+11
--- src/info.c
+++ src/info.c
@@ -2185,10 +2185,11 @@
21852185
** name=NAME - filename or hash as a query parameter
21862186
** filename=NAME - alternative spelling for "name="
21872187
** fn=NAME - alternative spelling for "name="
21882188
** ci=VERSION - The specific check-in to use with "name=" to
21892189
** identify the file.
2190
+** txt - Force display of unformatted source text
21902191
**
21912192
** The /artifact page show the complete content of a file
21922193
** identified by HASH. The /whatis page shows only a description
21932194
** of how the artifact is used. The /file page shows the most recent
21942195
** version of the file or directory called NAME, or a list of the
@@ -2209,10 +2210,11 @@
22092210
Blob content;
22102211
const char *zMime;
22112212
Blob downloadName;
22122213
int renderAsWiki = 0;
22132214
int renderAsHtml = 0;
2215
+ int renderAsSvg = 0;
22142216
int objType;
22152217
int asText;
22162218
const char *zUuid = 0;
22172219
u32 objdescFlags = OBJDESC_BASE;
22182220
int descOnly = fossil_strcmp(g.zPath,"whatis")==0;
@@ -2419,10 +2421,17 @@
24192421
style_submenu_element("Wiki", "%s", url_render(&url, "txt", 0, 0, 0));
24202422
}else{
24212423
renderAsWiki = 1;
24222424
style_submenu_element("Text", "%s", url_render(&url, "txt", "1", 0, 0));
24232425
}
2426
+ }else if( fossil_strcmp(zMime, "image/svg+xml")==0 ){
2427
+ if( asText ){
2428
+ style_submenu_element("SVG", "%s", url_render(&url, "txt", 0, 0, 0));
2429
+ }else{
2430
+ renderAsSvg = 1;
2431
+ style_submenu_element("Text", "%s", url_render(&url, "txt", "1", 0, 0));
2432
+ }
24242433
}
24252434
if( fileedit_is_editable(zName) ){
24262435
style_submenu_element("Edit",
24272436
"%R/fileedit?filename=%T&checkin=%!S",
24282437
zName, zCI);
@@ -2450,10 +2459,12 @@
24502459
@ function(){
24512460
@ this.height=this.contentDocument.documentElement.scrollHeight + 75;
24522461
@ }
24532462
@ );
24542463
@ </script>
2464
+ }else if( renderAsSvg ){
2465
+ @ <object type="image/svg+xml" data="%R/raw/%s(zUuid)"></object>
24552466
}else{
24562467
style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
24572468
if( zLn==0 || atoi(zLn)==0 ){
24582469
style_submenu_checkbox("ln", "Line Numbers", 0, 0);
24592470
}
24602471
--- src/info.c
+++ src/info.c
@@ -2185,10 +2185,11 @@
2185 ** name=NAME - filename or hash as a query parameter
2186 ** filename=NAME - alternative spelling for "name="
2187 ** fn=NAME - alternative spelling for "name="
2188 ** ci=VERSION - The specific check-in to use with "name=" to
2189 ** identify the file.
 
2190 **
2191 ** The /artifact page show the complete content of a file
2192 ** identified by HASH. The /whatis page shows only a description
2193 ** of how the artifact is used. The /file page shows the most recent
2194 ** version of the file or directory called NAME, or a list of the
@@ -2209,10 +2210,11 @@
2209 Blob content;
2210 const char *zMime;
2211 Blob downloadName;
2212 int renderAsWiki = 0;
2213 int renderAsHtml = 0;
 
2214 int objType;
2215 int asText;
2216 const char *zUuid = 0;
2217 u32 objdescFlags = OBJDESC_BASE;
2218 int descOnly = fossil_strcmp(g.zPath,"whatis")==0;
@@ -2419,10 +2421,17 @@
2419 style_submenu_element("Wiki", "%s", url_render(&url, "txt", 0, 0, 0));
2420 }else{
2421 renderAsWiki = 1;
2422 style_submenu_element("Text", "%s", url_render(&url, "txt", "1", 0, 0));
2423 }
 
 
 
 
 
 
 
2424 }
2425 if( fileedit_is_editable(zName) ){
2426 style_submenu_element("Edit",
2427 "%R/fileedit?filename=%T&checkin=%!S",
2428 zName, zCI);
@@ -2450,10 +2459,12 @@
2450 @ function(){
2451 @ this.height=this.contentDocument.documentElement.scrollHeight + 75;
2452 @ }
2453 @ );
2454 @ </script>
 
 
2455 }else{
2456 style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
2457 if( zLn==0 || atoi(zLn)==0 ){
2458 style_submenu_checkbox("ln", "Line Numbers", 0, 0);
2459 }
2460
--- src/info.c
+++ src/info.c
@@ -2185,10 +2185,11 @@
2185 ** name=NAME - filename or hash as a query parameter
2186 ** filename=NAME - alternative spelling for "name="
2187 ** fn=NAME - alternative spelling for "name="
2188 ** ci=VERSION - The specific check-in to use with "name=" to
2189 ** identify the file.
2190 ** txt - Force display of unformatted source text
2191 **
2192 ** The /artifact page show the complete content of a file
2193 ** identified by HASH. The /whatis page shows only a description
2194 ** of how the artifact is used. The /file page shows the most recent
2195 ** version of the file or directory called NAME, or a list of the
@@ -2209,10 +2210,11 @@
2210 Blob content;
2211 const char *zMime;
2212 Blob downloadName;
2213 int renderAsWiki = 0;
2214 int renderAsHtml = 0;
2215 int renderAsSvg = 0;
2216 int objType;
2217 int asText;
2218 const char *zUuid = 0;
2219 u32 objdescFlags = OBJDESC_BASE;
2220 int descOnly = fossil_strcmp(g.zPath,"whatis")==0;
@@ -2419,10 +2421,17 @@
2421 style_submenu_element("Wiki", "%s", url_render(&url, "txt", 0, 0, 0));
2422 }else{
2423 renderAsWiki = 1;
2424 style_submenu_element("Text", "%s", url_render(&url, "txt", "1", 0, 0));
2425 }
2426 }else if( fossil_strcmp(zMime, "image/svg+xml")==0 ){
2427 if( asText ){
2428 style_submenu_element("SVG", "%s", url_render(&url, "txt", 0, 0, 0));
2429 }else{
2430 renderAsSvg = 1;
2431 style_submenu_element("Text", "%s", url_render(&url, "txt", "1", 0, 0));
2432 }
2433 }
2434 if( fileedit_is_editable(zName) ){
2435 style_submenu_element("Edit",
2436 "%R/fileedit?filename=%T&checkin=%!S",
2437 zName, zCI);
@@ -2450,10 +2459,12 @@
2459 @ function(){
2460 @ this.height=this.contentDocument.documentElement.scrollHeight + 75;
2461 @ }
2462 @ );
2463 @ </script>
2464 }else if( renderAsSvg ){
2465 @ <object type="image/svg+xml" data="%R/raw/%s(zUuid)"></object>
2466 }else{
2467 style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
2468 if( zLn==0 || atoi(zLn)==0 ){
2469 style_submenu_checkbox("ln", "Line Numbers", 0, 0);
2470 }
2471
+11
--- src/info.c
+++ src/info.c
@@ -2185,10 +2185,11 @@
21852185
** name=NAME - filename or hash as a query parameter
21862186
** filename=NAME - alternative spelling for "name="
21872187
** fn=NAME - alternative spelling for "name="
21882188
** ci=VERSION - The specific check-in to use with "name=" to
21892189
** identify the file.
2190
+** txt - Force display of unformatted source text
21902191
**
21912192
** The /artifact page show the complete content of a file
21922193
** identified by HASH. The /whatis page shows only a description
21932194
** of how the artifact is used. The /file page shows the most recent
21942195
** version of the file or directory called NAME, or a list of the
@@ -2209,10 +2210,11 @@
22092210
Blob content;
22102211
const char *zMime;
22112212
Blob downloadName;
22122213
int renderAsWiki = 0;
22132214
int renderAsHtml = 0;
2215
+ int renderAsSvg = 0;
22142216
int objType;
22152217
int asText;
22162218
const char *zUuid = 0;
22172219
u32 objdescFlags = OBJDESC_BASE;
22182220
int descOnly = fossil_strcmp(g.zPath,"whatis")==0;
@@ -2419,10 +2421,17 @@
24192421
style_submenu_element("Wiki", "%s", url_render(&url, "txt", 0, 0, 0));
24202422
}else{
24212423
renderAsWiki = 1;
24222424
style_submenu_element("Text", "%s", url_render(&url, "txt", "1", 0, 0));
24232425
}
2426
+ }else if( fossil_strcmp(zMime, "image/svg+xml")==0 ){
2427
+ if( asText ){
2428
+ style_submenu_element("SVG", "%s", url_render(&url, "txt", 0, 0, 0));
2429
+ }else{
2430
+ renderAsSvg = 1;
2431
+ style_submenu_element("Text", "%s", url_render(&url, "txt", "1", 0, 0));
2432
+ }
24242433
}
24252434
if( fileedit_is_editable(zName) ){
24262435
style_submenu_element("Edit",
24272436
"%R/fileedit?filename=%T&checkin=%!S",
24282437
zName, zCI);
@@ -2450,10 +2459,12 @@
24502459
@ function(){
24512460
@ this.height=this.contentDocument.documentElement.scrollHeight + 75;
24522461
@ }
24532462
@ );
24542463
@ </script>
2464
+ }else if( renderAsSvg ){
2465
+ @ <object type="image/svg+xml" data="%R/raw/%s(zUuid)"></object>
24552466
}else{
24562467
style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
24572468
if( zLn==0 || atoi(zLn)==0 ){
24582469
style_submenu_checkbox("ln", "Line Numbers", 0, 0);
24592470
}
24602471
--- src/info.c
+++ src/info.c
@@ -2185,10 +2185,11 @@
2185 ** name=NAME - filename or hash as a query parameter
2186 ** filename=NAME - alternative spelling for "name="
2187 ** fn=NAME - alternative spelling for "name="
2188 ** ci=VERSION - The specific check-in to use with "name=" to
2189 ** identify the file.
 
2190 **
2191 ** The /artifact page show the complete content of a file
2192 ** identified by HASH. The /whatis page shows only a description
2193 ** of how the artifact is used. The /file page shows the most recent
2194 ** version of the file or directory called NAME, or a list of the
@@ -2209,10 +2210,11 @@
2209 Blob content;
2210 const char *zMime;
2211 Blob downloadName;
2212 int renderAsWiki = 0;
2213 int renderAsHtml = 0;
 
2214 int objType;
2215 int asText;
2216 const char *zUuid = 0;
2217 u32 objdescFlags = OBJDESC_BASE;
2218 int descOnly = fossil_strcmp(g.zPath,"whatis")==0;
@@ -2419,10 +2421,17 @@
2419 style_submenu_element("Wiki", "%s", url_render(&url, "txt", 0, 0, 0));
2420 }else{
2421 renderAsWiki = 1;
2422 style_submenu_element("Text", "%s", url_render(&url, "txt", "1", 0, 0));
2423 }
 
 
 
 
 
 
 
2424 }
2425 if( fileedit_is_editable(zName) ){
2426 style_submenu_element("Edit",
2427 "%R/fileedit?filename=%T&checkin=%!S",
2428 zName, zCI);
@@ -2450,10 +2459,12 @@
2450 @ function(){
2451 @ this.height=this.contentDocument.documentElement.scrollHeight + 75;
2452 @ }
2453 @ );
2454 @ </script>
 
 
2455 }else{
2456 style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
2457 if( zLn==0 || atoi(zLn)==0 ){
2458 style_submenu_checkbox("ln", "Line Numbers", 0, 0);
2459 }
2460
--- src/info.c
+++ src/info.c
@@ -2185,10 +2185,11 @@
2185 ** name=NAME - filename or hash as a query parameter
2186 ** filename=NAME - alternative spelling for "name="
2187 ** fn=NAME - alternative spelling for "name="
2188 ** ci=VERSION - The specific check-in to use with "name=" to
2189 ** identify the file.
2190 ** txt - Force display of unformatted source text
2191 **
2192 ** The /artifact page show the complete content of a file
2193 ** identified by HASH. The /whatis page shows only a description
2194 ** of how the artifact is used. The /file page shows the most recent
2195 ** version of the file or directory called NAME, or a list of the
@@ -2209,10 +2210,11 @@
2210 Blob content;
2211 const char *zMime;
2212 Blob downloadName;
2213 int renderAsWiki = 0;
2214 int renderAsHtml = 0;
2215 int renderAsSvg = 0;
2216 int objType;
2217 int asText;
2218 const char *zUuid = 0;
2219 u32 objdescFlags = OBJDESC_BASE;
2220 int descOnly = fossil_strcmp(g.zPath,"whatis")==0;
@@ -2419,10 +2421,17 @@
2421 style_submenu_element("Wiki", "%s", url_render(&url, "txt", 0, 0, 0));
2422 }else{
2423 renderAsWiki = 1;
2424 style_submenu_element("Text", "%s", url_render(&url, "txt", "1", 0, 0));
2425 }
2426 }else if( fossil_strcmp(zMime, "image/svg+xml")==0 ){
2427 if( asText ){
2428 style_submenu_element("SVG", "%s", url_render(&url, "txt", 0, 0, 0));
2429 }else{
2430 renderAsSvg = 1;
2431 style_submenu_element("Text", "%s", url_render(&url, "txt", "1", 0, 0));
2432 }
2433 }
2434 if( fileedit_is_editable(zName) ){
2435 style_submenu_element("Edit",
2436 "%R/fileedit?filename=%T&checkin=%!S",
2437 zName, zCI);
@@ -2450,10 +2459,12 @@
2459 @ function(){
2460 @ this.height=this.contentDocument.documentElement.scrollHeight + 75;
2461 @ }
2462 @ );
2463 @ </script>
2464 }else if( renderAsSvg ){
2465 @ <object type="image/svg+xml" data="%R/raw/%s(zUuid)"></object>
2466 }else{
2467 style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
2468 if( zLn==0 || atoi(zLn)==0 ){
2469 style_submenu_checkbox("ln", "Line Numbers", 0, 0);
2470 }
2471

Keyboard Shortcuts

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