@@ -157,7 +157,7 @@ def test_multi_cell_markdown_link_dry_run(tmp_path):
157157
158158 pdf .multi_cell (
159159 pdf .epw ,
160- text = "**Start** [One Page Dungeon Context ](https://www.dungeoncontest. com/) __End__" ,
160+ text = "**Start** [fpdf2 github ](https://github. com/py-pdf/fpdf2 ) __End__" ,
161161 dry_run = True ,
162162 markdown = True ,
163163 new_x = "left" ,
@@ -167,7 +167,7 @@ def test_multi_cell_markdown_link_dry_run(tmp_path):
167167
168168 pdf .multi_cell (
169169 pdf .epw ,
170- text = "**Start** [One Page Dungeon Context ](https://www.dungeoncontest. com/) __End__" ,
170+ text = "**Start** [fpdf2 github ](https://github. com/py-pdf/fpdf2 ) __End__" ,
171171 markdown = True ,
172172 new_x = "left" ,
173173 new_y = "next" ,
@@ -176,7 +176,7 @@ def test_multi_cell_markdown_link_dry_run(tmp_path):
176176
177177 pdf .multi_cell (
178178 pdf .epw ,
179- text = "**Start** [One Page Dungeon Context ](https://www.dungeoncontest. com/) __End__" ,
179+ text = "**Start** [fpdf2 github ](https://github. com/py-pdf/fpdf2 ) __End__" ,
180180 dry_run = True ,
181181 markdown = True ,
182182 new_x = "left" ,
@@ -186,11 +186,37 @@ def test_multi_cell_markdown_link_dry_run(tmp_path):
186186
187187 pdf .multi_cell (
188188 pdf .epw ,
189- text = "**Start** [One Page Dungeon Context ](https://www.dungeoncontest. com/) __End__" ,
189+ text = "**Start** [fpdf2 github ](https://github. com/py-pdf/fpdf2 ) __End__" ,
190190 markdown = True ,
191191 new_x = "left" ,
192192 new_y = "next" ,
193193 )
194194 assert len (pdf .pages [1 ].annots ) == 2
195195
196196 assert_pdf_equal (pdf , HERE / "multi_cell_markdown_link_dry_run.pdf" , tmp_path )
197+
198+
199+ def test_multi_cell_markdown_consecutive_links (tmp_path ):
200+ link1 = "[fpdf2 github](https://github.com/py-pdf/fpdf2)"
201+ link2 = "[fpdf2 github Releases](https://github.com/py-pdf/fpdf2/releases)"
202+
203+ pdf = fpdf .FPDF ()
204+ pdf .set_font ("Helvetica" )
205+ pdf .add_page ()
206+ pdf .multi_cell (
207+ pdf .epw ,
208+ text = f"**Start** { link1 :s} { link2 :s} __End__" ,
209+ markdown = True ,
210+ new_x = "left" ,
211+ new_y = "next" ,
212+ )
213+ assert len (pdf .pages [pdf .page ].annots ) == 2
214+ pdf .multi_cell (
215+ pdf .epw ,
216+ text = f"**Start** { link1 :s} { link2 :s} __End__" ,
217+ markdown = True ,
218+ new_x = "left" ,
219+ new_y = "next" ,
220+ )
221+ assert len (pdf .pages [pdf .page ].annots ) == 4
222+ assert_pdf_equal (pdf , HERE / "multi_cell_markdown_consecutive_links.pdf" , tmp_path )
0 commit comments