File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1
1
use std:: ffi:: { CString , CStr } ;
2
2
use std:: os:: raw:: c_char;
3
- use std:: alloc:: { alloc, dealloc, Layout } ;
4
- use std:: ptr;
5
- use pulldown_cmark:: { Event , Parser , Options } ;
3
+ use pulldown_cmark:: { Options } ;
6
4
7
5
#[ no_mangle]
8
6
pub extern "C" fn strtomarkdown ( input_ptr : * const c_char , options_flags : u32 ) -> * mut c_char {
9
7
let input_cstr = unsafe { CStr :: from_ptr ( input_ptr) } ;
10
8
11
9
let input_str = std:: str:: from_utf8 ( input_cstr. to_bytes ( ) ) . unwrap ( ) ;
12
10
let mut html_output = String :: new ( ) ;
13
- let mut options = Options :: from_bits ( options_flags) . unwrap_or ( Options :: empty ( ) ) ;
11
+ let options = Options :: from_bits ( options_flags) . unwrap_or ( Options :: empty ( ) ) ;
14
12
//options.insert(Options::ENABLE_TABLES);
15
13
//options.insert(Options::ENABLE_FOOTNOTES);
16
14
//options.insert(Options::ENABLE_STRIKETHROUGH);
You can’t perform that action at this time.
0 commit comments