I am trying to understand the answer by Pp.. to this old post (I made a new post because this is 6 years old). The gist is we have a continuous function which is holomorphic everywhere but a line and we can use Morera's theorem to show that a triangle with an edge on the line gives a zero contour integral because it can be broken down to many small triangles for which most do not touch the line and so are zero, and the remaining triangles give smaller and smaller integrals, tending to zero.
Conceptually, I understand most of the answer, but one part bugs me: When we are left with lots of very small triangles with an edge on the line, we still have to sum their individual contributions, but this just feels like the definition of the standard Riemann integral. Sure the triangles are small, but there are many many triangles so why can't their sum be finite when the limit of their size tends to zero?
Don't do it that way!
Say $f$ is continuous except on the line $L$, $T$ is a triangle and we want to show $\int_T f=0$. Decomposing $T$ into at most two triangles, we can assume that either $T$ and the interior of $T$ are disjoint from $L$, in which case we're done, or an edge of $T$ lies on $L$.
So suppose an edge of $T$ lies on $L$. There is a complex number $\alpha$ such that if $t>0$ then the translate $T+t\alpha$ has interior disjoint from $L$. So uniform convergence shows that $$\int_Tf=\lim_{t\to0}\int_{T+t\alpha}f=\lim_{t\to0}0=0.$$