File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use std:: ffi:: { CString , CStr } ;
22use 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 } ;
64
75#[ no_mangle]
86pub extern "C" fn strtomarkdown ( input_ptr : * const c_char , options_flags : u32 ) -> * mut c_char {
97 let input_cstr = unsafe { CStr :: from_ptr ( input_ptr) } ;
108
119 let input_str = std:: str:: from_utf8 ( input_cstr. to_bytes ( ) ) . unwrap ( ) ;
1210 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 ( ) ) ;
1412 //options.insert(Options::ENABLE_TABLES);
1513 //options.insert(Options::ENABLE_FOOTNOTES);
1614 //options.insert(Options::ENABLE_STRIKETHROUGH);
You can’t perform that action at this time.
0 commit comments