splicing leaking brake line

while doing a install of a new shifter i hit the brake line on accident!
and now the line is leaking can i splice the line or do i have to replace
the hole thing