Fossil SCM

Improvements to help-text HTML formatting.

drh 2023-09-19 11:31 trunk
Commit ccc780f5526126434f341e4db6ca46ac024dd8e4217948c61ac1027c6b72ec10
1 file changed +11 -2
+11 -2
--- src/dispatch.c
+++ src/dispatch.c
@@ -447,22 +447,31 @@
447447
assert( iLevel<ArraySize(aIndent)-2 );
448448
if( isLI ){
449449
iLevel++;
450450
aIndent[iLevel] = nIndent;
451451
azEnd[iLevel] = zEndUL;
452
+ if( wantP ){
453
+ blob_append(pHtml,"<p>", 3);
454
+ wantP = 0;
455
+ }
452456
blob_append(pHtml, "<ul>\n", 5);
453457
}else if( isDT
454458
|| zHelp[nIndent]=='-'
455459
|| hasGap(zHelp+nIndent,i-nIndent) ){
456460
iLevel++;
457461
aIndent[iLevel] = nIndent;
458462
azEnd[iLevel] = zEndDL;
463
+ wantP = 0;
459464
blob_append(pHtml, "<blockquote><dl>\n", -1);
460465
}else if( azEnd[iLevel]==zEndDL ){
461466
iLevel++;
462467
aIndent[iLevel] = nIndent;
463468
azEnd[iLevel] = zEndDD;
469
+ if( wantP ){
470
+ blob_append(pHtml,"<p>", 3);
471
+ wantP = 0;
472
+ }
464473
blob_append(pHtml, "<dd>", 4);
465474
}else if( wantP ){
466475
iLevel++;
467476
aIndent[iLevel] = nIndent;
468477
azEnd[iLevel] = zEndPRE;
@@ -1033,13 +1042,13 @@
10331042
}
10341043
10351044
@ <dt><big><b>%s(aCommand[bktHelp[aCommand[i].iHelp][j]].zName)</b>
10361045
@</big> (%s(zDesc))</dt>
10371046
}
1038
- @ <dd>
1047
+ @ <p><dd>
10391048
help_to_html(aCommand[i].zHelp, cgi_output_blob());
1040
- @ </dd>
1049
+ @ </dd><p>
10411050
occHelp[aCommand[i].iHelp] = 0;
10421051
}
10431052
}
10441053
@ </dl>
10451054
blob_reset(&buf);
10461055
--- src/dispatch.c
+++ src/dispatch.c
@@ -447,22 +447,31 @@
447 assert( iLevel<ArraySize(aIndent)-2 );
448 if( isLI ){
449 iLevel++;
450 aIndent[iLevel] = nIndent;
451 azEnd[iLevel] = zEndUL;
 
 
 
 
452 blob_append(pHtml, "<ul>\n", 5);
453 }else if( isDT
454 || zHelp[nIndent]=='-'
455 || hasGap(zHelp+nIndent,i-nIndent) ){
456 iLevel++;
457 aIndent[iLevel] = nIndent;
458 azEnd[iLevel] = zEndDL;
 
459 blob_append(pHtml, "<blockquote><dl>\n", -1);
460 }else if( azEnd[iLevel]==zEndDL ){
461 iLevel++;
462 aIndent[iLevel] = nIndent;
463 azEnd[iLevel] = zEndDD;
 
 
 
 
464 blob_append(pHtml, "<dd>", 4);
465 }else if( wantP ){
466 iLevel++;
467 aIndent[iLevel] = nIndent;
468 azEnd[iLevel] = zEndPRE;
@@ -1033,13 +1042,13 @@
1033 }
1034
1035 @ <dt><big><b>%s(aCommand[bktHelp[aCommand[i].iHelp][j]].zName)</b>
1036 @</big> (%s(zDesc))</dt>
1037 }
1038 @ <dd>
1039 help_to_html(aCommand[i].zHelp, cgi_output_blob());
1040 @ </dd>
1041 occHelp[aCommand[i].iHelp] = 0;
1042 }
1043 }
1044 @ </dl>
1045 blob_reset(&buf);
1046
--- src/dispatch.c
+++ src/dispatch.c
@@ -447,22 +447,31 @@
447 assert( iLevel<ArraySize(aIndent)-2 );
448 if( isLI ){
449 iLevel++;
450 aIndent[iLevel] = nIndent;
451 azEnd[iLevel] = zEndUL;
452 if( wantP ){
453 blob_append(pHtml,"<p>", 3);
454 wantP = 0;
455 }
456 blob_append(pHtml, "<ul>\n", 5);
457 }else if( isDT
458 || zHelp[nIndent]=='-'
459 || hasGap(zHelp+nIndent,i-nIndent) ){
460 iLevel++;
461 aIndent[iLevel] = nIndent;
462 azEnd[iLevel] = zEndDL;
463 wantP = 0;
464 blob_append(pHtml, "<blockquote><dl>\n", -1);
465 }else if( azEnd[iLevel]==zEndDL ){
466 iLevel++;
467 aIndent[iLevel] = nIndent;
468 azEnd[iLevel] = zEndDD;
469 if( wantP ){
470 blob_append(pHtml,"<p>", 3);
471 wantP = 0;
472 }
473 blob_append(pHtml, "<dd>", 4);
474 }else if( wantP ){
475 iLevel++;
476 aIndent[iLevel] = nIndent;
477 azEnd[iLevel] = zEndPRE;
@@ -1033,13 +1042,13 @@
1042 }
1043
1044 @ <dt><big><b>%s(aCommand[bktHelp[aCommand[i].iHelp][j]].zName)</b>
1045 @</big> (%s(zDesc))</dt>
1046 }
1047 @ <p><dd>
1048 help_to_html(aCommand[i].zHelp, cgi_output_blob());
1049 @ </dd><p>
1050 occHelp[aCommand[i].iHelp] = 0;
1051 }
1052 }
1053 @ </dl>
1054 blob_reset(&buf);
1055

Keyboard Shortcuts

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