Let $C$ be a compact Riemann surfaces of genus $g$. Let $p$ be a point, $\Delta$ a disc around $p$, and $\Delta^*$ the disc minus $p$. Let $\omega$ be a holomorphic one form defined on $\Delta^*$.
Given a meromorphic function $f$ on $C$, regular outside $p$, we can consider the residue of $f\omega$ at $p$.
If $\omega$ is the restriction of a regular form on $C\setminus p$ to $\Delta^*$, then this residue is zero by the classical Residue Theorem.
I read that also the converse is true. So, if the residue of $f\omega$ at $p$ is zero for every meromorphic function $f$ on $C$, regular outside $p$, then $\omega$ is the restriction of a regular form on $C\setminus p$ to $\Delta^*$.
In the book "Vertex algebras and Algebraic Curves" this goes under the name of strong residue theorem (9.2.9). I struggle to find a proof in the literature, this could be something relatively elementary to be found in some book on Riemann surfaces. It should follow from a variant of Serre duality.
I would like to have a proof and/or a reference about this result. I am interested both in the case $C$ smooth and $C$ nodal. The latter case I think makes really sense just when $C$ is irreducible, but I am not sure.