File tree Expand file tree Collapse file tree 5 files changed +31
-3
lines changed Expand file tree Collapse file tree 5 files changed +31
-3
lines changed Original file line number Diff line number Diff line change 11coverage /
22node_modules /
33.DS_Store 
4- * .d.ts 
4+ index.d.ts 
5+ test.d.ts 
56* .log 
67yarn.lock 
Original file line number Diff line number Diff line change @@ -52,8 +52,9 @@ function opener(matter) {
5252/** @type  {FromMarkdownHandle } */ 
5353function  close ( token )  { 
5454  const  data  =  this . resume ( ) 
55+   const  node  =  /** @type  {Literal } */  ( this . exit ( token ) ) 
5556  // Remove the initial and final eol. 
56-   this . exit ( token ) . value  =  data . replace ( / ^ ( \r ? \n | \r ) | ( \r ? \n | \r ) $ / g,  '' ) 
57+   node . value  =  data . replace ( / ^ ( \r ? \n | \r ) | ( \r ? \n | \r ) $ / g,  '' ) 
5758} 
5859
5960/** @type  {FromMarkdownHandle } */ 
Original file line number Diff line number Diff line change 5353    "xo" : " ^0.39.0" 
5454  },
5555  "scripts" : {
56-     "build" : " rimraf \" * .d.ts\"  && tsc && type-coverage"  ,
56+     "build" : " rimraf \" {index,test} .d.ts\"  && tsc && type-coverage"  ,
5757    "format" : " remark . -qfo && prettier . -w --loglevel warn && xo --fix"  ,
5858    "test-api" : " node --conditions development test.js"  ,
5959    "test-coverage" : " c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node --conditions development test.js"  ,
Original file line number Diff line number Diff line change 1+ import  { Literal }  from  'mdast' 
2+ 
3+ interface  TOML  extends  Literal  { 
4+   type : 'toml' 
5+ } 
6+ 
7+ interface  JSON  extends  Literal  { 
8+   type : 'json' 
9+ } 
10+ 
11+ interface  Custom  extends  Literal  { 
12+   type : 'custom' 
13+ } 
14+ 
15+ declare  module 'mdast'  { 
16+   // To do: this should be `FrontmatterMap`, which doesn’t exist yet. 
17+   interface  BlockContentMap  { 
18+     toml : TOML 
19+     custom : Custom 
20+     json : JSON 
21+   } 
22+ } 
Original file line number Diff line number Diff line change 1+ /** 
2+  * @typedef  {import('./test-types') } TOML 
3+  */ 
4+ 
15import  test  from  'tape' 
26import  { fromMarkdown }  from  'mdast-util-from-markdown' 
37import  { toMarkdown }  from  'mdast-util-to-markdown' 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments