flamethrower icon indicating copy to clipboard operation
flamethrower copied to clipboard

Keep existing target in <a>

Open pierredewilde opened this issue 2 years ago • 1 comments

Flamethrower currently replaces existing link target:

<a href="https://astro.build" target="astro">

is replaced by

<a href="https://astro.build" target="_blank">

Existing target should be kept untouched.

https://github.com/fireship-io/flamethrower/blob/79883a4fb64cc2f2b29f465c7c9556111c58e7ae/lib/handlers.ts#L78

should be replaced by

anchor.target = anchor.target || '_blank';

pierredewilde avatar Oct 09 '22 19:10 pierredewilde

might as well fork it as it will take awhile if you submit a PR

nodsaibot avatar Oct 25 '22 19:10 nodsaibot