@@ -79,7 +79,7 @@ test('link mark round-trips in serialized HTML', async ({ page }) => {
7979
8080 await expect
8181 . poll ( async ( ) => getSerializedHtml ( page ) )
82- . toContain ( '<a href="https://example.com">Example</a>' ) ;
82+ . toContain ( '<a href="https://example.com" data-auto="false" >Example</a>' ) ;
8383} ) ;
8484
8585test . describe ( 'test-links setLink table' , ( ) => {
@@ -99,7 +99,8 @@ test.describe('test-links setLink table', () => {
9999 end : '11' ,
100100 text : 'world' ,
101101 url : 'https://example.com' ,
102- expectContains : '<p>Hello <a href="https://example.com">world</a></p>' ,
102+ expectContains :
103+ '<p>Hello <a href="https://example.com" data-auto="false">world</a></p>' ,
103104 } ,
104105 {
105106 name : 'wraps multiword phrase with spaces' ,
@@ -109,7 +110,7 @@ test.describe('test-links setLink table', () => {
109110 text : 'two three' ,
110111 url : 'https://multi.example' ,
111112 expectContains :
112- '<p>one <a href="https://multi.example">two three</a></p>' ,
113+ '<p>one <a href="https://multi.example" data-auto="false" >two three</a></p>' ,
113114 } ,
114115 {
115116 name : 'inserts linked text at cursor when start and end are the same' ,
@@ -118,7 +119,8 @@ test.describe('test-links setLink table', () => {
118119 end : '1' ,
119120 text : 'm' ,
120121 url : 'https://same-range.example' ,
121- expectContains : '<p>x<a href="https://same-range.example">m</a>x</p>' ,
122+ expectContains :
123+ '<p>x<a href="https://same-range.example" data-auto="false">m</a>x</p>' ,
122124 } ,
123125 {
124126 name : 'setLink blocked when selection entirely in codeblock' ,
@@ -164,7 +166,8 @@ test.describe('test-links setLink table', () => {
164166 end : '99999' ,
165167 text : 'Z' ,
166168 url : 'https://clamp.setlink' ,
167- expectContains : '<p><a href="https://clamp.setlink">Z</a></p>' ,
169+ expectContains :
170+ '<p><a href="https://clamp.setlink" data-auto="false">Z</a></p>' ,
168171 } ,
169172 {
170173 name : 'setLink wraps link text before inline image - keeps the image' ,
@@ -174,7 +177,7 @@ test.describe('test-links setLink table', () => {
174177 text : 'abc' ,
175178 url : 'https://example.com' ,
176179 expectContains :
177- '<p><a href="https://example.com">abc</a><img src="" width="80" height="80"/></p>' ,
180+ '<p><a href="https://example.com" data-auto="false" >abc</a><img src="" width="80" height="80"/></p>' ,
178181 } ,
179182 {
180183 name : 'wraps bold italic list item text with link' ,
@@ -184,7 +187,7 @@ test.describe('test-links setLink table', () => {
184187 text : 'styled' ,
185188 url : 'https://list-styled.example' ,
186189 expectContains :
187- '<ul><li><a href="https://list-styled.example"><b><i>styled</i></b></a></li><li>hello</li></ul>' ,
190+ '<ul><li><a href="https://list-styled.example" data-auto="false" ><b><i>styled</i></b></a></li><li>hello</li></ul>' ,
188191 } ,
189192 {
190193 name : 'inserts linked text at cursor at very start of first list item' ,
@@ -194,7 +197,7 @@ test.describe('test-links setLink table', () => {
194197 text : 'Link' ,
195198 url : 'https://cursor-list.example' ,
196199 expectContains :
197- '<ul><li><a href="https://cursor-list.example">Link</a>first</li><li>second</li></ul>' ,
200+ '<ul><li><a href="https://cursor-list.example" data-auto="false" >Link</a>first</li><li>second</li></ul>' ,
198201 } ,
199202 {
200203 name : 'inserts linked text at cursor inside empty list item' ,
@@ -204,7 +207,7 @@ test.describe('test-links setLink table', () => {
204207 text : 'Link' ,
205208 url : 'https://empty-list.example' ,
206209 expectContains :
207- '<ul><li><a href="https://empty-list.example">Link</a></li></ul>' ,
210+ '<ul><li><a href="https://empty-list.example" data-auto="false" >Link</a></li></ul>' ,
208211 } ,
209212 {
210213 name : 'wraps mixed bold and bold-italic text in list item with link as outermost mark' ,
@@ -214,7 +217,7 @@ test.describe('test-links setLink table', () => {
214217 text : 'abcd' ,
215218 url : 'https://mixed-marks.example' ,
216219 expectContains :
217- '<ul><li><a href="https://mixed-marks.example"><b>ab<i>cd</i></b></a></li></ul>' ,
220+ '<ul><li><a href="https://mixed-marks.example" data-auto="false" ><b>ab<i>cd</i></b></a></li></ul>' ,
218221 } ,
219222 {
220223 name : 'setLink replacement longer than selection applies marks from range start only' ,
@@ -224,7 +227,7 @@ test.describe('test-links setLink table', () => {
224227 text : 'abcdef' ,
225228 url : 'https://mixed-marks-longer.example' ,
226229 expectContains :
227- '<ul><li><a href="https://mixed-marks-longer.example"><b>abcdef</b></a></li></ul>' ,
230+ '<ul><li><a href="https://mixed-marks-longer.example" data-auto="false" ><b>abcdef</b></a></li></ul>' ,
228231 } ,
229232 ] ;
230233
@@ -267,7 +270,8 @@ test.describe('test-links removeLink table', () => {
267270 html : '<html><p><a href="https://partial.test">abcde</a></p></html>' ,
268271 start : '0' ,
269272 end : '2' ,
270- expectContains : '<p>ab<a href="https://partial.test">cde</a></p>' ,
273+ expectContains :
274+ '<p>ab<a href="https://partial.test" data-auto="false">cde</a></p>' ,
271275 } ,
272276 {
273277 name : 'no link: plain paragraph unchanged' ,
@@ -288,7 +292,7 @@ test.describe('test-links removeLink table', () => {
288292 html : '<html><p>prefix <a href="https://noop.rm">ab</a> tail</p></html>' ,
289293 start : '1000' ,
290294 end : '1000' ,
291- expectContains : '<a href="https://noop.rm">ab</a>' ,
295+ expectContains : '<a href="https://noop.rm" data-auto="false" >ab</a>' ,
292296 } ,
293297 ] ;
294298
@@ -376,7 +380,9 @@ test.describe('test-links autolink', () => {
376380
377381 await expect
378382 . poll ( async ( ) => getTestLinksSerializedHtml ( page ) )
379- . toContain ( '<a href="https://example.com">https://example.com</a>' ) ;
383+ . toContain (
384+ '<a href="https://example.com" data-auto="true">https://example.com</a>'
385+ ) ;
380386 } ) ;
381387
382388 test ( 'creates link while typing with custom regex' , async ( { page } ) => {
@@ -392,7 +398,7 @@ test.describe('test-links autolink', () => {
392398
393399 await expect
394400 . poll ( async ( ) => getTestLinksSerializedHtml ( page ) )
395- . toContain ( '<a href="issue-123">issue-123</a>' ) ;
401+ . toContain ( '<a href="issue-123" data-auto="true" >issue-123</a>' ) ;
396402 } ) ;
397403
398404 test ( 'creates link when pasting plain URL with default regex' , async ( {
@@ -407,7 +413,9 @@ test.describe('test-links autolink', () => {
407413
408414 await expect
409415 . poll ( async ( ) => getTestLinksSerializedHtml ( page ) )
410- . toContain ( '<a href="https://example.com">https://example.com</a>' ) ;
416+ . toContain (
417+ '<a href="https://example.com" data-auto="true">https://example.com</a>'
418+ ) ;
411419 } ) ;
412420
413421 test ( 'does not autolink when link regex is disabled' , async ( { page } ) => {
0 commit comments