@@ -112,7 +112,7 @@ describe("thread links", () => {
112112 expect (
113113 relabelThreadLinks ( "See (t3-thread://v1/t1), then t3-thread://v2/there/t1." , local , title ) ,
114114 ) . toBe ( "See ([Here](t3-thread://v1/t1)), then [There](t3-thread://v2/there/t1)." ) ;
115- for ( const marker of [ "*" , "**" , "_" , "__" , '"' , "'" ] ) {
115+ for ( const marker of [ "*" , "**" , "_" , "__" , "~~" , '"' , "'" ] ) {
116116 const emphasized = `${ marker } t3-thread://v2/there/t1${ marker } ` ;
117117 expect ( threadLinkRefs ( emphasized , local ) ) . toEqual ( [ ref ( "there" , "t1" ) ] ) ;
118118 expect ( relabelThreadLinks ( emphasized , local , title ) ) . toBe (
@@ -150,6 +150,10 @@ describe("thread links", () => {
150150 "Literal `t3-thread://v2/local/t1`" ,
151151 "Literal `first line\nt3-thread://v2/local/t1`" ,
152152 "[open](https://example.com/?redirect=t3-thread://v1/t1)" ,
153+ "https://example.com/?redirect=t3-thread://v1/t1" ,
154+ "[Open][ref]" ,
155+ "" ,
156+ "[ref]: t3-thread://v2/local/t1" ,
153157 ] . join ( "\n" ) ;
154158 expect ( relabelThreadLinks ( markdown , local , ( ) => "New" ) ) . toBe (
155159 [
@@ -161,8 +165,15 @@ describe("thread links", () => {
161165 "Literal `t3-thread://v2/local/t1`" ,
162166 "Literal `first line\nt3-thread://v2/local/t1`" ,
163167 "[open](https://example.com/?redirect=t3-thread://v1/t1)" ,
168+ "https://example.com/?redirect=t3-thread://v1/t1" ,
169+ "[Open][ref]" ,
170+ "" ,
171+ "[ref]: t3-thread://v2/local/t1" ,
164172 ] . join ( "\n" ) ,
165173 ) ;
174+ expect ( threadLinkRefs ( "Stray `\n\n[old](t3-thread://v1/t1) `code`" , local ) ) . toEqual ( [
175+ ref ( "local" , "t1" ) ,
176+ ] ) ;
166177 expect ( threadLinkRefs ( "`first line\nt3-thread://v2/local/t1`" , local ) ) . toEqual ( [ ] ) ;
167178 expect (
168179 threadLinkRefs ( "[open](https://example.com/?redirect=t3-thread://v1/t1)" , local ) ,
0 commit comments