Fossil SCM
Change the callback function names in markdown_html.c so that they match the pointer names in markdown.c. No functional changes.
Commit
485fda60c3fcb7e5893fcaed78dd31abf8baa48f209b0866adf6301f4c813a18
Parent
54c1fd6fbb5f8dd…
1 file changed
+11
-11
+11
-11
| --- src/markdown_html.c | ||
| +++ src/markdown_html.c | ||
| @@ -129,11 +129,11 @@ | ||
| 129 | 129 | static void html_epilog(struct Blob *ob, void *opaque){ |
| 130 | 130 | INTER_BLOCK(ob); |
| 131 | 131 | BLOB_APPEND_LITERAL(ob, "</div>\n"); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | -static void html_raw_block(struct Blob *ob, struct Blob *text, void *opaque){ | |
| 134 | +static void html_blockhtml(struct Blob *ob, struct Blob *text, void *opaque){ | |
| 135 | 135 | char *data = blob_buffer(text); |
| 136 | 136 | size_t size = blob_size(text); |
| 137 | 137 | Blob *title = (Blob*)opaque; |
| 138 | 138 | while( size>0 && fossil_isspace(data[0]) ){ data++; size--; } |
| 139 | 139 | while( size>0 && fossil_isspace(data[size-1]) ){ size--; } |
| @@ -298,11 +298,11 @@ | ||
| 298 | 298 | |
| 299 | 299 | |
| 300 | 300 | |
| 301 | 301 | /* HTML span tags */ |
| 302 | 302 | |
| 303 | -static int html_raw_span(struct Blob *ob, struct Blob *text, void *opaque){ | |
| 303 | +static int html_raw_html_tag(struct Blob *ob, struct Blob *text, void *opaque){ | |
| 304 | 304 | blob_append(ob, blob_buffer(text), blob_size(text)); |
| 305 | 305 | return 1; |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | static int html_autolink( |
| @@ -333,11 +333,11 @@ | ||
| 333 | 333 | ** * https://spec.commonmark.org/0.29/#code-spans |
| 334 | 334 | ** |
| 335 | 335 | ** If nSep is 1 or 2, then this is a code-span which is inline. |
| 336 | 336 | ** If nSep is 3 or more, then this is a fenced code block |
| 337 | 337 | */ |
| 338 | -static int html_code_span( | |
| 338 | +static int html_codespan( | |
| 339 | 339 | struct Blob *ob, /* Write the output here */ |
| 340 | 340 | struct Blob *text, /* The stuff in between the code span marks */ |
| 341 | 341 | int nSep, /* Number of grave accents marks as delimiters */ |
| 342 | 342 | void *opaque |
| 343 | 343 | ){ |
| @@ -413,11 +413,11 @@ | ||
| 413 | 413 | } |
| 414 | 414 | BLOB_APPEND_LITERAL(ob, "\" />"); |
| 415 | 415 | return 1; |
| 416 | 416 | } |
| 417 | 417 | |
| 418 | -static int html_line_break(struct Blob *ob, void *opaque){ | |
| 418 | +static int html_linebreak(struct Blob *ob, void *opaque){ | |
| 419 | 419 | BLOB_APPEND_LITERAL(ob, "<br />\n"); |
| 420 | 420 | return 1; |
| 421 | 421 | } |
| 422 | 422 | |
| 423 | 423 | static int html_link( |
| @@ -483,11 +483,11 @@ | ||
| 483 | 483 | html_epilog, |
| 484 | 484 | |
| 485 | 485 | /* block level elements */ |
| 486 | 486 | html_blockcode, |
| 487 | 487 | html_blockquote, |
| 488 | - html_raw_block, | |
| 488 | + html_blockhtml, | |
| 489 | 489 | html_header, |
| 490 | 490 | html_hrule, |
| 491 | 491 | html_list, |
| 492 | 492 | html_list_item, |
| 493 | 493 | html_paragraph, |
| @@ -495,27 +495,27 @@ | ||
| 495 | 495 | html_table_cell, |
| 496 | 496 | html_table_row, |
| 497 | 497 | |
| 498 | 498 | /* span level elements */ |
| 499 | 499 | html_autolink, |
| 500 | - html_code_span, | |
| 500 | + html_codespan, | |
| 501 | 501 | html_double_emphasis, |
| 502 | 502 | html_emphasis, |
| 503 | 503 | html_image, |
| 504 | - html_line_break, | |
| 504 | + html_linebreak, | |
| 505 | 505 | html_link, |
| 506 | - html_raw_span, | |
| 506 | + html_raw_html_tag, | |
| 507 | 507 | html_triple_emphasis, |
| 508 | 508 | |
| 509 | 509 | /* low level elements */ |
| 510 | - 0, /* entities are copied verbatim */ | |
| 510 | + 0, /* entity */ | |
| 511 | 511 | html_normal_text, |
| 512 | 512 | |
| 513 | 513 | /* misc. parameters */ |
| 514 | - "*_", /* emphasis characters */ | |
| 515 | - 0 /* opaque data */ | |
| 514 | + "*_", /* emph_chars */ | |
| 515 | + 0 /* opaque */ | |
| 516 | 516 | }; |
| 517 | 517 | html_renderer.opaque = output_title; |
| 518 | 518 | if( output_title ) blob_reset(output_title); |
| 519 | 519 | blob_reset(output_body); |
| 520 | 520 | markdown(output_body, input_markdown, &html_renderer); |
| 521 | 521 | } |
| 522 | 522 |
| --- src/markdown_html.c | |
| +++ src/markdown_html.c | |
| @@ -129,11 +129,11 @@ | |
| 129 | static void html_epilog(struct Blob *ob, void *opaque){ |
| 130 | INTER_BLOCK(ob); |
| 131 | BLOB_APPEND_LITERAL(ob, "</div>\n"); |
| 132 | } |
| 133 | |
| 134 | static void html_raw_block(struct Blob *ob, struct Blob *text, void *opaque){ |
| 135 | char *data = blob_buffer(text); |
| 136 | size_t size = blob_size(text); |
| 137 | Blob *title = (Blob*)opaque; |
| 138 | while( size>0 && fossil_isspace(data[0]) ){ data++; size--; } |
| 139 | while( size>0 && fossil_isspace(data[size-1]) ){ size--; } |
| @@ -298,11 +298,11 @@ | |
| 298 | |
| 299 | |
| 300 | |
| 301 | /* HTML span tags */ |
| 302 | |
| 303 | static int html_raw_span(struct Blob *ob, struct Blob *text, void *opaque){ |
| 304 | blob_append(ob, blob_buffer(text), blob_size(text)); |
| 305 | return 1; |
| 306 | } |
| 307 | |
| 308 | static int html_autolink( |
| @@ -333,11 +333,11 @@ | |
| 333 | ** * https://spec.commonmark.org/0.29/#code-spans |
| 334 | ** |
| 335 | ** If nSep is 1 or 2, then this is a code-span which is inline. |
| 336 | ** If nSep is 3 or more, then this is a fenced code block |
| 337 | */ |
| 338 | static int html_code_span( |
| 339 | struct Blob *ob, /* Write the output here */ |
| 340 | struct Blob *text, /* The stuff in between the code span marks */ |
| 341 | int nSep, /* Number of grave accents marks as delimiters */ |
| 342 | void *opaque |
| 343 | ){ |
| @@ -413,11 +413,11 @@ | |
| 413 | } |
| 414 | BLOB_APPEND_LITERAL(ob, "\" />"); |
| 415 | return 1; |
| 416 | } |
| 417 | |
| 418 | static int html_line_break(struct Blob *ob, void *opaque){ |
| 419 | BLOB_APPEND_LITERAL(ob, "<br />\n"); |
| 420 | return 1; |
| 421 | } |
| 422 | |
| 423 | static int html_link( |
| @@ -483,11 +483,11 @@ | |
| 483 | html_epilog, |
| 484 | |
| 485 | /* block level elements */ |
| 486 | html_blockcode, |
| 487 | html_blockquote, |
| 488 | html_raw_block, |
| 489 | html_header, |
| 490 | html_hrule, |
| 491 | html_list, |
| 492 | html_list_item, |
| 493 | html_paragraph, |
| @@ -495,27 +495,27 @@ | |
| 495 | html_table_cell, |
| 496 | html_table_row, |
| 497 | |
| 498 | /* span level elements */ |
| 499 | html_autolink, |
| 500 | html_code_span, |
| 501 | html_double_emphasis, |
| 502 | html_emphasis, |
| 503 | html_image, |
| 504 | html_line_break, |
| 505 | html_link, |
| 506 | html_raw_span, |
| 507 | html_triple_emphasis, |
| 508 | |
| 509 | /* low level elements */ |
| 510 | 0, /* entities are copied verbatim */ |
| 511 | html_normal_text, |
| 512 | |
| 513 | /* misc. parameters */ |
| 514 | "*_", /* emphasis characters */ |
| 515 | 0 /* opaque data */ |
| 516 | }; |
| 517 | html_renderer.opaque = output_title; |
| 518 | if( output_title ) blob_reset(output_title); |
| 519 | blob_reset(output_body); |
| 520 | markdown(output_body, input_markdown, &html_renderer); |
| 521 | } |
| 522 |
| --- src/markdown_html.c | |
| +++ src/markdown_html.c | |
| @@ -129,11 +129,11 @@ | |
| 129 | static void html_epilog(struct Blob *ob, void *opaque){ |
| 130 | INTER_BLOCK(ob); |
| 131 | BLOB_APPEND_LITERAL(ob, "</div>\n"); |
| 132 | } |
| 133 | |
| 134 | static void html_blockhtml(struct Blob *ob, struct Blob *text, void *opaque){ |
| 135 | char *data = blob_buffer(text); |
| 136 | size_t size = blob_size(text); |
| 137 | Blob *title = (Blob*)opaque; |
| 138 | while( size>0 && fossil_isspace(data[0]) ){ data++; size--; } |
| 139 | while( size>0 && fossil_isspace(data[size-1]) ){ size--; } |
| @@ -298,11 +298,11 @@ | |
| 298 | |
| 299 | |
| 300 | |
| 301 | /* HTML span tags */ |
| 302 | |
| 303 | static int html_raw_html_tag(struct Blob *ob, struct Blob *text, void *opaque){ |
| 304 | blob_append(ob, blob_buffer(text), blob_size(text)); |
| 305 | return 1; |
| 306 | } |
| 307 | |
| 308 | static int html_autolink( |
| @@ -333,11 +333,11 @@ | |
| 333 | ** * https://spec.commonmark.org/0.29/#code-spans |
| 334 | ** |
| 335 | ** If nSep is 1 or 2, then this is a code-span which is inline. |
| 336 | ** If nSep is 3 or more, then this is a fenced code block |
| 337 | */ |
| 338 | static int html_codespan( |
| 339 | struct Blob *ob, /* Write the output here */ |
| 340 | struct Blob *text, /* The stuff in between the code span marks */ |
| 341 | int nSep, /* Number of grave accents marks as delimiters */ |
| 342 | void *opaque |
| 343 | ){ |
| @@ -413,11 +413,11 @@ | |
| 413 | } |
| 414 | BLOB_APPEND_LITERAL(ob, "\" />"); |
| 415 | return 1; |
| 416 | } |
| 417 | |
| 418 | static int html_linebreak(struct Blob *ob, void *opaque){ |
| 419 | BLOB_APPEND_LITERAL(ob, "<br />\n"); |
| 420 | return 1; |
| 421 | } |
| 422 | |
| 423 | static int html_link( |
| @@ -483,11 +483,11 @@ | |
| 483 | html_epilog, |
| 484 | |
| 485 | /* block level elements */ |
| 486 | html_blockcode, |
| 487 | html_blockquote, |
| 488 | html_blockhtml, |
| 489 | html_header, |
| 490 | html_hrule, |
| 491 | html_list, |
| 492 | html_list_item, |
| 493 | html_paragraph, |
| @@ -495,27 +495,27 @@ | |
| 495 | html_table_cell, |
| 496 | html_table_row, |
| 497 | |
| 498 | /* span level elements */ |
| 499 | html_autolink, |
| 500 | html_codespan, |
| 501 | html_double_emphasis, |
| 502 | html_emphasis, |
| 503 | html_image, |
| 504 | html_linebreak, |
| 505 | html_link, |
| 506 | html_raw_html_tag, |
| 507 | html_triple_emphasis, |
| 508 | |
| 509 | /* low level elements */ |
| 510 | 0, /* entity */ |
| 511 | html_normal_text, |
| 512 | |
| 513 | /* misc. parameters */ |
| 514 | "*_", /* emph_chars */ |
| 515 | 0 /* opaque */ |
| 516 | }; |
| 517 | html_renderer.opaque = output_title; |
| 518 | if( output_title ) blob_reset(output_title); |
| 519 | blob_reset(output_body); |
| 520 | markdown(output_body, input_markdown, &html_renderer); |
| 521 | } |
| 522 |