Fossil SCM

Change the callback function names in markdown_html.c so that they match the pointer names in markdown.c. No functional changes.

drh 2020-06-02 12:35 trunk
Commit 485fda60c3fcb7e5893fcaed78dd31abf8baa48f209b0866adf6301f4c813a18
1 file changed +11 -11
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -129,11 +129,11 @@
129129
static void html_epilog(struct Blob *ob, void *opaque){
130130
INTER_BLOCK(ob);
131131
BLOB_APPEND_LITERAL(ob, "</div>\n");
132132
}
133133
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){
135135
char *data = blob_buffer(text);
136136
size_t size = blob_size(text);
137137
Blob *title = (Blob*)opaque;
138138
while( size>0 && fossil_isspace(data[0]) ){ data++; size--; }
139139
while( size>0 && fossil_isspace(data[size-1]) ){ size--; }
@@ -298,11 +298,11 @@
298298
299299
300300
301301
/* HTML span tags */
302302
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){
304304
blob_append(ob, blob_buffer(text), blob_size(text));
305305
return 1;
306306
}
307307
308308
static int html_autolink(
@@ -333,11 +333,11 @@
333333
** * https://spec.commonmark.org/0.29/#code-spans
334334
**
335335
** If nSep is 1 or 2, then this is a code-span which is inline.
336336
** If nSep is 3 or more, then this is a fenced code block
337337
*/
338
-static int html_code_span(
338
+static int html_codespan(
339339
struct Blob *ob, /* Write the output here */
340340
struct Blob *text, /* The stuff in between the code span marks */
341341
int nSep, /* Number of grave accents marks as delimiters */
342342
void *opaque
343343
){
@@ -413,11 +413,11 @@
413413
}
414414
BLOB_APPEND_LITERAL(ob, "\" />");
415415
return 1;
416416
}
417417
418
-static int html_line_break(struct Blob *ob, void *opaque){
418
+static int html_linebreak(struct Blob *ob, void *opaque){
419419
BLOB_APPEND_LITERAL(ob, "<br />\n");
420420
return 1;
421421
}
422422
423423
static int html_link(
@@ -483,11 +483,11 @@
483483
html_epilog,
484484
485485
/* block level elements */
486486
html_blockcode,
487487
html_blockquote,
488
- html_raw_block,
488
+ html_blockhtml,
489489
html_header,
490490
html_hrule,
491491
html_list,
492492
html_list_item,
493493
html_paragraph,
@@ -495,27 +495,27 @@
495495
html_table_cell,
496496
html_table_row,
497497
498498
/* span level elements */
499499
html_autolink,
500
- html_code_span,
500
+ html_codespan,
501501
html_double_emphasis,
502502
html_emphasis,
503503
html_image,
504
- html_line_break,
504
+ html_linebreak,
505505
html_link,
506
- html_raw_span,
506
+ html_raw_html_tag,
507507
html_triple_emphasis,
508508
509509
/* low level elements */
510
- 0, /* entities are copied verbatim */
510
+ 0, /* entity */
511511
html_normal_text,
512512
513513
/* misc. parameters */
514
- "*_", /* emphasis characters */
515
- 0 /* opaque data */
514
+ "*_", /* emph_chars */
515
+ 0 /* opaque */
516516
};
517517
html_renderer.opaque = output_title;
518518
if( output_title ) blob_reset(output_title);
519519
blob_reset(output_body);
520520
markdown(output_body, input_markdown, &html_renderer);
521521
}
522522
--- 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

Keyboard Shortcuts

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