@@ -74,7 +74,7 @@ type headerfn = extern "C" fn(*mut hoedown_buffer, *const hoedown_buffer,
74
74
libc:: c_int , * mut libc:: c_void ) ;
75
75
76
76
type codespanfn = extern "C" fn ( * mut hoedown_buffer , * const hoedown_buffer ,
77
- * mut libc:: c_void ) ;
77
+ * mut libc:: c_void ) -> libc :: c_int ;
78
78
79
79
type linkfn = extern "C" fn ( * mut hoedown_buffer , * const hoedown_buffer ,
80
80
* const hoedown_buffer , * const hoedown_buffer ,
@@ -317,7 +317,11 @@ pub fn render(w: &mut fmt::Formatter, s: &str, print_toc: bool) -> fmt::Result {
317
317
318
318
reset_headers ( ) ;
319
319
320
- extern fn codespan ( ob : * mut hoedown_buffer , text : * const hoedown_buffer , _: * mut libc:: c_void ) {
320
+ extern fn codespan (
321
+ ob : * mut hoedown_buffer ,
322
+ text : * const hoedown_buffer ,
323
+ _: * mut libc:: c_void ,
324
+ ) -> libc:: c_int {
321
325
let content = if text. is_null ( ) {
322
326
"" . to_string ( )
323
327
} else {
@@ -329,6 +333,8 @@ pub fn render(w: &mut fmt::Formatter, s: &str, print_toc: bool) -> fmt::Result {
329
333
let content = format ! ( "<code>{}</code>" , Escape ( & content) ) ;
330
334
let element = CString :: new ( content) . unwrap ( ) ;
331
335
unsafe { hoedown_buffer_puts ( ob, element. as_ptr ( ) ) ; }
336
+ // Return anything except 0, which would mean "also print the code span verbatim".
337
+ 1
332
338
}
333
339
334
340
unsafe {
0 commit comments