File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,32 @@ Enables the safe parsing of markdown into proper React JSX objects, so you don't
44
55The only exception is arbitrary HTML in the markdown (kind of an antipattern), which will still use the unsafe method.
66
7+ Uses [ mdast] ( https://github.com/wooorm/mdast )  under the hood to parse markdown into a consistent AST format.
8+ 
79Requires React >= 0.14.
810
11+ ## Usage  
12+ 
13+ ``` js 
14+ import  converter  from  ' markdown-to-jsx'  ;
15+ import  React  from  ' react'  ;
16+ import  {render } from  ' react-dom'  ;
17+ 
18+ render (converter (' # Hello world!'  ), document .body );
19+ ``` 
20+ 
21+ [ mdast options] ( https://github.com/wooorm/mdast#mdastprocessvalue-options-done )  can be passed as the second argument:
22+ 
23+ ``` js 
24+ converter (' # Hello world[^2]!\n\n [^2]: A beautiful place.'  , {footnotes:  true });
25+ ``` 
26+ 
27+ 
928## Development Checklist  
1029
1130-  [x]  Base library
1231-  [x]  Unit testing
13- -  [  ]  Ship 1.0.0 to npm
32+ -  [x ]  Ship 1.0.0 to npm
1433-  [ ]  _ stretch goal_  - don't use ` dangerouslySetInnerHTML `  for arbitrary HTML in the markdown
1534
1635## Known Issues  
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments