File tree Expand file tree Collapse file tree 4 files changed +6
-18
lines changed Expand file tree Collapse file tree 4 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ Array [
9191 Object {
9292 " content" : " # Header
9393
94- Text with _some_ ** formatting ** and a [link ](/ foo ).
94+ Text with * some * ** formatting ** and a [link ](/ foo ).
9595
9696<div >And some HTML.</div >
9797
Original file line number Diff line number Diff line change 11import remark from 'remark' ;
22import noAutoLink from '../noAutoLinkRemarkPlugin' ;
33
4- const transform = ( markdown : string ) =>
5- remark ( )
6- . use ( noAutoLink )
7- . processSync ( markdown )
8- . toString ( ) ;
4+ const transform = ( markdown : string ) => remark ( ) . use ( noAutoLink ) . processSync ( markdown ) . toString ( ) ;
95
10- it ( 'should convert URLs to auto links' , ( ) => {
6+ it ( 'should not convert URLs to auto links' , ( ) => {
117 const markdown = 'http://example.com' ;
128 const result = transform ( markdown ) ;
13- expect ( result . trim ( ) ) . toBe ( '[ http://example.com](http://example.com "http://example.com") ' ) ;
9+ expect ( result . trim ( ) ) . toBe ( 'http://example.com' ) ;
1410} ) ;
1511
1612it ( 'should keep full links as is' , ( ) => {
Original file line number Diff line number Diff line change @@ -63,14 +63,11 @@ export default function chunkify(
6363 } ;
6464 }
6565
66- const rendered = remark ( )
67- . use ( processCode )
68- . processSync ( markdown )
69- . toString ( ) ;
66+ const rendered = remark ( ) . use ( processCode ) . processSync ( markdown ) . toString ( ) ;
7067
7168 const chunks : ( Rsg . CodeExample | Rsg . MarkdownExample ) [ ] = [ ] ;
7269 const textChunks = rendered . split ( CODE_PLACEHOLDER ) ;
73- textChunks . forEach ( chunk => {
70+ textChunks . forEach ( ( chunk ) => {
7471 chunk = chunk . trim ( ) ;
7572 if ( chunk ) {
7673 chunks . push ( {
You can’t perform that action at this time.
0 commit comments