Continuity implies analyticity Question: Let $f$ be a continuous function on $\mathbb{C}$ which is analytic on $\mathbb{C}\setminus\{it\in\mathbb{C}:t\in\mathbb{R}\}$. Then is $f$ analytic on whole $\mathbb{C}$?
Thanks in advance for any help.
 A: As suggested in the comments, if we can prove that the function has antiderivative on the whole complex plane, we can take advantage of Morera theorem to conclude.
Let $\gamma_{z_1,z_2} (t)= (1-t)z_1 +tz_2$ for all $t\in [0,1]$, linear path from $z_1$ to $z_2$.
For any $z$ we define function $F$ as follows:
$$ F(z) =\int_{\gamma_{0,z}} f $$
If $z\not\in \{it \mid t\in \mathbf{R} \}=:L$, let $z_1 \in B(z,r)$, where $r=d(z,  L)>0  $. Then, by Cauchy theorem (on triangles suffices) on path $$\gamma_{0,z}\cup\gamma_{z,z_1}\cup\gamma_{z_1,0},$$ we get
$$ F(z_1) - F(z) = \int_{\gamma_{z,z_1}} f, $$
which leads to $F^\prime(z) = f(z)$, as
$$ \lim_{z_1\rightarrow z} \int_{\gamma_{z,z_1}} f = (z_1-z)\lim_{t\rightarrow 0}\int_{0}^1 f((1-t)z+tz_1)dt =(z_1-z)f(z). $$
Cases $z\in L\setminus \{0\}$ and $z=0$, can be obtained from direct calculation of the derivative (using the limit fact above which is based only on the continuity of $f$ on the whole plane).
Note: This can be generalized to a star domain from which we remove a finite number of lines passing trough the vantage point.
