Fossil SCM
Added '@' and '#' prefixes in spans. Initial commit ate them.
Commit
398cfa0be0c2f7ef52d01bc93ab58b75637608d703782af586ee617861bb3a1b
Parent
9b07f400ce3a592…
1 file changed
+6
-5
+6
-5
| --- src/markdown_html.c | ||
| +++ src/markdown_html.c | ||
| @@ -540,26 +540,27 @@ | ||
| 540 | 540 | ** Fossil feature using Markdown is free to apply markup and |
| 541 | 541 | ** behavior to these in feature-specific ways. |
| 542 | 542 | */ |
| 543 | 543 | static int html_tagspan( |
| 544 | 544 | struct Blob *ob, /* Write the output here */ |
| 545 | - struct Blob *text, /* The stuff in between the code span marks */ | |
| 546 | - enum mkd_tagspan type, /* which type of tagspan we're creating */ | |
| 545 | + struct Blob *text, /* The word after the tag character */ | |
| 546 | + enum mkd_tagspan type, /* Which type of tagspan we're creating */ | |
| 547 | 547 | void *opaque |
| 548 | 548 | ){ |
| 549 | 549 | if( text==0 ){ |
| 550 | 550 | /* no-op */ |
| 551 | 551 | }else{ |
| 552 | + char c; | |
| 552 | 553 | BLOB_APPEND_LITERAL(ob, "<span data-"); |
| 553 | 554 | switch (type) { |
| 554 | - case MKDT_ATREF: BLOB_APPEND_LITERAL(ob, "atref"); break; | |
| 555 | - case MKDT_HASH: BLOB_APPEND_LITERAL(ob, "hash"); break; | |
| 555 | + case MKDT_ATREF: c='@'; BLOB_APPEND_LITERAL(ob, "atref"); break; | |
| 556 | + case MKDT_HASH: c='#'; BLOB_APPEND_LITERAL(ob, "hash"); break; | |
| 556 | 557 | } |
| 557 | 558 | BLOB_APPEND_LITERAL(ob, "=\""); |
| 558 | 559 | html_quote(ob, blob_buffer(text), blob_size(text)); |
| 559 | 560 | BLOB_APPEND_LITERAL(ob, "\""); |
| 560 | - blob_appendf(ob, ">%b</span>", text); | |
| 561 | + blob_appendf(ob, ">%c%b</span>", c, text); | |
| 561 | 562 | } |
| 562 | 563 | return 1; |
| 563 | 564 | } |
| 564 | 565 | |
| 565 | 566 | static int html_triple_emphasis( |
| 566 | 567 |
| --- src/markdown_html.c | |
| +++ src/markdown_html.c | |
| @@ -540,26 +540,27 @@ | |
| 540 | ** Fossil feature using Markdown is free to apply markup and |
| 541 | ** behavior to these in feature-specific ways. |
| 542 | */ |
| 543 | static int html_tagspan( |
| 544 | struct Blob *ob, /* Write the output here */ |
| 545 | struct Blob *text, /* The stuff in between the code span marks */ |
| 546 | enum mkd_tagspan type, /* which type of tagspan we're creating */ |
| 547 | void *opaque |
| 548 | ){ |
| 549 | if( text==0 ){ |
| 550 | /* no-op */ |
| 551 | }else{ |
| 552 | BLOB_APPEND_LITERAL(ob, "<span data-"); |
| 553 | switch (type) { |
| 554 | case MKDT_ATREF: BLOB_APPEND_LITERAL(ob, "atref"); break; |
| 555 | case MKDT_HASH: BLOB_APPEND_LITERAL(ob, "hash"); break; |
| 556 | } |
| 557 | BLOB_APPEND_LITERAL(ob, "=\""); |
| 558 | html_quote(ob, blob_buffer(text), blob_size(text)); |
| 559 | BLOB_APPEND_LITERAL(ob, "\""); |
| 560 | blob_appendf(ob, ">%b</span>", text); |
| 561 | } |
| 562 | return 1; |
| 563 | } |
| 564 | |
| 565 | static int html_triple_emphasis( |
| 566 |
| --- src/markdown_html.c | |
| +++ src/markdown_html.c | |
| @@ -540,26 +540,27 @@ | |
| 540 | ** Fossil feature using Markdown is free to apply markup and |
| 541 | ** behavior to these in feature-specific ways. |
| 542 | */ |
| 543 | static int html_tagspan( |
| 544 | struct Blob *ob, /* Write the output here */ |
| 545 | struct Blob *text, /* The word after the tag character */ |
| 546 | enum mkd_tagspan type, /* Which type of tagspan we're creating */ |
| 547 | void *opaque |
| 548 | ){ |
| 549 | if( text==0 ){ |
| 550 | /* no-op */ |
| 551 | }else{ |
| 552 | char c; |
| 553 | BLOB_APPEND_LITERAL(ob, "<span data-"); |
| 554 | switch (type) { |
| 555 | case MKDT_ATREF: c='@'; BLOB_APPEND_LITERAL(ob, "atref"); break; |
| 556 | case MKDT_HASH: c='#'; BLOB_APPEND_LITERAL(ob, "hash"); break; |
| 557 | } |
| 558 | BLOB_APPEND_LITERAL(ob, "=\""); |
| 559 | html_quote(ob, blob_buffer(text), blob_size(text)); |
| 560 | BLOB_APPEND_LITERAL(ob, "\""); |
| 561 | blob_appendf(ob, ">%c%b</span>", c, text); |
| 562 | } |
| 563 | return 1; |
| 564 | } |
| 565 | |
| 566 | static int html_triple_emphasis( |
| 567 |