Fossil SCM

Fix a problem with markdown rendering for "code".

drh 2017-07-28 18:41 trunk
Commit 04de083ec842c3f22f64bb05c9472d7432482dcaf92591415492c1e21ce6d65f
1 file changed +5 -3
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -296,13 +296,15 @@
296296
BLOB_APPEND_LITERAL(ob, "</a>");
297297
return 1;
298298
}
299299
300300
static int html_code_span(struct Blob *ob, struct Blob *text, void *opaque){
301
- BLOB_APPEND_LITERAL(ob, "<code>");
302
- html_escape(ob, blob_buffer(text), blob_size(text));
303
- BLOB_APPEND_LITERAL(ob, "</code>");
301
+ if( text ){
302
+ BLOB_APPEND_LITERAL(ob, "<code>");
303
+ html_escape(ob, blob_buffer(text), blob_size(text));
304
+ BLOB_APPEND_LITERAL(ob, "</code>");
305
+ }
304306
return 1;
305307
}
306308
307309
static int html_double_emphasis(
308310
struct Blob *ob,
309311
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -296,13 +296,15 @@
296 BLOB_APPEND_LITERAL(ob, "</a>");
297 return 1;
298 }
299
300 static int html_code_span(struct Blob *ob, struct Blob *text, void *opaque){
301 BLOB_APPEND_LITERAL(ob, "<code>");
302 html_escape(ob, blob_buffer(text), blob_size(text));
303 BLOB_APPEND_LITERAL(ob, "</code>");
 
 
304 return 1;
305 }
306
307 static int html_double_emphasis(
308 struct Blob *ob,
309
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -296,13 +296,15 @@
296 BLOB_APPEND_LITERAL(ob, "</a>");
297 return 1;
298 }
299
300 static int html_code_span(struct Blob *ob, struct Blob *text, void *opaque){
301 if( text ){
302 BLOB_APPEND_LITERAL(ob, "<code>");
303 html_escape(ob, blob_buffer(text), blob_size(text));
304 BLOB_APPEND_LITERAL(ob, "</code>");
305 }
306 return 1;
307 }
308
309 static int html_double_emphasis(
310 struct Blob *ob,
311

Keyboard Shortcuts

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