Fossil SCM

Add a comment for <code>append_footnote_upc()</code>. Also substitute a variable of zero value with just "0" constant. No functional changes.

george 2022-02-21 05:14 markdown-footnotes
Commit ae8a3dd5aab47bebda6f973db397757029608711b247fd3cc08c385efec65112
+1 -1
--- src/markdown.c
+++ src/markdown.c
@@ -2790,11 +2790,11 @@
27902790
const struct footnote* x = CAST_AS_FOOTNOTES(notes) + j;
27912791
assert( !x->iMark );
27922792
assert( !x->bRndred );
27932793
assert( (&x->id) + 1 == &x->text ); /* see html_footnote_item() */
27942794
assert( (&x->upc)- 1 == &x->text );
2795
- rndr.make.footnote_item(all_items,&x->text,x->iMark,0,rndr.make.opaque);
2795
+ rndr.make.footnote_item(all_items,&x->text,0,0,rndr.make.opaque);
27962796
g.ftntsIssues[1]++;
27972797
}
27982798
rndr.make.footnotes(ob, all_items, rndr.make.opaque);
27992799
release_work_buffer(&rndr, all_items);
28002800
}
28012801
--- src/markdown.c
+++ src/markdown.c
@@ -2790,11 +2790,11 @@
2790 const struct footnote* x = CAST_AS_FOOTNOTES(notes) + j;
2791 assert( !x->iMark );
2792 assert( !x->bRndred );
2793 assert( (&x->id) + 1 == &x->text ); /* see html_footnote_item() */
2794 assert( (&x->upc)- 1 == &x->text );
2795 rndr.make.footnote_item(all_items,&x->text,x->iMark,0,rndr.make.opaque);
2796 g.ftntsIssues[1]++;
2797 }
2798 rndr.make.footnotes(ob, all_items, rndr.make.opaque);
2799 release_work_buffer(&rndr, all_items);
2800 }
2801
--- src/markdown.c
+++ src/markdown.c
@@ -2790,11 +2790,11 @@
2790 const struct footnote* x = CAST_AS_FOOTNOTES(notes) + j;
2791 assert( !x->iMark );
2792 assert( !x->bRndred );
2793 assert( (&x->id) + 1 == &x->text ); /* see html_footnote_item() */
2794 assert( (&x->upc)- 1 == &x->text );
2795 rndr.make.footnote_item(all_items,&x->text,0,0,rndr.make.opaque);
2796 g.ftntsIssues[1]++;
2797 }
2798 rndr.make.footnotes(ob, all_items, rndr.make.opaque);
2799 release_work_buffer(&rndr, all_items);
2800 }
2801
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -334,14 +334,18 @@
334334
BLOB_APPEND_LITERAL(ob, " <tr>\n");
335335
BLOB_APPEND_BLOB(ob, cells);
336336
BLOB_APPEND_LITERAL(ob, " </tr>\n");
337337
}
338338
339
+/* Render a token of user provided classes.
340
+** If bHTML is true then render HTML for (presumably) visible text,
341
+** otherwise just a space-separated list of the derived classes
342
+*/
339343
static void append_footnote_upc(
340344
struct Blob *ob,
341345
const struct Blob *upc, /* token of user-provided classes */
342
- int bHTML /* if true then render markup, otherwise just a list of classes */
346
+ int bHTML
343347
){
344348
const char *z = blob_buffer(upc);
345349
int i, n = blob_size(upc);
346350
if( n<3 ) return;
347351
assert( z[0]=='.' && z[n-1] == ':' );
348352
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -334,14 +334,18 @@
334 BLOB_APPEND_LITERAL(ob, " <tr>\n");
335 BLOB_APPEND_BLOB(ob, cells);
336 BLOB_APPEND_LITERAL(ob, " </tr>\n");
337 }
338
 
 
 
 
339 static void append_footnote_upc(
340 struct Blob *ob,
341 const struct Blob *upc, /* token of user-provided classes */
342 int bHTML /* if true then render markup, otherwise just a list of classes */
343 ){
344 const char *z = blob_buffer(upc);
345 int i, n = blob_size(upc);
346 if( n<3 ) return;
347 assert( z[0]=='.' && z[n-1] == ':' );
348
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -334,14 +334,18 @@
334 BLOB_APPEND_LITERAL(ob, " <tr>\n");
335 BLOB_APPEND_BLOB(ob, cells);
336 BLOB_APPEND_LITERAL(ob, " </tr>\n");
337 }
338
339 /* Render a token of user provided classes.
340 ** If bHTML is true then render HTML for (presumably) visible text,
341 ** otherwise just a space-separated list of the derived classes
342 */
343 static void append_footnote_upc(
344 struct Blob *ob,
345 const struct Blob *upc, /* token of user-provided classes */
346 int bHTML
347 ){
348 const char *z = blob_buffer(upc);
349 int i, n = blob_size(upc);
350 if( n<3 ) return;
351 assert( z[0]=='.' && z[n-1] == ':' );
352

Keyboard Shortcuts

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