File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,13 @@ That's just a regular link
100
100
101
101
And so is this: [neat](https://www.youtube.com/watch?v=dQw4w9WgXcQ)
102
102
103
- [This has a title, so it's not transformed](https://some-site.com)
103
+ [This text is not the same as the url, so it's not transformed](https://some-site.com)
104
+
105
+ [https://some-site.com](https://some-site.com "This one has a title, so it's not transformed")
106
+
107
+ This one has an emphasised text, so it's not transformed:
108
+
109
+ [**https://some-site.com**](https://some-site.com)
104
110
` . trim ( ) ,
105
111
)
106
112
Original file line number Diff line number Diff line change @@ -90,7 +90,8 @@ const remarkEmbedder: Plugin<[RemarkEmbedderOptions]> = ({
90
90
node . type === 'link' &&
91
91
! node . title &&
92
92
node . children . length === 1 &&
93
- ( node . children [ 0 ] as Text ) . value === node . url
93
+ node . children [ 0 ] . type === 'text' &&
94
+ node . children [ 0 ] . value === node . url
94
95
if ( ! ( isText || isValidLink ) ) {
95
96
return
96
97
}
You can’t perform that action at this time.
0 commit comments